Commit Graph

2 Commits

Author SHA1 Message Date
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 e80899798f nlib.geom: port NL_Geom vectors, lines, planes, distances, matrices and NL_FrameBasic bounding boxes
Rust: crates/solidcore/src/nurbs/geom.rs (64 upstream functions).
Shim, FFI wrapper, difftest runner and 173 fixture cases derived from
TestSmCreateRectangle, TestSmCreateRegularPolygon, my_test_surface_closest_point,
my_test_reversed_line_join and my_test_matrix, plus 3000 generated cases.
difftest: 3173/3173 pass, bit-identical.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-12 15:57:47 -04:00