Commit Graph

7 Commits

Author SHA1 Message Date
Brett Lawson ff5c42371d Difftest IsNurbSurfaceCylinder and IsNurbSurfaceTorus against C++; record WR-493
New shim ops (surface.cone_p2 OP_RECOGNIZE_CYLINDER, surface.torus
OP_IS_NURB) and fixture-only runner ops: 77 cylinder cases (the issue's
r 5 about +Z, partial/full turns, both UV orders, scaled, tiny, cones,
tapers, twists) and 126 torus cases (the issue's R 10 r 3, partial
domains below the equator and past 180, scaled, tiny, horn/spindle,
perturbed and anisotropically scaled NURBS), flags off. WR-493 records the
fork's 7ea6a96; a WR-408 addendum covers IsNurbSurfaceTorus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtgaA54W2nr8dK1EYp
2026-10-29 01:23:05 +01:00
Brett Lawson a359870582 difftest: lazy NURB const-make cases for sphere, torus and surface of revolution
Build each kind without MakeNurb in the shim and in Rust, run the const natural-domain
query that makes the NURB lazily, then point/normal evaluations at the domain corners,
Copy, == and Transform, comparing has-NURB, the NURB data and evaluations. Cases cover
swap/inside-out, partial domains, sphere caps ending at a pole, a torus with minor radius
equal to and above the major radius, and revolutions about an axis touched or crossed by
the generator.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SdcgEtgaA54W2nr8dK1EYp
2026-10-28 07:44:44 +01:00
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