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
1. The constructor stores its SmZoneTol3d as is (no second conversion:
-SM_USE_DEFAULT stayed 9876543.21 upstream and became 1e-5 here).
2. MergeIntoObject calls SmVertex::SetTolerance(sFinalZoneTol3d) as the
SM_USE_OLDTOL reference build does (UNPORTED(topology.vertex) stub);
comment fixed.
3. Region, faceuse, loop, loopuse and vertexuse have no GetTolerance
override: SmTopology::GetTolerance, SM_ZONE_TOL_3D; a faceuse uses
SmTopology::IsConnectedTo, FALSE (topology.topology, green). Loop, loopuse
and vertexuse do override IsConnectedTo and stay stubs.
4. The ffi accepts SetClassObject(class, NULL) for every class.
Optional: loads read up to offsets 9/8/7 by kind (10 parameters); real
SmEllipse/SmCircle curves in the shim; curve tolerances through Curve::edge
(ClassGeometry::owner_of); ComputePointParameters doc (SM_SO_MINIMIZE).
New fixtures: every class with NULL, -SM_USE_DEFAULT tolerances, max
offsets, conic projections. difftest: 2511 cases, 2197 pass bit-identical,
0 fail, 314 deferred (topology.shell gone). Upstream issues UB-79, WR-58.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SmPointClassification (SmPointClass.cpp/.h) in intersect::point_class: state,
Combine precedence, ComputePointParameters (curves via Curve::drop_point),
FindObjPoint3d, GetGap3d, LoadFromIntersection, MergeIntoObject (vertex
neighbourhood merge), the SmTol point-classification overloads and the
SmSpaceBend/SmSpaceUnbend type queries. Topology, surface point solve and
volume paths are UNPORTED stubs.
Shim, ffi wrapper, difftest runner (scripts over an object pool) and 479
edge-case fixtures. difftest: 2479 cases, 2123 pass bit-identical, 0 fail,
356 deferred -> partial. Back-edges wired in geom::tol and
surface::trim_srf_cache.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>