Commit Graph

4 Commits

Author SHA1 Message Date
Federico Dal Maso 062449bf02 fix(surface): reimplant polygon edges when trimmed cache nodes split
Retain polygon-edge endpoints, tolerance and original surface for child implantation. Preserve native parent lists and child ordering, including handle remapping. Add 130 differential cases and regression coverage for geometry updates.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-25 22:29:34 +01:00
jijinbei 875291c4d9 shim: share identical C++ helpers through sc_sm.h, sc_nlib.h, sc_gw.h
125 shims carried private copies of the same small helpers (put_vec, st,
nl_status, Rd, dump_crv, read_nurb, ...). Move the most common, byte-identical
form of each into three headers grouped by the upstream API they need, and have
those shims pull them in with `using sc::<name>;`. Shims with a different
variant keep their own copy; files touched by open PRs are left alone.
`the_context()` stays per shim (its function-local SmContext must not be shared).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FBLgPenT24P1dunqnZR1Dj
2026-10-17 06:43:03 +09:00
Claude 5acb2c8ae4 surface.surface_cache_p3: review fixes (boundary edge uses on a split, planes, dispatch gaps)
- SubdivideNode: split into SurfaceCache::subdivide_node_split plus the base class
  ending; TrimSrfCache splits through its own subdivide_node, which re-implants a
  boundary parent's edge uses into the children with TrimSrfCache::implant_edgeuse
  (needs SmEdgeuse::GetUVTrimCurve: those cases defer on topology.edgeuse_p1; poly
  edges on query.poly) instead of dropping them through the base ImplantEdgeuse.
- trim_srf_cache shim and runner: ImplantEu prints every node of the tree (the
  children subdivisions make included); fixture implant_then_split_boundary_leaf.
- FFI accepts planes where it asked for a B-spline cache (an SmPlane is an
  SmBSplineSurface); the generator uses them; the tolerance test reads a plane's
  NURB through base_for_query (found by the new plane cases).
- DISPATCH GAP comments for GetTree's virtual BuildTree and SubdivideNode's GetTree;
  the bare-tree patch data reads (geom.tree, geom.grid, surface_p2) are dispatch
  gaps tagged with their owning units, not surface.surface_cache_p3.
- Stale docs and notes fixed; findings for the review points.

surface.surface_cache_p3: 445 pass, 0 fail, 155 deferred, --perturb 445/445.
surface.trim_srf_cache: 526 pass, 0 fail, 95 deferred, --perturb 526/526.
difftest --green: 117 units, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RsMto2bEoBSCSCJku4nT4u
2026-10-14 03:30:38 +00:00
bherbruck 152e0055a8 WIP surface.trim_srf_cache: interrupted port (swarm stopped for handoff)
Not verified: fmt/clippy/tests/difftest have not been run on this state.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V8ohWGLCzFPoZriCeSSero
2026-10-13 04:05:13 -04:00