solidcore

Units / surface

surface.surface_p5 green

Layer
28
Upstream lines
2,321
Functions
16
Rust module
surface::surface::p5

Status history

Oct 12Nov 25
  1. todo 2,321 lines
  2. partial 2,321 lines
  3. green 2,321 lines

Source: crates/solidcore/src/surface/surface/p5.rs

Upstream: source/SMLib/inc/SmSurface.h, source/SMLib/src/SmSurface.cpp

Port-plan notes

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

main CI e33985411 (2026-10-23): PASS surface.surface_p5 cases=3058 passed=3058 failed=0 deferred=0. UPDATE (PR #52, after merging surface_p4/#49 and surface_p5/#50): the five UNPORTED(surface.surface_p3) stubs are wired (GetSingularities, SmFindPSNormalENFO solve, UV-guess LocalSurfaceSurfaceIntersect, CoverCoincidentSurface, EvaluateNormalSection); difftest 3046 cases, 2477 pass bit-identical, 0 failed, 569 deferred (surface.surface_point_solve_p3 528, curve.iso_curve 41); --perturb SENSITIVE 2477/2477. Kernel::default() remains in the IdenticalSolutions overrides and the image-space LocalSurfaceSurfaceIntersect (no kernel threaded there). PARTIAL: difftest 3046 cases (46 fixture: Surface.sms drop-point cases of the upstream closest-point test plus singularity and iso-curve cases; 3000 generated), 1785 pass bit-identical, 1261 deferred (surface.surface_point_solve_p3 512 = LocalPointSolve_1 and the point solves of sm_SpLocalSolve/DropPoint, surface.surface_p3 728 = GetSingularities, SmFindPSNormalENFO::Evaluate and EvaluateNormalSection, curve.iso_curve 21 = SmIsoCurve over non-B-spline surfaces and planes; the 9 cases that waited on surface.surface_p6 now defer to the point solves); a 60000-case run is clean; --perturb SENSITIVE 1785/1785. Covered ops (the generated cases include SmCurve::SurfaceMaxDistanceBetween of line segments and curves over planes, which drives the DropPoint wiring of curve.curve_p2, and plane drops of points above the interior): IsSingularity (poles, pinched corners, the SmPlane override), EvaluateNormalAtSingularity, CreateIsoParametricCurve (B-spline and plane overrides; the base body only runs for curve-bounded surfaces, whose SmIsoCurve needs EvaluateSimple, surface.surface_p1, so it is deferred), LocalPointSolve_0 INTERSECT, DropPoint via DropPointFast, sm_FilterSolution and sm_SpLocalSolve (verbatim C++ copies in the shim; the latter takes the surface sm_GetSurfaceToEvaluate would return), the four IdenticalSolutions overrides. m_bUseNewPointSolvers is TRUE upstream, so LocalPointSolve (LocalPointSolve_1, surface.surface_point_solve_p3) only runs LocalPointSolve_0 for MAXIMIZE, whose Newton solve is SmFindPSNormalENFO (surface.surface_p1/p3). SmCSGlobalSolver and SmCSIGlobalSolver have no struct yet: their IdenticalSolutions are free functions (cs_identical_solutions, csi_identical_solutions). CoverOtherCoincidentSurface has upstream's full signature and fall-through; it waits on CoverCoincidentSurface (surface.surface_p3). Back-edges wired: IsSingularity (nurbs b_spline_surface p1, b_spline_surface_n_lib p1, surface_cache p1, intersect.surface_intersector_p2), LocalPointSolve (nurbs b_spline_surface p1, intersect.surface_intersector_p1/p2), EvaluateNormalAtSingularity (curve_bounded_surface), DropPoint (intersect.surface_intersector_p1, surface.plane_p1), SmSPGlobalSolver/SmLSIGlobalSolver::IdenticalSolutions (p7, p2), SmCSIGlobalSolver::IdenticalSolutions, sm_FilterSolution and LocalPointSolve (surface.surface_p9), LocalPointSolve (intersect.curve_class_p1, surface.surf_of_revolution_p3), CreateIsoParametricCurve (surface.surface_point_solve_p1, surface.surface_cache_p1), IsSingularity (intersect.surface_intersector_p3), LocalPointSolve and DropPoint through SurfaceEvaluate (nurbs.b_spline_curve_n_lib, curve.curve_p2), the STEP-surface local solve of SmSurfOfRevolution::ConvertUVFromNURBSToSTEP (surface.surf_of_revolution_p1). Still UNPORTED(surface.surface_p5): the SmCrvOnSurf branch of curve_p6. 16 fns; largest: sm_FilterSolution, SmSurface::LocalPointSolve_0, SmSurface::DropPoint, sm_SpLocalSolve; cycle back-edges (call into later units; stub or co-port): surface.surface_p1(10), surface.surface_p3(5), topology.face_p2(2), surface.surface_point_solve_p3(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit Wired callers (PR #50 review): IsSingularity (intersect.surface_intersector_p4, topology.vertexuse), LocalPointSolve (topology.vertexuse, surface.surface_point_solve_p2), the general 3D branch of SmTol::MapTo2d (DropPoint + DropVectors, surface.surface_p1); SmFilletCustomSolver stays Unported (SmOffsetSurface is not a Surface kind: retagged surface.offset_surface). PR #125: drop_point_with_kernel supplies the caller Kernel to fast/global solves for query.api_queries; the existing drop_point signature retains its default-kernel behavior. Revalidated 3046 cases: 2477 bit-identical, 0 failed, 569 deferred; perturb 2477/2477. Re-run after merging PR #106 (surface.surface_point_solve_p3 wired, 2026-10-15): 3046 cases, 3025 pass, 21 deferred (surface.surface_p8 21), 0 failed, max_rel_err 0. drop_point now takes the caller's Kernel itself (PR #106 threads it through every caller), so PR #125's drop_point_with_kernel is folded into it. Re-run after wiring PR #118 (surface.surface_p8 and its back-edges, GlobalPointSolve_0 included): 3046 cases, 3046 pass, 0 deferred, 0 failed, max_rel_err 0; green. UPDATE (difftest: analytic cover): Cover now takes planes and real SmCylinder / SmCone / SmSphere / SmTorus surfaces (built as --ssi-corpus builds them, harness/cpp/shim/sc_analytic_surface.h; a Cover with a non-B-spline surface runs its C++ in a fresh process); fixtures/surface.surface_p5/cover_analytic.json pairs them with each other, planes and bilinear B-splines so the plane, bilinear, SM_CAST_PTR(SmBSplineSurface) (every analytic kind since #1612) and fallback candidates of CoverOtherCoincidentSurface are compared against C++ for the first time. Counts: see the PR's difftest summary.

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
3,118
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.iso_curve green geom.extent1d green geom.extent2d green geom.global_solver green geom.local_solve_nd green geom.object green geom.solution_array green geom.tol green geom.vector2d green geom.vector3d green surface.surface_p2 partial surface.surface_p4 green surface.surface_p7 green

Soft dependencies: curve.curve_p1 green curve.curve_p3 partial curve.curve_p4 green nurbs.b_spline_curve_p1 green nurbs.b_spline_curve_p2 green

Dependents: blend.identify_fillet green intersect.surface_drop_curve green intersect.surface_drop_lib_p2 green intersect.surface_drop_lib_p3 green surface.surface_p10 green surface.surface_p11 green surface.surface_p6 green surface.surface_p8 green topology.brep_validation green topology.edgeuse_p3 green

Soft dependents: blend.fillet_corner_p1 green blend.fillet_custom_solver green blend.fillet_geom_p1 green blend.fillet_geom_p4 partial blend.fillet_solver_p1 green blend.fillet_standard_solver_p1 green blend.fillet_standard_solver_p2 green boolean.topology_intersector_p1 green heal.gap green intersect.curve_class_p1 green intersect.curve_class_p2 green intersect.curve_class_p4 green intersect.curve_class_p5 green intersect.curve_class_p8 green intersect.curve_class_p9 green intersect.surface_intersector_p1 green intersect.surface_intersector_p2 partial intersect.surface_intersector_p3 green intersect.surface_intersector_p4 green primitive.primitive_creation_p2 green primitive.primitive_creation_p3 green query.api_queries green query.face_p1 green query.face_p3 green surface.surface_point_solve_p1 green surface.surface_point_solve_p2 green topology.brep_p1 green topology.brep_p3 partial topology.brep_p8 green topology.brep_p9 green topology.edge green topology.edgeuse_p1 green topology.face_p1 green topology.face_p2 partial topology.face_p3 green topology.face_p4 green topology.loopuse green topology.proto_topology_p2 green topology.trimming_tools green topology.vertexuse green

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmSurfaceEval::SectCurvatureSmSurface.h:22062[SurfaceEval::sect_curvature]
sm_SpLocalSolveSmSurface.cpp:4512230[sp_local_solve]
SmSurface::CoverOtherCoincidentSurfaceSmSurface.cpp:8327158[Surface::cover_other_coincident_surface_deferring_trims], [CoverOtherCoincident]
SmSurface::DropPointSmSurface.cpp:10387241[Surface::drop_point], [DropPointOptions], [DropPoint]
SmSurface::EvaluateNormalAtSingularitySmSurface.cpp:1083963[Surface::evaluate_normal_at_singularity]
sm_FilterSolutionSmSurface.cpp:12733311[filter_solution]
SmCSIGlobalSolver::IdenticalSolutionsSmSurface.cpp:1478486[cs_identical_solutions], [cs_identical_solutions_in], [csi_identical_solutions], [csi_identical_solutions_in]
SmSurface::CreateIsoParametricCurveSmSurface.cpp:14943155[Surface::create_iso_parametric_curve], [IsoParametricCurve]
SmCSGlobalSolver::IdenticalSolutionsSmSurface.cpp:1767088[cs_identical_solutions], [cs_identical_solutions_in], [csi_identical_solutions], [csi_identical_solutions_in]
SmLSIGlobalSolver::IdenticalSolutionsSmSurface.cpp:1884388[SpGlobalSolver]'s and [LsiGlobalSolver]'s identical_solutions
SmSPGlobalSolver::IdenticalSolutionsSmSurface.cpp:1987984[SpGlobalSolver]'s and [LsiGlobalSolver]'s identical_solutions
SmSurface::IsSingularitySmSurface.cpp:2303520[Surface::is_singularity], [Surface::is_singularity_with_poles], [Singularity]
SmSurface::IsSingularitySmSurface.cpp:23056203[Surface::is_singularity], [Surface::is_singularity_with_poles], [Singularity]
SmSurface::LocalPointSolveSmSurface.cpp:26075134[Surface::local_point_solve], [PointSolve]
SmSurface::LocalPointSolve_0SmSurface.cpp:26256288[Surface::local_point_solve_0], [PointSolve0]
SmSurface::LocalSurfaceSurfaceIntersectSmSurface.cpp:29030170[Surface::local_surface_surface_intersect_xyz]
Module file-header table (14 rows)
RustUpstream
[SurfaceEval::sect_curvature]SmSurfaceEval::SectCurvature
[Surface::is_singularity], [Surface::is_singularity_with_poles], [Singularity]IsSingularity (both overloads; virtual: the SmPlane override)
[Surface::evaluate_normal_at_singularity]EvaluateNormalAtSingularity (virtual: the SmCurveBoundedSurface override)
[Surface::create_iso_parametric_curve], [IsoParametricCurve]CreateIsoParametricCurve (virtual: SmBSplineSurface, SmPlane; the SmSurface body for the rest)
[Surface::local_point_solve], [PointSolve]LocalPointSolve
[Surface::local_point_solve_0], [PointSolve0]LocalPointSolve_0
[Surface::drop_point], [DropPointOptions], [DropPoint]DropPoint
[Surface::local_surface_surface_intersect_xyz]LocalSurfaceSurfaceIntersect (from an image-space guess)
[Surface::cover_other_coincident_surface_deferring_trims], [CoverOtherCoincident]CoverOtherCoincidentSurface
[Surface::cover_other_coincident_surface_deferring_trims_with_context], [CoverSolveContext]CoverOtherCoincidentSurface (smsurf_GetSurfaceCache seeing each face)
[sp_local_solve]sm_SpLocalSolve (static)
[filter_solution]sm_FilterSolution (static)
[SpGlobalSolver]'s and [LsiGlobalSolver]'s identical_solutionsSmSPGlobalSolver::IdenticalSolutions, SmLSIGlobalSolver::IdenticalSolutions
[cs_identical_solutions], [cs_identical_solutions_in], [csi_identical_solutions], [csi_identical_solutions_in]SmCSGlobalSolver::IdenticalSolutions, SmCSIGlobalSolver::IdenticalSolutions

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