intersect.surface_drop_lib_p1 partial
- Layer
- 31
- Upstream lines
- 1,478
- Functions
- 15
- Rust module
intersect::surface_drop_lib::p1
Status history
- todo 1,478 lines
- partial 1,478 lines
- green 1,478 lines
- partial 1,478 lines
Source: crates/solidcore/src/intersect/surface_drop_lib/p1.rs
Upstream: source/SMLib/src/SmSurfaceDropLib.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
2026-11-05 (branch localop/keep-unmoved-edges, e0706bc0c: the drop traces each piece once; plan/findings/surface.exact-extension--difftest-cases-moved-2026-11-05.md, last section): PARTIAL cases=2926 passed=2924 known_mismatch=2 (trim0059, trim0107): native returns one 3D piece twice where solidcore returns it once; a line along the seam keeps both of its UV lines, as native does (4 entries removed). Earlier: GREEN (2026-10-23, branch claude/cos-evalpoint: SmCrvOnSurf::EvaluatePoint/EvaluateSurfaceNormal wired into SmGlobalSolver::BranchMayContainAnswers for SM_SO_SURFACE_PROJECTED_INTERSECT; the curve/curve solver hands the base test its second curve): difftest 2926 cases, 2926 pass with values, 0 failed, 0 deferred, max_rel_err 0 (macOS; before on main CI: 2926 cases, 2611 pass, 315 deferred, all at curve.crv_on_surf SmCrvOnSurf::EvaluatePoint). Earlier: 15 fns; PARTIAL (PR #140, second review, merged with main 7b57d8de0): 2921 cases (1500 generated with main's buckets, so every generated case keeps main's inputs, then 400 fixed-seed DropAndTrimCurve cases trim0000..trim0399), 2425 pass bit-identical (max_rel_err 0), 0 failed, 496 deferred, all genuine: curve.crv_on_surf 228 (SmCrvOnSurf over a plane or surface of revolution: the port holds only an SmBSplineSurface; reached now that the surface cache iso curves of planes and surfaces of revolution are wired), intersect.surface_drop_lib_p3 173 (non-plane SmSurface::DropCurve, unit todo), intersect.curve_class_p2 95 (SmCurveClassification::ReSet / ConnectIntervals stubs in intersect/curve_class/p4.rs, kept deliberately: wiring them breaks topology.brep_p2 merge_plane10_line and 4 curve_class_p4 squeeze cases, see that unit's findings). The Trim record carries each UV curve's GetType() (SmLine vs SmBSplineCurve compared) and a NULL_CURVE sentinel for a NULL entry. Against main by case name: no pass lost; surface.plane_p2 and surface.surface_cache_p3 now green; deferred -> pass: surface_intersector_p5 462, surface_p10 110, p3 79, surface_cache_p2 53, fillet_geom_p2 29, brep_p2 16, surface_drop_curve 8, drop_lib_p1 8, tracer 5, surf_of_revolution_p2 5, fillet_geom_p1 2, plane_p1 1. Earlier: PARTIAL (PR #140, re-verified after merging main b8d7cde51): 2521 cases, 2172 pass bit-identical (max_rel_err 0), 0 failed, 349 deferred (surface.surface_cache_p1 224, intersect.surface_drop_lib_p3 91, intersect.curve_class_p2 34: SmCurveClassification moved there from curve_class_p4). Earlier: PARTIAL (PR #140, review fixes): DropAndTrim::uv_curves is Vec<Curve> keeping each traced UV curve's kind (an SmLine from SmPlane::DropCurve stays a Line with its overrides; non-B-spline kinds are SM_ERR_NULL_POINTER), callers surface.surface_p10 and intersect.surface_intersector_p3 no longer re-wrap; +632 review fixtures (review_trim_adversarial.json: bilinear/twisted patches at scales 1e-3/1/1e3, iso 0/0.37/1, normal offsets 0/1e-9/0.5 tol/2 tol, tol 0, sub-domains/intervals, reversed and overhanging lines, keep_all, plane lines): 360 pass, 272 defer; now difftest 2521 cases, 2172 pass bit-identical (max_rel_err 0), 0 failed, 349 deferred (surface.surface_cache_p1 224, intersect.surface_drop_lib_p3 91, intersect.curve_class_p4 34), --perturb SENSITIVE 2172/2172. Before review: SmSurfaceDropCurve::DoTrace wired into DropAndTrimCurve (intersect.surface_drop_curve is partial; no UNPORTED stub left in this unit); difftest 1889 cases (27 trim_iso_lines fixtures: iso lines on flat/twisted bilinear patches, a 1e3-scale patch and a rational cylinder incl. its seam, offset/keep_all/tol 0/sub-domain/sub-interval; generated DropAndTrimCurve cases now on planes, B-spline iso lines, iso-drop curves and curves near all surface kinds), 1812 pass bit-identical (max_rel_err 0), 0 failed, 77 deferred (surface.surface_cache_p1 44: SmPlane/SmSurfOfRevolution::CreateIsoParametricCurve in the cache tree DoTrace builds; intersect.curve_class_p4 26: SmCurveClassification in FindBoundaryStartPoints; intersect.surface_drop_lib_p3 7: non-plane SmSurface::DropCurve), --perturb SENSITIVE 1812/1812. Earlier: largest: SmSurface::DropIsoCurve, SmDropPt::TestSpanAccuracy, SmDropPt::CheckSeamJump, SmDropPt::IsMovingAlongBoundary; unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; PARTIAL: smsurf_IsPointOnNormal wired to surface.surface_p3 (PR #52): 1862 cases, 1847 pass bit-identical, 0 failed, 15 deferred (intersect.surface_drop_curve 15), perturb 1847/1847 detected; earlier PARTIAL (PR #98): difftest 1862 cases (34 fixture cases on the shapes of TestSmCreateRectangle, my_test_coaxial_merge_orientation and my_test_reversed_line_join, 328 review fixtures on poles (cone apex, spheres r=1 and r=1e3, both swaps) and a B-spline with a collapsed u=0 edge: moving, span, seam, iso, fix_curves, dups, 1500 generated: SmDropPt ctor/operator=/SetUninitialized/IsGoodTangentDrop, IsMovingAlongBoundary on planes, B-spline (height field, bilinear, closed rational cylinder) and SmSurfOfRevolution boundaries and seams, TestSpanAccuracy, CheckSeamJump snaps and SM_ERR_OUTSIDE_OF_DOMAIN, FixBoundaryTangents, the span stack, sm_FixBoundaryCurves, sm_RemoveDuplicateDropPointSolutions, DropIsoCurve on SmLine/SmCircle/SmBSplineCurve, DropAndTrimCurve; scales 1e-3..1e3), 1683 pass bit-identical (max_rel_err 0), 179 deferred (surface.surface_p3 164: smsurf_IsPointOnNormal in TestSpanAccuracy, co-ported in open PR #49/#52; intersect.surface_drop_curve 15: SmSurfaceDropCurve::DoTrace in DropAndTrimCurve); --perturb SENSITIVE 1683/1683. UNPORTED stubs: smsurf_IsPointOnNormal (surface.surface_p3), SmSurfaceDropCurve::SetCurveIsOnSurface/DoTrace (intersect.surface_drop_curve). Wired: SmSurface::DropAndTrimCurve in intersect.surface_intersector_p3. Rejected by the shim and errors in Rust: a failed evaluation whose status IsMovingAlongBoundary / the TestSpanAccuracy domain clamp ignore (upstream goes on with SM_UNDEF_DOUBLE defaults or partial writes; that path is not ported, and no generated or review case reaches it) and sm_FixBoundaryCurves on 3k points (reads past the array, undefined). DropIsoCurve with more than 100 knots (dKnots[100] growth) is not difftested: the FFI caps ncp at 64. Merge with main (2026-10-16): 2521 cases, 2172 pass bit-identical, 0 failed, 349 deferred (surface.surface_cache_p1 224, intersect.surface_drop_lib_p3 91, intersect.curve_class_p4 34), --perturb SENSITIVE 2172/2172. Callers holding the surface cache pass it to the trace (Surface::drop_and_trim_curve_in: surface.surface_p8 coincident branches, intersect.surface_intersector_p3 boundary curve drops). The wiring exposed 6 intersect.surface_intersector_p5 failures (lost touching-point curves) from the ComputeSingularityPoint DISPATCH GAP; fixed here (plan/findings.md).
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
- 2,926
- 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 geom.extent1d green geom.extent2d green geom.solution_array green geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green surface.surface_p1 green surface.surface_p2 partial surface.surface_p3 green surface.surface_p7 green
Soft dependencies: curve.hermite_curve green geom.geom_utility_p1 green
Dependents: intersect.surface_drop_lib_p2 green intersect.surface_drop_lib_p3 green primitive.api_surface_ops green topology.api_projection partial topology.brep_planar_section partial
Soft dependents: boolean.topology_intersector_p3 green intersect.surface_drop_curve green intersect.surface_intersector_p3 green offset.offset_geometry_creation partial topology.brep_p9 green topology.edgeuse_p3 green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmDropPt::SmDropPt | SmSurfaceDropLib.cpp:113 | 5 | [DropPt::new] |
SmDropPt::operator= | SmSurfaceDropLib.cpp:134 | 28 | Clone / [DropPt::assign] |
SmDropPt::SetUninitialized | SmSurfaceDropLib.cpp:163 | 25 | [DropPt::set_uninitialized] |
SmDropPt::IsGoodTangentDrop | SmSurfaceDropLib.cpp:192 | 10 | [DropPt::is_good_tangent_drop] |
SmDropPt::IsMovingAlongBoundary | SmSurfaceDropLib.cpp:551 | 192 | [DropPt::is_moving_along_boundary] |
SmDropPt::TestSpanAccuracy | SmSurfaceDropLib.cpp:758 | 232 | [DropPt::test_span_accuracy], [SpanAccuracy] |
SmDropPt::CheckSeamJump | SmSurfaceDropLib.cpp:1953 | 197 | [DropPt::check_seam_jump] |
SmDropPt::FixBoundaryTangents | SmSurfaceDropLib.cpp:2171 | 86 | [DropPt::fix_boundary_tangents] |
sm_PushPoint | SmSurfaceDropLib.cpp:2961 | 16 | [push_point] |
sm_PopStack | SmSurfaceDropLib.cpp:2990 | 24 | [pop_stack] |
sm_StackLook | SmSurfaceDropLib.cpp:3026 | 21 | [stack_look] |
sm_FixBoundaryCurves | SmSurfaceDropLib.cpp:3079 | 182 | [fix_boundary_curves] |
sm_RemoveDuplicateDropPointSolutions | SmSurfaceDropLib.cpp:3269 | 40 | [remove_duplicate_drop_point_solutions] |
SmSurface::DropAndTrimCurve | SmSurfaceDropLib.cpp:6292 | 133 | [Surface::drop_and_trim_curve], [Surface::drop_and_trim_curve_in], [DropAndTrim], [DropFailRecord] |
SmSurface::DropIsoCurve | SmSurfaceDropLib.cpp:6443 | 287 | [Surface::drop_iso_curve], [IsoDrop] |
Module file-header table (16 rows)
| Rust | Upstream |
|---|---|
[DropPt] | SmDropPt (file-local class) |
[DropPt::new] | SmDropPt::SmDropPt(dT, bDegenCurve) |
Clone / [DropPt::assign] | SmDropPt::operator= |
[DropPt::set_uninitialized] | SmDropPt::SetUninitialized |
[DropPt::is_good_tangent_drop] | SmDropPt::IsGoodTangentDrop |
[DropPt::is_moving_along_boundary] | SmDropPt::IsMovingAlongBoundary |
[DropPt::test_span_accuracy], [SpanAccuracy] | SmDropPt::TestSpanAccuracy |
[DropPt::check_seam_jump] | SmDropPt::CheckSeamJump |
[DropPt::fix_boundary_tangents] | SmDropPt::FixBoundaryTangents |
[push_point] | sm_PushPoint (static) |
[pop_stack] | sm_PopStack (static) |
[stack_look] | sm_StackLook (static) |
[fix_boundary_curves] | sm_FixBoundaryCurves (static) |
[remove_duplicate_drop_point_solutions] | sm_RemoveDuplicateDropPointSolutions (static) |
[Surface::drop_and_trim_curve], [Surface::drop_and_trim_curve_in], [DropAndTrim], [DropFailRecord] | SmSurface::DropAndTrimCurve |
[Surface::drop_iso_curve], [IsoDrop] | SmSurface::DropIsoCurve |
Upstream tests reaching this unit
prog_test:my_test_surface_closest_point, prog_test:my_test_drop_point, prog_test:my_test_matrix, prog_test:my_test_reversed_line_join, SM_API_test:TestSmCreateRectangle, SM_API_test:TestSmCreateRegularPolygon