Files
solvecraft/solidcore/plan/units/intersect.api_intersectors.toml
Brennen Herbruck 916b91e8d0 Vendor solidcore at solidcore/ with its history (solidcore c0d3cc0124)
solidcore's main at c0d3cc0124, rewritten to one commit per same-author run per
PR (2,800 commits, author credit kept; tree identical). Full original history:
tangency-labs/solidcore archive/full-history.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

git-subtree-dir: solidcore
git-subtree-mainline: 44525da669
git-subtree-split: c440e5f892
2026-11-08 15:18:40 -05:00

13 lines
4.9 KiB
TOML
Vendored

id = "intersect.api_intersectors"
upstream = ["source/SM_API/src/SmApiIntersectors.cpp"]
rust_module = "intersect::api_intersectors"
depends_on = ["curve.curve_p2", "curve.curve_p8", "curve.curve_p9", "query.face_p2", "surface.surface_p2", "surface.surface_p8", "topology.face_p3", "topology.brep_p1"]
soft_depends_on = []
est_lines = 200
layer = 48
tests = ["tests/SM_API_test/src/TestSmIntersectors.cpp:TestSmIntersectCurves", "tests/SM_API_test/src/TestSmIntersectors.cpp:TestSmIntersectSurfaces", "tests/SM_API_test/src/TestSmIntersectors.cpp:TestSmIntersectBreps", "tests/SM_API_test/src/TestSmIntersectors.cpp:TestSmIntersectCurveSurface", "tests/SM_API_test/src/TestSmIntersectors.cpp:TestSmIntersectCurveFace", "tests/SM_API_test/src/TestSmIntersectors.cpp:TestSmIntersectCurveBrep"]
status = "partial"
claimed_by = "fixer-4 (SM_API wrapper batch 2)"
claimed_at = "2026-10-29"
notes = "[2026-11-04 (#2400): PARTIAL, 1 known mismatches: the blend corner is the default and the old corner code is deleted, so these cases no longer agree with C++ v1.0.1's pinned corner (plan/findings/blend.fillet_corner_p3--blend-corner-default-diverges-from-cpp-v1-0-1-2026-11-04.md)] NOT IN callgraph/units.json: SmApiIntersectCurves (SmApiIntersectors.cpp:40), SmApiIntersectSurfaces (:114), SmApiIntersectFaces (:164) and SmApiIntersectBreps (:213) are wrapper-only SM_API entry points (fixer-2's gap table rows 11-14). Rust: intersect::api_intersectors::{intersect_curves, intersect_surfaces, intersect_faces, intersect_breps}, beside intersect_brep_with_plane (topology.brep_planar_section, #1451). Callees are ported: Curve::global_curve_intersect / global_curve_self_intersect, Surface::global_surface_intersect, topology::face::p3::face_intersect_breps, topology::brep::p1::brep_intersect_mut / brep_intersect_self. Upstream SM_API_test's TestSmIntersectSurfaces builds its first surface with SmApiCreateSurfaceFromOrderedPoints of its 35 points (5 x 7); the upstream-surfaces-ordered-* fixtures do the same on both sides (primitive::api_surface_ops::create_surface_from_ordered_points, #1654). intersect_breps returns its outputs with the status (BrepIntersect's partial outputs of a failed face pair, topology::brep::p1::brep_intersect_*_with_partial) and the runner records them on failure; #1542: intersect_surfaces returns GlobalSurfaceIntersect's partial curves with the status too (Surface::global_surface_intersect_with_partial: the dispatchers and the special cases that can error after appending, Cone/Cone, Sphere/Sphere, Sphere/Cone, Rev/Plane (also via Torus), Rev/Rev (Rev/Cone, Rev/Sphere), write into the caller's output, as upstream's arrays; the general intersection resets it first, as DoIntersection). Append-then-error exits on one path (fixer-4 and fixer-2 agreed): SmSphere::IntersectWithSphere (a later circle piece's SER :1830 after the :1839 append; needs the circle split into pieces by a partial domain), SmSphere::IntersectWithCone (:2622 append, then :2601/:2614 in the next iteration, rounding near the pole) and SmCone::IntersectWithCone with coincident overlapping cylinders (:2844 append, return :2928), which through SmApiIntersectSurfaces is the UB-123 input (NULL tolerance dereferenced) the shim rejects, so that site is uncomparable here; the other intersectors' exits after an append are on another branch or follow a call that already succeeded on the same inputs. The runner records the native curves on failure (op 2) and the ssi-* fixtures (tangent, near-tangent, coincident, degenerate pairs of each intersector, a near-pole sphere/cone sweep, split-circle sphere/sphere cases at 2 and 5e5 down to near-tangency, grazing nets) plus 64 generated ssi cases search for those exits. Coincident overlapping cylinders are refused (UB-123: IntersectWithCone dereferences the NULL tolerance SmApiIntersectSurfaces passes). Extrusion pairs (extrusion/extrusion, extrusion/rectilinear cylinder either way round) whose sm_IntersectGenerators reaches its range-solution test with both ends overlapping are refused too: it reads the curve-type array SmApiIntersectSurfaces passes as NULL (SmSurfOfExtrusion.cpp:2981, beside UB-81; seen as 5 C++ crashes of identical extrusions); the shim replays the generators' projected solve on copies to decide it, and refuses an unbounded cylinder or a NULL iso circle there (UB-93). SM_API S1 (separate PR): SmApiIntersectCurveSurface, SmApiIntersectCurveFace and SmApiIntersectCurveBrep with sm_AppendCurveSurfaceHits, sm_HasOwnCurveWithEnds and sm_RestoreCurveSurfaceHits (also wrapper-only) -> intersect_curve_surface / intersect_curve_face / intersect_curve_brep (CurveHits; on failure no outputs, as the restore leaves the caller's arrays). Callees: Surface::global_curve_intersect, query::face::p2::point_classify, Curve::copy / trim. Fixtures: TestSmIntersectCurveSurface/CurveFace/CurveBrep (corner-point planes, the 10-box, the holed box by SmApiBooleanDifference) and analytic surfaces; 64 generated hit cases from their own seeds. Status set when the difftest gate has run."