Units / surface
surface.surface_p4 green
- Layer
- 27
- Upstream lines
- 2,270
- Functions
- 12
- Rust module
surface::surface::p4
Source: crates/solidcore/src/surface/surface/p4.rs
Upstream: source/SMLib/inc/SmSurface.h, source/SMLib/src/SmSurface.cpp
Notes
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.
Difftest
- Cases
- 3,003
- Passed
- 3,003
- Deferred
- 0
- Failed
- 0
- Both errored
- 0
- Max rel. error
- 0.0
- Tolerance
- 1e-09 rel.
- Seeds
- 16
Blocked by
Nothing: no deferred cases.
Report JSON (per-case results)
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 partial geom.solution_array partial geom.tol green geom.vector2d green geom.vector3d green surface.surface_p2 partial surface.surface_p7 partial
Soft dependencies: curve.crv_on_surf partial curve.line green surface.plane_p1 partial surface.surface_cache_p1 green
Dependents: intersect.surface_drop_lib_p3 claimed surface.surface_p5 green surface.surface_p6 green surface.surface_p8 partial surface.surface_point_solve_p3 green
Soft dependents: blend.fillet_corner_p1 todo blend.fillet_corner_p2 todo blend.fillet_custom_solver partial blend.fillet_geom_p1 claimed blend.fillet_geom_p2 todo blend.fillet_geom_p4 todo blend.fillet_geom_p6 todo blend.fillet_solver_p3 todo blend.fillet_standard_solver_p1 claimed blend.fillet_standard_solver_p2 todo intersect.curve_class_p1 partial intersect.curve_class_p4 claimed intersect.curve_class_p5 partial intersect.point_class partial intersect.surface_drop_curve partial intersect.surface_drop_lib_p2 green intersect.surface_intersector_p1 partial intersect.topology_solver_p1 partial intersect.topology_solver_p2 partial offset.offset_executive_p1 claimed query.face_p1 claimed query.face_p3 claimed surface.surface_p10 partial surface.surface_point_solve_p1 green topology.brep_p1 claimed topology.brep_p2 claimed topology.brep_p3 claimed topology.edgeuse_p2 partial topology.edgeuse_p3 claimed topology.face_p3 claimed topology.face_p4 claimed topology.trimming_tools partial topology.vertexuse partial
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], [global_point_solve_starts], [NoObject] |
SmSurface::IsOnSeam | SmSurface.cpp:23548 | 76 | [Surface::is_on_seam], [SeamInfo] |
SmCSIntersectENFO::Evaluate | SmSurface.cpp:24501 | 205 | [CsIntersectEnfo] (EvalNFunctions) |
SmCSNormalizeENFO::Evaluate | SmSurface.cpp:25275 | 252 | [CsNormalizeEnfo] (EvalNFunctions) |
SmSSPIntersectENFO::Evaluate | SmSurface.cpp:26648 | 179 | [SspIntersectEnfo] (EvalNFunctions) |
SmSSINormalizeENFO::Evaluate | SmSurface.cpp:27010 | 247 | [SsiNormalizeEnfo] (EvalNFunctions) |
SmSSNormalizeENFO::Evaluate | SmSurface.cpp:28147 | 258 | [SsNormalizeEnfo] (EvalNFunctions) |
Module file-header table (14 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::is_on_seam], [SeamInfo] | SmSurface::IsOnSeam |
[Surface::global_point_solve], [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