Commit Graph

609 Commits

Author SHA1 Message Date
bherbruck c39c1fd388 wip: surface.surface_point_solve_p2 port, shim, ffi, runner
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 15:58:48 -04:00
bherbruck c685538729 Merge origin/main and fix/main-surfofrev-match (#68) into unit/surface.surface_point_solve_p2
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 15:23:54 -04:00
bherbruck fdc9db17b7 fix main build: handle SurfaceKind::SurfOfRevolution in surface_point_solve::p1 and surface_intersector::p3
PRs #58 and #56 merged after the SurfOfRevolution surface kind landed, leaving
four non-exhaustive matches, so main does not compile:
- SurfacePointSolver:🆕 a surface of revolution is an SmBSplineSurface
  upstream, so m_pBSplSrf is its base B-spline.
- is_on_seam / IsSingularity: SmSurfOfRevolution overrides neither, so they
  stay the unported base SmSurface bodies.
- drop_to_iso_curve: SmSurfOfRevolution overrides CreateIsoParametricCurve.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 15:23:40 -04:00
bherbruck b2d3adb428 Merge pull request #64 from bherbruck/p9-guards
surface.surface_p9: narrow FFI guards to what the C++ can't handle; extra fixtures
2026-10-14 15:11:36 -04:00
bherbruck 1c86306ff7 Merge pull request #40 from bherbruck/unit/surface.plane_p2
port: surface.plane_p2
2026-10-14 15:07:50 -04:00
bherbruck 4e66c14326 Merge pull request #56 from bherbruck/unit/intersect.surface_intersector_p3
port: intersect.surface_intersector_p3
2026-10-14 15:02:57 -04:00
bherbruck 659d217b15 Merge pull request #58 from bherbruck/unit/surface.surface_point_solve_p1
port: surface.surface_point_solve_p1
2026-10-14 15:02:02 -04:00
bherbruck e8462b32eb surface.surface_p9: narrow FFI guards to what the C++ can't handle; extra fixtures
Follow-up to #6. The FFI guard now only requires finite values for the
net scale, chord height, maximum side, line and CSI domain (disjoint,
touching-edge and sliver early exits are compared). It keeps the [0,1]
split/iso domain, the angle range, the revolution-CSI rejection and the
shim's all-degenerate max-side guard, and adds max|net|/max side <= 1e5
so the ULONG split count stays finite and under the Rust 1e6 limit.

43 new fixtures (CSI domain disjoint/touching/sliver, 1e6-scale nets,
chord heights 1e-4/1e-5, max side 1e3/1e6) pass bit-identically or
defer on surface.surface_p6. The max-side iso degeneracy test now uses
the typed iso curve (SmEllipse/SmLine IsDegenerate), as upstream's
virtual call does. Notes: CsiGlobalSolver field CO-PORTED record in
surface.surface_p1; duplicate review sentences removed from
surface_cache_p2/p3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 14:53:59 -04:00
bherbruck dd078a5909 Merge origin/main into unit/surface.plane_p2
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 14:48:29 -04:00
bherbruck 123c7bb7d1 Merge origin/main into unit/intersect.curve_class_p1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 14:35:30 -04:00
bherbruck 9931d56386 Merge pull request #6 from 0xlillith/unit/surface.surface_p9
port: surface.surface_p9
2026-10-14 14:34:23 -04:00
bherbruck d764141ad7 Merge origin/main into unit/intersect.curve_class_p1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 14:27:45 -04:00
bherbruck 2475483f01 Merge origin/main into unit/intersect.curve_class_p1
Resolve conflicts in geom/tol.rs (keep surface.surface_p1's CO-PORTED note and
this unit's classification mappings) and plan/findings.md (keep both).
Handle the new SurfaceKind::SurfOfRevolution (SmBSplineSurface base flag) and
Step variants in out_of_bounds. Wire SmTol::GetZoneTol3d(SmSurface),
smsurf_GetSurfaceCache and SmSurface::ApproximateSize to surface.surface_p1:
2088 cases, 1908 pass, 0 fail, 180 deferred (52 moved to surface.surface_p6).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 14:27:16 -04:00
bherbruck 9a0f51c281 Merge origin/main into unit/surface.plane_p2
Run the SmAdvSurfaceIntersector from intersect.adv_surface_intersector (#41)
in base_global_surface_intersect, keeping the SmPlane override dispatch.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 14:24:24 -04:00
lillith 7842bfa043 Merge the volume port and verify the integrated workspace
All local gates pass against the updated main. Full differential validation
evaluates 134 units: 87 green, 47 partial and zero failed. The three part-9/cache
reports remain byte-identical to their focused and committed reports.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-14 20:21:09 +02:00
bherbruck 8bc48a4271 Merge origin/main into unit/surface.plane_p2
Keep both sides' SurfaceKind arms (Plane overrides from this unit; the
SurfOfRevolution and Step kinds from main). Add the SmPlane::GlobalSurfaceIntersect
SurfOfRevolution case (orders and UV curves swapped, as upstream), which needs
&Kernel on Surface::global_surface_intersect / intersect_with_plane. Wire the
plane box zone tolerance to Surface::face (surface.surface_p1 is partial):
a plane with a face now defers on SmFace::GetTolerance (topology.face_p2).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 14:16:03 -04:00
bherbruck ee38fe980b Merge pull request #41 from bherbruck/unit/intersect.adv_surface_intersector
port: intersect.adv_surface_intersector
2026-10-14 14:15:42 -04:00
lillith 6838bb1f76 Merge latest main and validate revolution surface dispatch
Use the newly ported revolution surface's virtual iso constructor and B-spline
base. Add 18 direct canonical-cylinder comparisons against the real C++ class.
Refresh cache reports after the upstream dispatch changes and retain explicit
CSI and classification deferrals.

All required local gates pass; full differential validation covers 133 units
with 85 green, 48 partial and zero failed. Part 9 compares 727/778 cases exactly.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-14 20:10:40 +02:00
lillith 94172ba691 Merge main and share the curve/surface solver with surface part 1
Remove the duplicate CSI state, preserve the existing part-1 constructor and
wire its surface/node/point validity helpers. Add 16 real-plane fixtures without
diagonals and refresh differential reports after the main integration.

Part 9 compares 709/760 cases, cache part 2 808/905 and cache part 3 450/600;
all compared values are identical and all remaining deferrals name their owner.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-14 19:56:28 +02:00
bherbruck 8d2ac236ab Merge origin/main into unit/surface.volume_p2
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:53:17 -04:00
bherbruck db294c4230 Merge origin/main into unit/intersect.adv_surface_intersector
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:48:27 -04:00
bherbruck 4b27d8afa3 Merge origin/main into unit/intersect.adv_surface_intersector
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:48:20 -04:00
bherbruck a972c8978a Merge origin/main into unit/surface.volume_p2
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:25:11 -04:00
bherbruck 904057fa59 Merge origin/main into unit/surface.surf_of_revolution_p3
Resolve against surface.surface_p1 (#43) and surface.cone_p1 (#31): keep both
SurfaceKind variants (SurfOfRevolution, Step) in every match, give the
surface of revolution its SmSurface dispatch in surface::surface::p1
(EvaluateSTEP override, inherited SmBSplineSurface bodies), share one
ConvertDomainFromNURBSToSTEP body, and wire the cone's SmSurfOfRevolution
Transform/ReadFromDB back-edges. surface.torus becomes green.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:20:02 -04:00
bherbruck 2afdcdb1fe intersect.curve_class_p1: review fixes (clippy with cpp, adversarial fixtures)
Fix the 11 clippy errors in the runner that the CI "Clippy with the C++
feature" step reports (identical match arms, needless range loop, unchecked
indexing, range_plus_one, default_trait_access) without changing the RNG
call order, so the generated cases are unchanged. Add the reviewer's 75
adversarial cases as fixtures (UV trim curves, huge/tiny scale, analytic
source curves, containers past MIN_ARRAY_SIZE). Tidy a comment rustfmt
had misindented in get_cci_surface_gaps.

PARTIAL cases=2088 passed=1908 failed=0 deferred=180; --perturb 1908/1908.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:19:38 -04:00
bherbruck 0dabb6cb14 Merge remote-tracking branch 'origin/main' into unit/intersect.surface_intersector_p3 2026-10-14 13:16:39 -04:00
bherbruck b6f63658bc intersect.surface_intersector_p3: fetch caches with smsurf_GetSurfaceCache, report, status partial
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:16:29 -04:00
bherbruck fc5e69fbd7 Merge origin/main into unit/surface.surface_point_solve_p1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm

# Conflicts:
#	plan/upstream-issues.md
2026-10-14 13:11:12 -04:00
bherbruck cc059835b7 Merge origin/main into unit/surface.surf_of_revolution_p3
Adapt to #23's SweepIsoFn polar-converter rebuild (transform_using for
derived classes) and wire surface.torus's SmSurfOfRevolution::Transform
and ::ReadFromDB back-edges.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:02:27 -04:00
bherbruck 2697577db6 Merge pull request #31 from bherbruck/unit/surface.cone_p1
port: surface.cone_p1
2026-10-14 13:02:12 -04:00
bherbruck 250c3975f1 Merge origin/main into unit/surface.surface_point_solve_p1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:00:42 -04:00
bherbruck a0b6150524 port: surface.surface_point_solve_p1
The problem data (SmSurfacePointSolver), the global solver's helpers
(closure cache, objective, control-net triangle and leg guesses, seam,
stride, extremum and boundary tests) and the local stepper's pieces
(construction, copies, lazy evaluation, clamping, boundary hits, bounds
check, iso-curve drop) of SmSurfacePointSolve.cpp, with the static
control-net helpers.

The shim compiles the upstream file itself (its classes are file-local),
renaming the classes and SmSurface's two point-solve members.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:00:37 -04:00
bherbruck 75c25eadd4 Merge remote-tracking branch 'origin/main' into unit/intersect.surface_intersector_p3 2026-10-14 13:00:11 -04:00
bherbruck c010d337d3 intersect.surface_intersector_p3: C++ shim, ffi binding, difftest runner and fixtures
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 13:00:10 -04:00
bherbruck cc615c9800 Merge origin/main into unit/surface.volume_p2
Renumber this unit's upstream issues to UB-85/UB-86 (main took UB-83/84).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:58:26 -04:00
lillith 4fe1abbca0 Merge origin/main into surface.surface_p9 review fixes
Include the newly merged topology solver port before full validation.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-14 18:35:57 +02:00
lillith dbcd3248f5 port: fix surface.surface_p9 review regressions and merge upstream main
Use EFF_ZERO for default degeneracy checks and forward maximum side lengths,
including negatives, to bisection tessellation. Add boundary, subdomain, tiny-scale
and real analytic plane comparisons, narrow the C++ undefined-count guard, and
wire surface-cache block subdivision with the caller Kernel.

Co-Authored-By: OpenAI Codex <noreply@openai.com>
2026-10-14 18:35:21 +02:00
bherbruck 885dc45f0b Merge origin/main into unit/surface.surface_p1
Brings in intersect.topology_solver_p1 (PR #30).

- topology_solver sm_GetFaceSilhouettes: wire the UNPORTED(surface.surface_p1)
  stub. It now builds the cache with smsurf_GetSurfaceCache (the 3-argument
  port), checks HasCachedCurves(SM_AS_TRIMMED_SILHOUETTE, 10 * tol, 20 deg,
  view vector, FALSE), and calls CreateSilhouetteCurves over the face's UV
  domain (a non-B-spline surface, a NULL SM_CAST_PTR upstream, is an
  error). It then stops at UNPORTED(topology.face_p2):
  SmFace::CreateCurvesByTrimming.
- Renumber this unit's upstream issues UB-80/UB-81 to UB-83/UB-84. Main's
  surf_of_extrusion_p1 and topology_solver_p1 entries already use UB-80/81.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:33:47 -04:00
bherbruck 542ad11b50 Merge remote-tracking branch 'origin/main' into unit/surface.volume_p2 2026-10-14 12:32:48 -04:00
bherbruck 6b2108e0ad merge origin/main; wire surface.bend_volume into surface.volume_p2
- Resolve conflicts: geom::tol test (Base volume now has a box), findings and
  upstream-issues (this unit's entries renumbered UB-83, UB-84, WR-62 after main
  took UB-78, UB-79, WR-55).
- Dispatch the bend overrides (EvaluateBoundingBoxSimple, GlobalPointSolveSimple,
  LocalPointSolveSimple, ReadFromDB); SmBendVolume::ReadFromDB reads the base data;
  a bend's Evaluate writes its own image before its next map fails.
- Shim builds default and component bends (kinds 6, 7); generator and
  fixtures/surface.volume_p2/bend.json (5014 cases) cover them.
- Bend and unbend ReadDb FFI guards apply the strict text grammar of the base read.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:32:42 -04:00
bherbruck ee06b5f093 intersect.surface_intersector_p3: port FindBoundaryStartPoints, ComputeNextPoint, TestPoint, sm_UpdateTsectPoint, SplitSpan (WIP)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:27:55 -04:00
bherbruck 5609354287 Merge remote-tracking branch 'origin/main' into unit/intersect.curve_class_p1 2026-10-14 12:23:59 -04:00
bherbruck ad106a7e56 port: intersect.curve_class_p1 (partial)
Verify the WIP after merging origin/main: retag the non-B-spline SmCrvOnSurf
stub to surface.surface_p1 (curve.crv_on_surf is partial; its own dispatch
defers to surface_p1), drop a dummy constant, set status partial.

difftest: 2013 cases, 1853 pass, 160 deferred, 0 failed, max_rel_err 0.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:23:41 -04:00
bherbruck 3850b06b0f Merge origin/main into unit/surface.surface_p1
Brings in surface.surf_of_extrusion_p1 (PR #28). Its 56 STEPInversion
deferrals now get past surface.surface_p1 and stop in surface.surface_p4
(GlobalPointSolve, 30) and surface.surface_p5 (LocalPointSolve, 26);
report and note updated, still 1958 pass / 97 deferred / 0 failed.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:22:16 -04:00
bherbruck ad45009843 Merge origin/main into unit/surface.cone_p1
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:21:45 -04:00
bherbruck 0d14cef52f Merge pull request #30 from bherbruck/unit/intersect.topology_solver_p1
port: intersect.topology_solver_p1
2026-10-14 12:21:21 -04:00
bherbruck ba9f636a6a Merge #43 (surface.surface_p1) into unit/surface.surface_point_solve_p1
Builds on the open port: surface.surface_p1 PR, a hard dependency.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:14:10 -04:00
bherbruck 4dea51279e Merge remote-tracking branch 'origin/main' into unit/intersect.curve_class_p1 2026-10-14 12:13:35 -04:00
bherbruck 1ee2d8bd71 Merge pull request #28 from bherbruck/unit/surface.surf_of_extrusion_p1
port: surface.surf_of_extrusion_p1
2026-10-14 12:11:52 -04:00
bherbruck 562e491ee9 Merge origin/main into unit/surface.surface_p1
Brings in surface.torus (PR #23). Conflict in surface/surface/p2.rs
imports: keep both StepSurface and Torus.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BY8UpXKuMci15rAWGXsbsm
2026-10-14 12:03:06 -04:00