Commit Graph

5 Commits

Author SHA1 Message Date
jijinbei 4418ba3204 shim: share flg(SmBoolean), put_ivl and put_mat through sc_sm.h
Adds the three helpers to sc_sm.h, copied from the per-shim copies they
replace, and switches 19 shims to the shared flg/put_mat/put_vec/put_ivl/st/
put_dom. Shims touched by open PRs are left alone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 11:00:12 +09: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
bherbruck 6b2108e0ad merge origin/main; wire surface.bend_volume into surface.volume_p2
- Resolve conflicts: geom::tol test (Base volume now has a box), findings and
  upstream-issues (this unit's entries renumbered UB-83, UB-84, WR-62 after main
  took UB-78, UB-79, WR-55).
- Dispatch the bend overrides (EvaluateBoundingBoxSimple, GlobalPointSolveSimple,
  LocalPointSolveSimple, ReadFromDB); SmBendVolume::ReadFromDB reads the base data;
  a bend's Evaluate writes its own image before its next map fails.
- Shim builds default and component bends (kinds 6, 7); generator and
  fixtures/surface.volume_p2/bend.json (5014 cases) cover them.
- Bend and unbend ReadDb FFI guards apply the strict text grammar of the base read.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:32:42 -04:00
bherbruck 74cba490d1 merge origin/main; wire surface.unbend_volume into surface.volume_p2
Main merged surface.unbend_volume (PR #20), which co-ported
SmVolume::EvaluatePoint and IsPointInParamDomain. Those co-ports are
replaced by this unit's versions. The unbend overrides and
SmUnbendVolume::ReadFromDB are now dispatched, and the unbend reader
reads the base data. A failed compound EvaluatePoint of an unbend now
keeps the unbend's own image, as it does for a twist.

Also wired: the UNPORTED(surface.volume_p2) stubs in
intersect::point_class.

The shim builds component-constructed unbends. The FFI guard accepts an
unbend box mapping only on the caller's own box, with no side shorter
than 1e-9. New fixtures: unbend.json (2290 cases).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 23:53:43 -04:00
bherbruck 56fd50b2bd port: surface.volume_p2 (SmVolume part 2)
Compound domain checks of lines and boxes, EvaluateBoundingBox / MapPseudoBox,
the base box samplers, EvaluatePoint / Evaluate1stDerivatives, the inverse point
maps and solvers (InvEvaluatePoint, InvMapPoint, GlobalPointSolve and the simple
Newton solvers), HasDiscontinuities and the polymorphic ReadFromDB.

Shim, FFI binding (with a call-path model of upstream's null pseudo-box UB and a
strict ASCII grammar for ReadFromDB), difftest runner and fixtures. Wires the
UNPORTED(surface.volume_p2) stubs in geom.transform, surface.twist_volume,
curve.crv_in_volume and geom.tol; geom.transform and surface.twist_volume become
green.

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