Skip to content

Package MathScrap for Windows and Android, with logs, bilingual UI, and CI - #1

Merged
DNTOF merged 124 commits into
mainfrom
cursor/mathscrap-packaging-0e28
Nov 7, 2026
Merged

DNTOF merged 124 commits into
mainfrom
cursor/mathscrap-packaging-0e28

Conversation

@DNTOF

@DNTOF DNTOF commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

MathScrap on one kraft sheet: geometry through the current line, local handwriting recognition, and a Tauri shell for Windows, Android, and an iOS project path. Author DNT_OF / DNTOF. Apache-2.0 and NOTICE are unchanged.

What landed

  • Geometry already on this branch stays. The stale OCR branch that would roll WASM and geometry backward was not merged.
  • Tauri 2 packages the existing page. Windows produces an unsigned NSIS installer and a portable exe. Android produces a debug-signed APK. iOS has a script and a manual macOS workflow only. No IPA was built, and nothing here was installed on Windows, Android, or an iPhone.
  • Logarithms: ln is natural; unary log and lg stay base 10. Explicit bases are log_2(x), log_{2}(x), log₂(x), log2(x) when an argument follows, and log(2, x). log(2) and log 2 stay log₁₀(2). Invalid real regions are not drawn across.
  • The UI is Simplified Chinese or English. A Chinese browser locale starts in Chinese; otherwise English. The More menu has a compact switch saved in mathscrap.lang. Formulas, point names, saved sheets, and MCP tool names are not translated.
  • README.md is one file. Each Chinese paragraph is followed by its English translation.
  • GitHub Actions on ubuntu-latest runs lint, Rust tests, smoke, OCR smoke, AI/MCP smoke, pack checks, the sheet end-to-end test, and the per-formula plot end-to-end test. Packaging jobs then build the web bundle, the debug APK, and the unsigned Windows installer. The browser for end-to-end tests is resolved from CHROME_PATH, a Playwright cache, PATH, then common install paths.
  • Handwriting stays local: text gate, explicit recognition, bundled CoMER models, blank kraft sheet, and the small corner plot.

Limits

  • Windows binaries are unsigned. The APK is debug-signed, not a Play package.
  • Longer geometric explanations that are not in the on-screen glossary can still appear in Chinese. The engine and MCP still return that Chinese wording. The screen translates headings, groups, and listed reasons.
  • Verified green run for f312906cc7c83170c559b49ac12c7c09fb024704: test, web, android, and windows succeeded. Those artifacts were not installed on a device.

DNTOF and others added 30 commits November 1, 2026 15:10
Derive Heron area, angle-bisector ratios, excircle radii, and OI/OH
distances from sparse triangle givens. Map CoMER \\sum limits to braced
LaTeX and treat Σ-like ink as a formula cue so notes stay off kraft.
Emit Ceva products for medians, bisectors, altitudes, and Gergonne
contacts, plus a Menelaus transversal check. Derive skew-line distance
from four 3D points; treat z = c as a plane and report sphere–plane
intersection circles.
Verify Stewart for medians/bisectors in triangle_derived; emit line–plane
θ (∥/⊥) from 3D point pairs in planes_analyze; compute radical plane,
center distance, and intersection circle for sphere pairs in scene.
Angle-bisector length and power-of-a-point were already covered; add
Van Obel (incenter AI/ID=(b+c)/a) and Apollonius circles per vertex,
line–sphere intersection points in scene, clearer tetrahedron volume
label, and an explicit dihedral-angle fact beside plane–plane θ.
OI² = R(R−2r) was already exact; add Euler-line collinearity OG:GH=1:2
and nine-point circle. Descartes ± Soddy radii for three mutually
tangent circles; cylinder∥z ∩ plane ellipse semi-axes a=R/sinθ, b=R.
Keep Van Obel, Apollonius circles, and line–sphere from the stack.
Add the Euler division and nine-point circle, Stewart checks for
altitudes, the angle between skew directions, the foot of a point
on a plane, and the radical axis of two circles.

Co-authored-by: DNT_OF <allowcache@gmail.com>
Take the box tip for those three instead of a second Euler implementation.
Keep altitude Stewart, skew-line angle, plane feet, and the radical axis
of two circles alongside Van Obel, Apollonius, and line–sphere.

Co-authored-by: DNT_OF <allowcache@gmail.com>
…gram law

- Rectangle British flag PA²+PC²=PB²+PD² (origin check)
- Varignon midpoint parallelogram for any quad
- Circle radical axes + radical center of three
- Viviani for equilateral △ (3r=h) and regular tetra (4ρ=h)
- Vector parallelogram law |a+b|²+|a−b|²=2(|a|²+|b|²)
- WASM rebuilt; rust 51/51; smoke 91/91 + 19/19; smoke:ocr ok
- Cyclic quad: opposite angles → Ptolemy AC·BD = AB·CD+AD·BC
- Brahmagupta area √((s-a)(s-b)(s-c)(s-d))
- Napoleon outward equilateral centroids form equilateral
- Two-sphere radical plane: common chord 2ρ + intersection centre
- WASM rebuilt; rust 55/55; smoke 94/94 + 19/19; smoke:ocr ok
- Explicit |OH|² = 9R²−(a²+b²+c²) and |OI|² = R(R−2r) (distinct)
- Carnot: signed δ_a+δ_b+δ_c = R+r
- Morley trisector triangle equilateral
- Isogonal conjugates H↔O and I↔I
- WASM rebuilt; rust 56/56; smoke 96/96 + 19/19; smoke:ocr ok
Lift CoMER when an over-arrow, summation, or Greek name agrees with the ink. A lone sigma is the symbol and does not open the axes. Sums and integrals stay notation.

Co-authored-by: DNT_OF <allowcache@gmail.com>
DNTOF and others added 28 commits November 2, 2026 19:16
Land X(341)–X(350) as isotomics of X(269)/X(271)/X(275)/X(277)/X(278)/
X(279)/X(280)/X(281)/X(284)/X(291), with cevapoint/crosspoint/Hirst
identities where ETC lists them; right/equilateral guards for sec and a²−bc.
Land X(351)–X(358) (Parry-circle center, circum/Brocard inverses on the
Parry circle, Weill, Fuhrmann, Morley + Taylor–Marr perspectors) and add
X(359)/X(360) dual labels on existing Hofstadter Hf_1/Hf_0; equil/isos
guards where bary weights vanish.
Land X(361)–X(367) (X266-Ceva of I, congruent-circum / equal-perimeter /
Wabash equal-area isoscelizers, trilinear√ / √a / crosspoint(I,X366));
document skip of X(368)–X(370) (no closed barycentrics in ETC).
Land X(371)–X(380): Kenmotu dual-label X371, harmonic mate X372,
pedal centroids of G/X9/X10 (X373–X375), reflection of G in O (X376),
Euler intercepts X7X8/X6X7 (X377/X379), reflection of Exeter in O (X378;
skip right), and X1X19∩X9X55 (X380).
Land X(381)–X(390): midpoint(G,H) orthocentroidal center X381,
reflection of O in H (X382), Euler∩X14X98 (X383; skip isos),
Conway Euler X32X76 (X384), X2-Hirst of K (X385; skip equil),
Brocard-inverse of X58 (X386), X1X2∩X4X6 (X387), X1X4∩X7X8 (X388),
Taylor-circle center (X389), and reflection of Ge in I (X390).
Land X(391)–X(400): X2X6∩X8X9 (X391), X1X6∩X10X11 (X392),
tan²A X25-cross of H (X393; skip right), cos²A X69-Ceva of O (X394),
mid(X14,X16)/mid(X13,X15) (X395/X396; X395 equil→G),
crosspoint(H,X17/X18) (X397/X398), Parry reflection (X399),
and Yff–Malfatti sin A csc⁴(A/4) (X400).
Land X(401)–X(410) barycentrics: Bailey Hirst, Zeeman–Gossard p·y,
orthic-X36 mid(H,X186), Schiffler Euler harmonic, X1X6/X10X33 Euler
intercepts, X4×X225 crosspoint, X73X228 Euler cut, and X21/X29
1st-substitutions. Skip equil for X401–X403; skip right for tan/sec
centers X403/X406–X408/X410. Unit test on 6-7-8 / isos / equil / 3-4-5.
Land X(411)–X(420) barycentrics: X21/X29 2nd·3rd Euler substitutions,
X4-Hirst of X29 (via X21), X3-Hirst of X21 (via X29), X3-Ceva of
X185/X216, and X4-Hirst of X25/X427 (via X31/X38). Skip equil for
vanishing/Hirst weights; skip right for X29/sec/csc/tan centers.
Unit test on 6-7-8 / isos / equil / 3-4-5.
Land X(421)–X(430) barycentrics: X4-Hirst of X24/X28/X27/X451/X21
(via X47/X58/X81/X191/X283), Euler X19-4th-subst, complement of
X22, and Euler X38/X58/X81-5th-subst. Skip equil for vanishing
Hirst weights; skip right for tan/sec centers.
Unit test on 6-7-8 / isos / equil / 3-4-5.
Land closed barycentrics for X(431)–X(440) on the Euler-line band:
X283-5th, X155/X159/X195/X399-6th, X48-7th, X214-8th, X204-9th,
X193-10th, and complement of X(27). Guards: skip right for tan/sec
forms; skip equilateral for X437 (X214 tril vanishes).
Land closed barycentrics for X(441)–X(450): complement of X(297)/X(21)/X(452),
Euler∩X(19)X(232), Euler X(79)-11th-subst, crosspoint X(98)·X(511),
X(2)-Hirst of X(27)/X(21)/X(452), and X(3)-Hirst of X(4). Guards: skip right
for tan/sec forms; skip equilateral for ω/Hirst-vanishing centers.
Bundle the existing sheet, CoMER ONNX, and mathcore WASM in a Tauri shell that does not call the Vite server. Android debug APKs are arm64 and debug-signed; Windows and iOS builds stay on the machines that can sign them.

Co-authored-by: DNT_OF <allowcache@gmail.com>
The copy step was also picking up Cargo build-script executables from target/release.

Co-authored-by: DNT_OF <allowcache@gmail.com>
Explicit-base logarithms keep ln natural and unary log/lg as log10.
The sheet UI follows the browser locale with a saved compact switch.
README pairs each Chinese paragraph with its English translation.
GitHub Actions runs lint, Rust, smoke, OCR, AI, pack checks, and the sheet e2e.

Co-authored-by: DNT_OF <allowcache@gmail.com>
The production check rejected every installer because the page bundle
contained the local dev-server address. That address now stays in the
dev-only forwarder, which the production build does not import.

English mode translates geometry headings, groups, and listed reasons
on screen. Formulas, point names, and the engine payload stay as emitted.
The plot end-to-end run is part of the Actions test job, and its pixel
check counts dark ink on the kraft sheet.

Co-authored-by: DNT_OF <allowcache@gmail.com>
@DNTOF
DNTOF merged commit de08250 into main Nov 7, 2026
8 checks passed
@cursor
cursor Bot deleted the cursor/mathscrap-packaging-0e28 branch November 7, 2026 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant