Skip to content

Independent tessellation fork (MOI-style n-gons + feature spans) - #59

Draft
jmossymoss wants to merge 10 commits into
mainfrom
cursor/independent-tessellate-b00c
Draft

Independent tessellation fork (MOI-style n-gons + feature spans)#59
jmossymoss wants to merge 10 commits into
mainfrom
cursor/independent-tessellate-b00c

Conversation

@jmossymoss

@jmossymoss jmossymoss commented Aug 21, 2026

Copy link
Copy Markdown
Owner

This branch is a documented fork of Weft’s mesher so we can test MOI / Plasticity-style tessellation without changing the border-contract generate() goldens.

Direction: import → analyze → weft::meshIndependent() → export. Planar n-gons from shared samples, UV lattices on simple drums/spheres, transfinite on 4-sided patches, UV ear-clip elsewhere. generate() stays the default CLI and corpus path.

Try it:

build/cli/weft mesh tests/STEP_Examples/mp9_Edited.stp -o /tmp/mp9.obj --independent --profile cad --validate

Windows:

build.bat
independent.bat
independent.bat cli mesh demo.step -o demo.obj --validate

independent.bat launches weft_app --independent (Topology checkbox on, bake/export through meshIndependent). dev.bat without that flag still uses generate(). --independent is not saved in recipes.

T0 evidence (Release): ctest -R independent_mesh passes (box, cylinder, hole, fillet, sphere closed).

MP9 (3052 faces): completes in 8985 ms, 28859 verts, 33680 polys (9457 quads, 23435 tris, 788 n-gons). Unexplained opens 2413 (was ~19677 with OCCT snap). Three empty 2-edge planar slivers. Remaining cracks are high-edge-count plates/freeform.

Notes in docs/evidence/independent-mp9-2026-08-21.md.

Windows CI on this fork now requires compile, independent_mesh/bake_queue/topology_cache/geometry_pool, cylinder --independent CLI smoke, and signature determinism. Job-level continue-on-error is removed so that gate is real. Legacy generate() pipeline/corpus/release/signature-compare steps stay non-blocking.

Not in this PR: default app path is still generate() until T3, boolean grouping (T2), corpus still on generate() (T4).

Open in Web Open in Cursor 

cursoragent and others added 10 commits August 21, 2026 16:11
Product path is MOI-style angle/chord meshing with planar n-gons and
per-feature spans. Legacy generate() stays for A/B and corpus goldens.

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
Planar single-wire faces become n-gons, drums use a UV grid from local
span requests, other faces use OCCT tessellation snapped to shared edge
samples. CLI --independent selects this path without changing generate().

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
Planar holes keep a keyhole n-gon, 4-sided patches use transfinite
grids, and leftover curved faces ear-clip in unwrapped UV so every
border vertex is a shared sample. Full-period and pole spheres get a
UV lattice. This is the path that can weld watertight on MP9.

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
unwrapUv always evaluated the period, which throws Standard_NoSuchObject
on planes and ordinary BSplines. Catch leftover OCCT failures per face
so one bad chart cannot abort the model.

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
…rums.

Simple 3–4 edge cylinders and spheres still get a revolution lattice.
Boolean-split drums and torus fillets fall through to exact-sample
transfinite or UV ear-clip so rims can weld. Skip Steiner interiors
that were folding freeform fills.

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
Booleaned cylinders often carry inner wires. If the bridged UV ring
does not clip, keep the exact sample loop as a fan so rims still weld
instead of falling through to OCCT.

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
MSVC now defines _USE_MATH_DEFINES so M_PI is visible. ctest runs
topology_signature through bash instead of CreateProcess on a .sh
file. The Windows job compiles and gates on independent_mesh, CLI
--independent smoke, and signature determinism; legacy generate()
pipeline/corpus steps stay non-blocking.

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
weft_app --independent (and the new bat) set the session flag, dispatch
bake/export through meshIndependent(), and show it in Topology. Default
weft_app still uses generate(). Recipes do not persist the flag.

Co-authored-by: jmossymoss <jmossymoss@users.noreply.github.com>
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.

2 participants