Units / surface
surface.surface_p3 green
- Layer
- 30
- Upstream lines
- 1,794
- Functions
- 13
- Rust module
surface::surface::p3
Source: crates/solidcore/src/surface/surface/p3.rs
Upstream: source/SMLib/inc/SmSurface.h, source/SMLib/src/SmSurface.cpp
Notes
13 fns; largest: SmSurface::CoverCoincidentSurface, SmSurface::GetSingularities, SmSurface::LocalSurfaceSurfaceIntersect, SmFindPSNormalENFO::Evaluate; cycle back-edges (call into later units; stub or co-port): topology.face_p1(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; CO-PORTED in surface.surface_p4 (PR #49): smsurf_IsPointOnNormal -> surface::surface::p4::is_point_on_normal; SmSurfaceEval::EvalNormal -> surface::surface::p4::SurfaceEval::eval_normal; PORTED (PR #52): 11 fns in surface::surface::p3 (SmDropCurveFail::Copy is Clone; smsurf_IsPointOnNormal and SmSurfaceEval::EvalNormal were co-ported in surface.surface_p4), difftest 2500 cases: 2334 compared, 166 deferred (all SmSurface::CoverCoincidentSurface: the plane STEPInversion is wired through surface.surface_p4 (PR #49), but the point solve under it still reaches SmSurface::GlobalPointSolve_1 (UNPORTED(surface.surface_point_solve_p3) in surface::surface::p4); those cases are not yet compared), perturb mode detects all 2334; back-edges wired: SmSurface::EvaluateGeometric and LocalPlaneSurfaceIntersect into intersect.surface_intersector_p1, SmSurface::EvaluateNormalSection into nurbs.b_spline_surface_n_lib_p2 and surface.curve_bounded_surface (with EvaluateGeometric), SmSurface::GetSingularities into surface.trim_srf_cache; SmSurface::LocalSurfaceSolve wired into intersect.surface_intersector_p2; SmFindPSNormalENFO and SmSSSIntersectENFO implement EvalNFunctions on the structs of surface.surface_p1 (as does surface.surface_p4 for SmSSPIntersectENFO and SmSSNormalizeENFO); sm_CrossedSeamOrPole is surface.surface_p1's; FFI safety (review of PR #52): the surface-of-revolution block (kind 3) is accepted only by surface_p3's validators (p4/p7 shims have no such branch: kind index stays 0..=2 there, test kind_3_rejected); the p3 shim throws BadInput (SC_ERR_ARG) when SmSurfOfRevolution::CreateCanonical fails (generator on the axis) instead of dereferencing NULL (test generator_on_axis_is_an_error); report regenerated: 2500 cases, 2334 compared, 166 deferred, perturb 2334/2334 BACK-EDGES INTO surface.surface_p5 (PR #52, after merging surface_p4/#49 and surface_p5/#50): GetSingularities (IsSingularity; ignored() with SM_SS_NONE), the SmFindPSNormalENFO Newton solve of LocalPointSolve_0 (SER -> ?), LocalSurfaceSurfaceIntersect from UV guesses (status ignored), CoverCoincidentSurface (CoverOtherCoincidentSurface takes both surfaces &mut and a &Kernel; topology.edge is_topological takes &mut Brep + &Kernel) and EvaluateNormalSection (sm_FilterSolution, status ignored); IsSingularity/EvaluateNormalAtSingularity take &Kernel; no UNPORTED(surface.surface_p3) stubs remain. surface_p3 itself: 2500 cases, 2334 pass, 166 deferred (surface.surface_point_solve_p3 166). --green 169 units, 0 failed. Re-run after merging PR #106 (surface.surface_point_solve_p3 wired, 2026-10-15): 2500 cases, 2497 pass, 3 deferred (surface.surface_p8 3), 0 failed, max_rel_err 0. Re-run after wiring PR #118 (surface.surface_p8 and its back-edges, GlobalPointSolve_0 included): 2500 cases, 2500 pass, 0 deferred, 0 failed, max_rel_err 0; green.
Difftest
- Cases
- 2,500
- Passed
- 2,500
- 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: geom.extent1d green geom.extent2d green geom.extent3d green geom.local_solve_nd green geom.matrix green geom.object partial geom.vector2d green geom.vector3d green surface.surface_p1 partial surface.surface_p2 partial surface.surface_p7 partial
Soft dependencies: geom.geom_utility_p1 green geom.solution_array partial geom.tol green nurbs.b_spline_surface_p1 green surface.plane_p1 partial
Dependents: intersect.surface_drop_lib_p1 partial intersect.surface_drop_lib_p3 claimed surface.offset_surface green surface.surface_p11 partial surface.surface_p8 partial
Soft dependents: blend.fillet_standard_solver_p1 claimed heal.face_props partial heal.heal_data_p3 partial intersect.curve_class_p2 claimed intersect.ray_tracer partial intersect.surface_drop_lib_p2 green intersect.surface_intersector_p1 partial intersect.surface_intersector_p2 partial intersect.surface_silhouette green primitive.primitive_creation_p1 claimed query.loop green topology.brep_p9 claimed topology.edgeuse_p3 claimed topology.face_p3 claimed topology.face_p4 claimed topology.vertexuse partial
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmDropCurveFail::Copy | SmSurface.h:171 | 3 | DropCurveFail::copy ([Clone]) |
SmSurfaceEval::EvalNormal | SmSurface.cpp:1965 | 74 | [is_point_on_normal](super::p4::is_point_on_normal), [SurfaceEval::eval_normal](super::p2::SurfaceEval) (co-ported in p4) |
smsurf_IsPointOnNormal | SmSurface.cpp:4308 | 147 | [is_point_on_normal](super::p4::is_point_on_normal), [SurfaceEval::eval_normal](super::p2::SurfaceEval) (co-ported in p4) |
SmSurface::CoverCoincidentSurface | SmSurface.cpp:7964 | 330 | [Surface::cover_coincident_surface], [CoverCoincident] |
SmSurface::EvaluateGeometric | SmSurface.cpp:10908 | 36 | [Surface::evaluate_geometric], [evaluate_geometric_of] |
SmSurface::EvaluateNormalSection | SmSurface.cpp:11482 | 41 | [Surface::evaluate_normal_section], [evaluate_normal_section_of], [SurfaceNormalSection] |
SmSurface::GetSingularities | SmSurface.cpp:12384 | 262 | [Surface::get_singularities], [Surface::get_singularities_of_face], [Singularities] |
SmFindPSNormalENFO::Evaluate | SmSurface.cpp:25848 | 190 | [FindPsNormalEnfo] (EvalNFunctions) |
SmSurface::LocalPlaneSurfaceIntersect | SmSurface.cpp:27263 | 123 | [Surface::local_plane_surface_intersect] |
SmSurface::LocalSurfaceSolve | SmSurface.cpp:28422 | 184 | [Surface::local_surface_solve], [LocalSurfaceSolution] |
SmSSSIntersectENFO::Evaluate | SmSurface.cpp:28659 | 147 | [SssIntersectEnfo] (EvalNFunctions) |
SmSurface::LocalSurfaceSurfaceIntersect | SmSurface.cpp:28813 | 204 | [Surface::local_surface_surface_intersect], [LocalSssSolution] |
smsurf_CheckShapeMatch | SmSurface.cpp:30083 | 53 | [check_shape_match] |
Module file-header table (12 rows)
| Rust | Upstream |
|---|---|
[Surface::evaluate_geometric], [evaluate_geometric_of] | SmSurface::EvaluateGeometric |
[Surface::evaluate_normal_section], [evaluate_normal_section_of], [SurfaceNormalSection] | SmSurface::EvaluateNormalSection |
[Surface::get_singularities], [Surface::get_singularities_of_face], [Singularities] | SmSurface::GetSingularities |
[Surface::cover_coincident_surface], [CoverCoincident] | SmSurface::CoverCoincidentSurface |
[check_shape_match] | smsurf_CheckShapeMatch |
[FindPsNormalEnfo] (EvalNFunctions) | SmFindPSNormalENFO::Evaluate (struct: surface.surface_p1) |
[SssIntersectEnfo] (EvalNFunctions) | SmSSSIntersectENFO::Evaluate (struct: surface.surface_p1) |
[Surface::local_plane_surface_intersect] | SmSurface::LocalPlaneSurfaceIntersect |
[Surface::local_surface_solve], [LocalSurfaceSolution] | SmSurface::LocalSurfaceSolve |
[Surface::local_surface_surface_intersect], [LocalSssSolution] | SmSurface::LocalSurfaceSurfaceIntersect |
DropCurveFail::copy ([Clone]) | SmDropCurveFail::Copy |
[is_point_on_normal](super::p4::is_point_on_normal), [SurfaceEval::eval_normal](super::p2::SurfaceEval) (co-ported in p4) | smsurf_IsPointOnNormal, SmSurfaceEval::EvalNormal |
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