Commit Graph

5 Commits

Author SHA1 Message Date
Thijs Damsma 215d429d0c Merge origin/main into surface/torus-intersect-with-plane
Resolve conflicts with #498 (Sphere/Torus TrimWithDomain) in the torus
shim, FFI unit, difftest runner and module docs: keep both PRs' ops
(trim 10; plane 11, 12).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9QwJFBTKLZ9FFK3nVd1X4
2026-10-22 08:55:54 +02:00
Thijs Damsma c668b6c029 surface: Torus IntersectWithPlane (#76)
SmTorus inherits SmSurfOfRevolution::IntersectWithPlane, whose sweep iso
circles (a plane normal to the axis) come from the virtual
CreateIsoParametricCurve. intersect_with_plane_owned_using takes that hook;
Torus::intersect_with_plane passes the torus's iso circles.
SurfaceKind::Torus dispatches IntersectWithPlane to it, and its
GlobalSurfaceIntersect takes the plane special case (the plane's face
tolerance for its box), then the general intersection when it needs more.
surface.torus difftests IntersectWithPlane and GlobalSurfaceIntersect with
planes through, normal to and oblique to the axis.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9QwJFBTKLZ9FFK3nVd1X4
2026-10-22 08:20:58 +02:00
Thijs Damsma b444b16fea surface: Sphere/Torus TrimWithDomain (#76)
SmSphere and SmTorus inherit SmSurfOfRevolution::TrimWithDomain; its
virtual ConvertUVFromNURBSToSTEP (UpdateAnalyticalDomain) and
CreateIsoParametricCurve (MakeNurb, Reparameterize, RebuildPolarConverter)
now reach the sphere/torus overrides through trim_with_domain_using, and
SurfaceKind::Sphere/Torus dispatch to it instead of a dispatch gap.
surface.sphere and surface.torus difftest a TrimDomain op.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9QwJFBTKLZ9FFK3nVd1X4
2026-10-22 07:35:08 +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
Andreas b0b634e328 surface.torus: port SmTorus with difftest runner
Torus construction (CreateCanonical/MakeNurb), operator==, Copy, offset,
STEP/NURB conversions, STEP evaluation, iso circles,
RebuildSTEPFromNURBParameters, Transform and ReadFromDB (the last two end
in the unported SmSurfOfRevolution part). SurfOfRevolution's NURB and
polar-converter rebuilds take the iso-curve maker so the torus override is
used, as upstream's virtual call. Surface::read_from_db reads the torus
record before the unported base record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 07:29:03 +02:00