solidcore

Units / surface

surface.surf_of_extrusion_p2 partial

Layer
28
Upstream lines
1,420
Functions
7
Rust module
surface::surf_of_extrusion::p2

Source: crates/solidcore/src/surface/surf_of_extrusion/p2.rs

Upstream: source/SMLib/src/SmSurfOfExtrusion.cpp

Notes

UPDATE (PR #177, 2026-10-16): back-edges re-wired. SmPlane::IntersectWithPlane (surface.plane_p2, partial) is called from IntersectWithPlane of a linear/coplanar generator (status ignored as upstream: a failure is no curves, no needs-more); when it gives a line, SmSurface::CurveOnClassify is UNPORTED(intersect.curve_class_p2) (SmCurveClassification::ReSet; also IntersectNaturalBounds, intersect.curve_class_p8, and the extrusion is not a Surface yet). curve.curve_p9 (green) was already wired into sm_IntersectGenerators; IntersectWithCylinder/IntersectWithSurfOfExtrusion now ignore its status as upstream (partial curves kept, needs-more false; Unported and InvalidInput still propagate). The general-intersector fall-back stays Unported under intersect.adv_surface_intersector because SmAdvSurfaceIntersector needs this surface as a Surface (SurfaceKind dispatch gap, below). New fixture file plane_wiring.json (14 cases: missed/near-miss/touching/crossing bounded planes, tilted, huge/tiny scales, swap, tol 0/0.1, sub-domain, GlobalSurfaceIntersect as SmPlane and as Surface). difftest 1373 cases, 1148 pass bit-identical (max_rel_err 0), 0 failed, 225 deferred (intersect.curve_class_p2 128, intersect.adv_surface_intersector 97); --perturb SENSITIVE 1148/1148. Earlier: PARTIAL (PR #57): difftest 1359 cases (159 fixtures, 63 of them review adversarial (seam/tangent planes at tol None/1e-3/1e-9/0/negative, the 2-degree tangent boundary, conic vertex tangents, closed/rational B-spline seams, scales 1e-4..1e6, plane tilts around the angle tolerance, snapped/outside independent extrusions, disjoint boxes, ctor+swap/infinite/out-of-bounds surfaces, cylinder radii at the tolerance edge, IsNurb edge sweeps/domains/tolerances); the rest: the SmSurfOfExtrusion records of upstream Fillet/eg1_srf1.smb and Fillet/blade_fillet_fails.smb (state, IsNurbSurfaceSurfOfExtrusion, plane cuts in every branch, trims, extrusion pair), hand-built edge cases: seam/tangent/near-tangent/clipped-degenerate directrices, snapped and outside extrusion ends, tol 0 / tiny / large, disjoint plane boxes, cylinders and cones, inline NURBs (bilinear, biquadratic, 3-point linear, rational constant/varying ratio, zero sweep, shifted domain, perturbed); + 1200 generated over every op incl. database records (ASCII/binary, versions 29-45), 1e-3..1e3 scales), 1048 pass bit-identical (max_rel_err 0), 0 failed, 311 deferred (surface.plane_p2 133: SmPlane::IntersectWithPlane (TrimCurveToPlaneDomain wired at the merge with main after surface.plane_p2 went partial: 77 more cases pass, was 971/388); intersect.adv_surface_intersector 97: GlobalSurfaceIntersect general case; curve.curve_p9 81: parallel generators); --perturb SENSITIVE 971/971; 20k-seed run clean. SurfOfExtrusion does not join SurfaceKind yet (Surface dispatchers take no Kernel; see plan/findings.md): Surface::read_from_db reads the record then defers (DISPATCH GAP, no UNPORTED marker) naming surface.surf_of_extrusion_p2 SurfaceKind::SurfOfExtrusion (topology.brep_data 2 cases); this gap needs an owner for threading a Kernel through the Surface dispatchers (plan/STATUS.md Open issues). TODO when curve.curve_p9 lands: IntersectWithCylinder/IntersectWithSurfOfExtrusion must swallow non-Unported sm_IntersectGenerators errors as upstream does (plan/findings.md). FFI check_record accepts only SmBSplineCurve generator records (coverage gap; see plan/findings.md). Upstream issues UB-91..UB-95, WR-66. 7 fns; largest: SmSurfOfExtrusion::IntersectWithPlane, SmSurfOfExtrusion::IsNurbSurfaceSurfOfExtrusion, SmSurfOfExtrusion::IntersectWithCylinder, SmSurfOfExtrusion::IntersectWithSurfOfExtrusion; cycle back-edges (call into later units; stub or co-port): intersect.curve_class_p1(3), intersect.curve_class_p4(1), intersect.point_class(1); unit-SCC #22 (220 units); 216 upstream test entry points reach this unit

Difftest

Cases
1,373
Passed
1,148
Deferred
225
Failed
0
Both errored
0
Max rel. error
0.0
Tolerance
1e-09 rel.
Seeds
16

Blocked by

Unported unitDeferred cases
intersect.curve_class_p2 claimed128
intersect.adv_surface_intersector partial97

Report JSON (per-case results)

Dependencies

Depends on: curve.curve_p2 green geom.axis2_placement green geom.extent1d green geom.extent2d green geom.object partial geom.pseudo_box green geom.solution_array partial geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green nurbs.b_spline_surface_n_lib_p1 green nurbs.b_spline_surface_p1 green nurbs.b_spline_surface_p2 partial surface.cone_p1 green surface.plane_p1 partial surface.surf_of_extrusion_p1 green surface.surface_p2 partial topology.database_io green

Soft dependencies: curve.curve_p4 partial curve.curve_p6 green curve.curve_p7 green nurbs.b_spline_curve_p2 green surface.plane_p2 partial surface.surf_of_revolution_p1 green

Dependents: audit.recursion todo

Soft dependents: none

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmSurfOfExtrusion::GlobalSurfaceIntersectSmSurfOfExtrusion.cpp:165170[SurfOfExtrusion::global_surface_intersect], [IntersectTarget]
SmSurfOfExtrusion::IntersectWithPlaneSmSurfOfExtrusion.cpp:1870679[SurfOfExtrusion::intersect_with_plane], [ExtrusionIntersection]
SmSurfOfExtrusion::IntersectWithCylinderSmSurfOfExtrusion.cpp:3164143[SurfOfExtrusion::intersect_with_cylinder]
SmSurfOfExtrusion::IntersectWithSurfOfExtrusionSmSurfOfExtrusion.cpp:3314120[SurfOfExtrusion::intersect_with_surf_of_extrusion]
SmSurfOfExtrusion::IsNurbSurfaceSurfOfExtrusionSmSurfOfExtrusion.cpp:3447208[SurfOfExtrusion::is_nurb_surface_surf_of_extrusion]
SmSurfOfExtrusion::TrimWithDomainSmSurfOfExtrusion.cpp:391196[SurfOfExtrusion::trim_with_domain]
SmSurfOfExtrusion::ReadFromDBSmSurfOfExtrusion.cpp:4480104[SurfOfExtrusion::read_from_db]
Module file-header table (7 rows)
RustUpstream
[SurfOfExtrusion::global_surface_intersect], [IntersectTarget]GlobalSurfaceIntersect
[SurfOfExtrusion::intersect_with_plane], [ExtrusionIntersection]IntersectWithPlane
[SurfOfExtrusion::intersect_with_cylinder]IntersectWithCylinder
[SurfOfExtrusion::intersect_with_surf_of_extrusion]IntersectWithSurfOfExtrusion
[SurfOfExtrusion::is_nurb_surface_surf_of_extrusion]IsNurbSurfaceSurfOfExtrusion (static)
[SurfOfExtrusion::trim_with_domain]TrimWithDomain
[SurfOfExtrusion::read_from_db]ReadFromDB (static)

Upstream tests reaching this unit

prog_test:my_test_surface_cover_domains, prog_test:my_test_tsurf_creation, SM_API_test:TestSmCreatePlanarCircle, SM_API_test:TestIntersectionOutputStatus, SM_API_test:TestSmCreatePlane, SM_API_test:TestSmCreateSwungPrimitive