solidcore

Units / intersect

intersect.api_intersectors partial

Layer
48
Upstream lines
200
Functions
0
Rust module
intersect::api_intersectors

Status history

Oct 12Nov 25
  1. green 200 lines
  2. partial 200 lines

Source: crates/solidcore/src/intersect/api_intersectors.rs

Upstream: source/SM_API/src/SmApiIntersectors.cpp

Port-plan notes

These notes preserve historical port measurements and limitations, not current CI results.

[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.

Goldens

This is committed inventory, not a runtime result or a correctness proof. A golden records what solidcore produced when blessed. Current results require the canonical CI gate, not these counts.

Golden records
477
Stored error outcomes
0
Stored deferrals
0
Stored harness rejections
0
Known-failure entries
0

Metadata counts describe fields in the stored records; they are not passes or live failures.

Source at f9704ee3b: golden JSONL · known-failure list.

Dependencies

Depends on: curve.curve_p2 green curve.curve_p8 green curve.curve_p9 green query.face_p2 green surface.surface_p2 partial surface.surface_p8 green topology.brep_p1 green topology.face_p3 green

Soft dependencies: none

Dependents: none

Soft dependents: none

Upstream functions

No upstream functions listed in harness/callgraph/units.json.

Module file-header table (18 rows)
RustUpstream
[intersect_curves], [CurveIntersections]SmApiIntersectCurves
[curve_crossings](not upstream)
[curve_contacts], [CurveContacts](not upstream)
crossings_with_kind (private)(not upstream)
[curve_plane_crossings](not upstream)
[curve_plane_section], [PlaneSection](not upstream)
[intersect_surfaces]SmApiIntersectSurfaces
[intersect_surfaces_within](not upstream)
refuse_points_where_a_plane_crosses (private)(not upstream)
[intersect_faces], [FaceBodies], [Intersections]SmApiIntersectFaces
[intersect_faces_read_only](not upstream)
[intersect_breps], [BrepOperands]SmApiIntersectBreps
[intersect_curve_surface], [CurveHits]SmApiIntersectCurveSurface
[intersect_curve_face]SmApiIntersectCurveFace
[intersect_curve_brep]SmApiIntersectCurveBrep
append_curve_surface_hits (private)sm_AppendCurveSurfaceHits
has_own_curve_with_ends (private)sm_HasOwnCurveWithEnds
[intersect_brep_with_plane]SmApiIntersectBrepWithPlane

Upstream tests reaching this unit

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