Commit Graph

4 Commits

Author SHA1 Message Date
Alex Lytvynenko c16cb486ef fix: sweep FFI admits analytic line/circle subclasses for Extrude
check_curve rejected LineSegment/AnalyticCircle whenever the call takes
an SmBSplineCurve, and the shim add_bspline rejected kinds
CK_LINE_SEGMENT/CK_ANALYTIC_CIRCLE outright. But upstream SmLine :
public SmBSplineCurve (SmLine.h:49) and SmCircle : public SmEllipse :
public SmBSplineCurve (SmCircle.h:59, SmEllipse.h:243), and
CreateLinearSweep accepts const SmBSplineCurve& and extrudes its NURB
(SmBSplineSurface.cpp:1588-1629, NURB obtained at 1616-1617) - the
guard blocked valid Extrude inputs. Admit the two real subclasses for
the Extrude call only (shim verified to construct real SmLine/SmCircle
objects, not B-spline stand-ins); BSplinePosWeights needs keep the
existing restriction; null/finite/radius/hazard guards unchanged.
Update the misleading docs and add stub-based FFI tests: both
extrusion examples reach the solver with exact dispatch payloads; null
curve, nonfinite coordinates/direction and nonpositive radius stay
rejected; non-Extrude bspline needs stay restricted.

Co-Authored-By: GPT-6.1 Sol Fast <noreply@openai.com>
2026-10-25 15:25:03 +01:00
Thijs Damsma 980014d1df fix: finish primitive rotational cleanup with real owner identities
Forward the production model's face deletion through the landed caller-keyed intersector. Detach the revolution API's actual first owned surface, matching the native GetSurfaces/SetOwner sequence, and compare its domain plus virtual point samples instead of rejecting successful output.

Primitive p3 now has 295 exact native passes and no deferrals; sweep API gains 17 passes with three honest downstream deferrals. Preserve all old comparable records, guards and tolerances.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-23 12:39:44 +02: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 7423d1b908 port: sweep.api_surfaces (partial)
SM_API surface and skin entry points (SmApiSurfaces.cpp, SmApiPrimitives.cpp):
extrude, sweep, ruled and skinned surfaces are ported and bit-identical to the
C++; skin primitive, skin from faces and surface of revolution validate and
copy their inputs as upstream, then stub SmPrimitiveCreation (deferred).
Adds the C++ shim, FFI binding, difftest runner and upstream-derived fixtures,
and records UB-74 (SmApiCreateSkinFromFaces with no faces segfaults).

difftest: cases=823 passed=774 failed=0 deferred=49

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