surface.surface_p4 green
- Layer
- 27
- Upstream lines
- 2,270
- Functions
- 12
- Rust module
surface::surface::p4
Status history
- todo 2,270 lines
- partial 2,270 lines
- green 2,270 lines
Source: crates/solidcore/src/surface/surface/p4.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.
fix (2026-10-30, #1570 mat0076): SmSurfaceEval::EvalNormal now ignores Eval's status as upstream (the normal is made from the matrix a failed zero-tangent correction wrote); new near_flat_gps fixture (202 brute-force drop solves, 88 failed before) and 160 generated thin#### global point solves on near-flat patches (own seed stream, surface.surface_p4.thin; gps_ok admits thin low-degree patches); normal_eval checks the evaluation first as the shim does; difftest 3377 cases, 3377 pass, 0 deferred, max_rel_err 0; --green 277 units, 0 failed. main CI e33985411 (2026-10-23): PASS surface.surface_p4 cases=3015 passed=3015 failed=0 deferred=0. 12 fns; largest: sm_ClassifyCurveSurfaceXSectPoint, SmSSNormalizeENFO::Evaluate, SmCSNormalizeENFO::Evaluate, SmSSINormalizeENFO::Evaluate; cycle back-edges (call into later units; stub or co-port): surface.surface_p1(10), surface.surface_p3(3), intersect.point_class(2), query.face_p2(1), surface.surface_point_solve_p3(1), topology.edge(1), topology.face_p2(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; PORTED (PR #49): 12 fns in surface::surface::p4, difftest 3000 cases: 2711 compared, 289 deferred (surface.surface_p8: SmSPGlobalSolver::LocalSolve in GlobalPointSolve_0; surface.surface_point_solve_p3: GlobalPointSolve_1), --perturb 2711/2711; the Evaluate bodies of SmCSIntersectENFO, SmCSNormalizeENFO, SmSSPIntersectENFO, SmSSINormalizeENFO and SmSSNormalizeENFO are EvalNFunctions impls on surface::surface::p1::{CsIntersectEnfo, CsNormalizeEnfo, SspIntersectEnfo, SsiNormalizeEnfo, SsNormalizeEnfo} (the structs and constructors belong to surface.surface_p1; smsurf_EvaluateNormalSection is surface::surface::p1::evaluate_normal_section); Surface::is_on_seam and Surface::global_point_solve take a &Kernel (SmSurface::IsOnBoundary, SmTol::MapTo2d and SmSurface::IsInDomain are wired to surface.surface_p1); back-edges wired: SmCSNormalizeENFO into SmSurface::LocalCurveSolve (surface.surface_p7, curve.curve_p2 SurfaceEvaluate::local_curve_maximize incl. BSplineSurface), SmSurface::GlobalPointSolve into intersect.point_class, intersect.surface_intersector_p1 (StepBackFromSingularity; &Kernel threaded through compute_point_values, compute_next_point, update_tsect_point, test_point, step_back_from_singularity and the p4 trace callers), intersect.curve_class_p1 (GetCCISurfaceGaps), intersect.topology_solver_p1/p2 (face point solves, untrimmed range endpoints), nurbs.b_spline_surface_p1 (STEPInversion, incl. the Plane dispatch in surface.surface_p2), blend.fillet_custom_solver; sm_ClassifyCurveSurfaceXSectPoint into surface.surface_p9 (nearby intersection); SmSurface::IsOnSeam and SmSurfaceEval::Normal into surface.surface_point_solve_p1/p2 (check_guess_for_seams / refine_guess take &Kernel); no UNPORTED(surface.surface_p4) stubs remain; NOTE for the query.face_p2 porter (face-owned surfaces hit UNPORTED(query.face_p2) in Surface::global_point_solve): upstream disables the surface cache point test (m_bPointTestEnabled, via SmTemporaryChangeValue) around GlobalPointSolve in SmCurveClass.cpp:1040 (surface_global_point_solve), SmTopologySolver.cpp:1665 (topology_solver p2) and SmVertexUse.cpp:471-480; the Rust cache cannot do that yet, so wire the switch-off at those three callers when face-owned surfaces get a real PointClassify; fixed in the third review round: Plane STEPInversion now dispatches the follow-up IsSingularity/IsClosed to the plane overrides (StepInv plane cases added to the surface_p4 runner), curve_class GlobalPointSolve status ignored; second review round: reruns of the touched units pass with 0 failed and their SmSurface::GlobalPointSolve deferrals now name the real callee (surface.surface_point_solve_p3 GlobalPointSolve_1 / surface.surface_p8 / surface.surface_p5 LocalPointSolve): surface.surface_p2, surface_p7, surface_p9, surface_point_solve_p1/p2, surf_of_extrusion_p1, surf_of_revolution_p2, nurbs.b_spline_surface_p1, intersect.curve_class_p1, intersect.topology_solver_p1/p2, intersect.surface_intersector_p1-p4, blend.fillet_custom_solver, topology.proto_topology_p1; surface_p4 itself still 3000 cases: 2711 compared, 289 deferred, perturb 2728/2728; --green 153 units, 0 failed; CO-PORTED here: smsurf_IsPointOnNormal and SmSurfaceEval::EvalNormal (surface.surface_p3); LATE BACK-EDGES (after merging main): the remaining UNPORTED(surface.surface_p4) stubs are wired: surface.surface_p6 (Surface::is_on_seam via the plane override, global_point_solve_starts, the SmCSIntersectENFO local solve in LocalCurveIntersect; SsGlobalSolver now holds the &Kernel) and surface.surface_p10 (sm_ClassifyCurveSurfaceXSectPoint; its shim now carries the verbatim upstream function instead of a stand-in, so the 8 cases that reached it compare bit-identical). difftest surface_p4 2711 pass/289 deferred, surface_p6 1828 pass/271 deferred, surface_p10 523 pass/344 deferred, all 0 failed, --perturb SENSITIVE Re-run (PR #52, after merging surface_p4/#49 and surface_p5/#50): 3000 cases, 2711 pass, 289 deferred (surface.surface_point_solve_p3 243, surface.surface_p8 46). Re-run after merging PR #106 (surface.surface_point_solve_p3 wired, 2026-10-15): 3003 cases, 2957 pass, 46 deferred (surface.surface_p8 46), 0 failed, max_rel_err 0. Re-run after wiring PR #118 (surface.surface_p8 and its back-edges, GlobalPointSolve_0 included): 3003 cases, 3003 pass, 0 deferred, 0 failed, max_rel_err 0; green. Re-run (PR #118, round 3: GlobalPointSolve maximize without a handle): 3003 cases, all pass; --perturb SENSITIVE 3003/3003.
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,377
- 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.geom_utility_p1 green geom.local_solve_nd green geom.matrix green geom.object green geom.solution_array green geom.tol green geom.vector2d green geom.vector3d green surface.surface_p2 partial surface.surface_p7 green
Soft dependencies: curve.crv_on_surf green curve.line green surface.plane_p1 partial surface.surface_cache_p1 green
Dependents: intersect.surface_drop_lib_p3 green surface.surface_p5 green surface.surface_p6 green surface.surface_p8 green surface.surface_point_solve_p3 green
Soft dependents: blend.fillet_corner_p1 green blend.fillet_corner_p2 partial blend.fillet_custom_solver green blend.fillet_geom_p1 green blend.fillet_geom_p2 green blend.fillet_geom_p4 partial blend.fillet_geom_p6 green blend.fillet_solver_p3 green blend.fillet_standard_solver_p1 green blend.fillet_standard_solver_p2 green intersect.curve_class_p1 green intersect.curve_class_p4 green intersect.curve_class_p5 green intersect.point_class green intersect.surface_drop_curve green intersect.surface_drop_lib_p2 green intersect.surface_intersector_p1 green intersect.topology_solver_p1 green intersect.topology_solver_p2 green offset.offset_executive_p1 partial query.face_p1 green query.face_p3 green surface.surface_p10 green surface.surface_point_solve_p1 green topology.brep_p1 green topology.brep_p2 green topology.brep_p3 partial topology.edgeuse_p2 green topology.edgeuse_p3 green topology.face_p3 green topology.face_p4 green topology.trimming_tools green topology.vertexuse green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmSurfaceEval::Normal | SmSurface.h:2202 | 2 | [SurfaceEval::normal] |
SmSurfaceEval::EvalNormalSection | SmSurface.cpp:2045 | 21 | [SurfaceEval::eval_normal_section] |
sm_PassSPConvergenceTest | SmSurface.cpp:4462 | 40 | [pass_sp_convergence_test] |
sm_ClassifyCurveSurfaceXSectPoint | SmSurface.cpp:13080 | 694 | [classify_curve_surface_xsect_point], [XsectClassification] |
SmSurface::CreateSeamCurve | SmSurface.cpp:15108 | 65 | [Surface::create_seam_curve] |
SmSurface::GlobalPointSolve | SmSurface.cpp:19980 | 231 | [Surface::global_point_solve], [Surface::global_point_solve_point_test_off], [Surface::global_point_solve_face_tested], [FaceTest], [global_point_solve_starts], [NoObject] |
SmSurface::IsOnSeam | SmSurface.cpp:23549 | 76 | [Surface::is_on_seam], [SeamInfo] |
SmCSIntersectENFO::Evaluate | SmSurface.cpp:24502 | 205 | [CsIntersectEnfo] (EvalNFunctions) |
SmCSNormalizeENFO::Evaluate | SmSurface.cpp:25276 | 252 | [CsNormalizeEnfo] (EvalNFunctions) |
SmSSPIntersectENFO::Evaluate | SmSurface.cpp:26649 | 179 | [SspIntersectEnfo] (EvalNFunctions) |
SmSSINormalizeENFO::Evaluate | SmSurface.cpp:27011 | 247 | [SsiNormalizeEnfo] (EvalNFunctions) |
SmSSNormalizeENFO::Evaluate | SmSurface.cpp:28148 | 258 | [SsNormalizeEnfo] (EvalNFunctions) |
Module file-header table (16 rows)
| Rust | Upstream |
|---|---|
[SurfaceEval::normal] | SmSurfaceEval::Normal |
[SurfaceEval::eval_normal_section] | SmSurfaceEval::EvalNormalSection |
[pass_sp_convergence_test] | sm_PassSPConvergenceTest (static) |
[Surface::create_seam_curve] | SmSurface::CreateSeamCurve |
[Surface::seam_ruling] | not upstream: a cone's seam as its ruling line |
[Surface::create_line_on_surf] | SmSurface::CreateLineOnSurf |
[Surface::is_on_seam], [SeamInfo] | SmSurface::IsOnSeam |
[Surface::global_point_solve], [Surface::global_point_solve_point_test_off], [Surface::global_point_solve_face_tested], [FaceTest], [global_point_solve_starts], [NoObject] | SmSurface::GlobalPointSolve |
[classify_curve_surface_xsect_point], [XsectClassification] | sm_ClassifyCurveSurfaceXSectPoint (static) |
[CsIntersectEnfo] (EvalNFunctions) | SmCSIntersectENFO::Evaluate (struct: surface.surface_p1) |
[CsNormalizeEnfo] (EvalNFunctions) | SmCSNormalizeENFO::Evaluate (struct: surface.surface_p1) |
[SspIntersectEnfo] (EvalNFunctions) | SmSSPIntersectENFO::Evaluate (struct: surface.surface_p1) |
[SsiNormalizeEnfo] (EvalNFunctions) | SmSSINormalizeENFO::Evaluate (struct: surface.surface_p1) |
[SsNormalizeEnfo] (EvalNFunctions) | SmSSNormalizeENFO::Evaluate (struct: surface.surface_p1) |
[is_point_on_normal], [PointOnNormal], [NormalTestReason] (co-ported) | smsurf_IsPointOnNormal (unit surface.surface_p3) |
[SurfaceEval::eval_normal] (co-ported) | SmSurfaceEval::EvalNormal (unit surface.surface_p3) |
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