surface.surf_of_extrusion_p2 green
- Layer
- 28
- Upstream lines
- 1,420
- Functions
- 7
- Rust module
surface::surf_of_extrusion::p2
Status history
- todo 1,420 lines
- partial 1,420 lines
- green 1,420 lines
Source: crates/solidcore/src/surface/surf_of_extrusion/p2.rs
Upstream: source/SMLib/src/SmSurfOfExtrusion.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
UPDATE (lazy NURB queries, PR #1197, 2026-10-26): new fixture file lazy_nurb_queries.json (85 cases): OP_LAZY also runs GetNumberControlPoints, IsBilinear, IsParallelToVector, GetKnots, sm_CrossedSeamOrPole (shim copy) and FindTessellationSplits on the five recognised test surfaces; the Surface dispatches take &Kernel and make the NURB via base_with_nurb_or_base. PASS surface.surf_of_extrusion_p2 cases=1548 passed=1548 failed=0 deferred=0. UPDATE (lazy NURB, PR #1191, 2026-10-26): new fixture file lazy_nurb.json (90 cases): OP_LAZY runs an SmSurface query (EvaluateSimple, CalculateBoundingBox, IsDegeneratePoint, IsDegenerateCurve, CreateExtendedSurface, IsPlanar) on an IsNurbSurfaceSurfOfExtrusion result before its lazy NURB exists; the surface.surface_p1/p2/p7 dispatches make it via base_with_nurb. PASS surface.surf_of_extrusion_p2 cases=1463 passed=1463 failed=0 deferred=0 max_rel_err=0e0 (85 of the 90 failed before the fix). Not covered: the kernel-free Surface queries (degree, number_control_points, is_bilinear, is_parallel_to_vector, knots) still read the missing NURB. GREEN (2026-10-23, back-edge wired): PASS surface.surf_of_extrusion_p2 cases=1373 passed=1373 failed=0 deferred=0 max_rel_err=0e0 with_values=1373 no_values=0 vacuous=0 (was 1276 pass, 97 deferred). SurfOfExtrusion::global_surface_intersect (typed, free entry) now runs the general intersection (base SmSurface::GlobalSurfaceIntersect) on ownerless Surface stand-ins instead of the surface.surface_p2 DISPATCH GAP stub; the runner's GlobalSurfaceIntersect ops go through Surface::global_surface_intersect (planes not as_surface keep the typed entry). Root cause of the earlier gen0413/gen0448/gen0732 mismatch (findings 'Free-extrusion general intersection'): the general intersection got the caller's raw tolerance (-1e-6) where upstream's SmApproxTol3d parameter is already fabs'd (SmTol3d ctor); both extrusion entries now pass approx_tol3d(k, t) to the general intersector, and the three cases agree. UPDATE (SurfaceKind::SurfOfExtrusion, #76 follow-up to #313/#436, 2026-10-22): the extrusion is a SurfaceKind; Surface::read_from_db returns it; IntersectWithPlane of a linear/coplanar generator classifies the plane/plane line on the surface (CurveOnClassify, intersect.curve_class_p8 green) and trims it; the GlobalSurfaceIntersect fall-back runs SmAdvSurfaceIntersector through the SmSurface dispatch (face surfaces); for a free extrusion (this unit's runner) it stays a named surface.surface_p2 dispatch gap: on stand-ins, after main 7c74a05f, gen0413/gen0448/gen0732 gave no curves where C++ finds some (plan/findings.md). difftest (Linux, main 7c74a05f merged) 1373 cases, 1276 pass bit-identical, 0 failed, 97 deferred (surface.surface_p2 97); was 1148/225. The B-rep exports carry SmSurfOfExtrusion faces exactly (sc_analytic_export.h): the surface.surf_of_extrusion_p2 dispatch-gap label (695 deferrals over all units) is retired. Shim batch 2: the shim now runs SmAdvSurfaceIntersector for GlobalSurfaceIntersect (was the -3 'not run' marker); the 97 Rust deferrals are relabelled surface.surface_p2 (a surface of extrusion is no SurfaceKind, #76; the intersector itself is ported): 1373 cases, 1148 pass, 225 deferred (intersect.curve_class_p8 128, surface.surface_p2 97). 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 UPDATE (2026-11-04): CreateExtendedSurface's port deleted with the fitted surface extension; lazy-NURB query extend removed (20 lazy_nurb.json fixtures, shim queries 5/6). difftest 1528 cases, all pass bit-identical.
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
- 1,528
- 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.axis2_placement green geom.extent1d green geom.extent2d green geom.object green geom.pseudo_box green geom.solution_array green 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 green 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 green curve.curve_p6 green curve.curve_p7 green nurbs.b_spline_curve_p2 green surface.plane_p2 green surface.surf_of_revolution_p1 green
Dependents: audit.recursion green
Soft dependents: none
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmSurfOfExtrusion::GlobalSurfaceIntersect | SmSurfOfExtrusion.cpp:1651 | 70 | [SurfOfExtrusion::global_surface_intersect], [IntersectTarget] |
SmSurfOfExtrusion::IntersectWithPlane | SmSurfOfExtrusion.cpp:1870 | 679 | [SurfOfExtrusion::intersect_with_plane], [ExtrusionIntersection] |
SmSurfOfExtrusion::IntersectWithCylinder | SmSurfOfExtrusion.cpp:3164 | 143 | [SurfOfExtrusion::intersect_with_cylinder] |
SmSurfOfExtrusion::IntersectWithSurfOfExtrusion | SmSurfOfExtrusion.cpp:3314 | 120 | [SurfOfExtrusion::intersect_with_surf_of_extrusion] |
SmSurfOfExtrusion::IsNurbSurfaceSurfOfExtrusion | SmSurfOfExtrusion.cpp:3447 | 208 | [SurfOfExtrusion::is_nurb_surface_surf_of_extrusion] |
SmSurfOfExtrusion::TrimWithDomain | SmSurfOfExtrusion.cpp:3911 | 96 | [SurfOfExtrusion::trim_with_domain] |
SmSurfOfExtrusion::ReadFromDB | SmSurfOfExtrusion.cpp:4480 | 104 | [SurfOfExtrusion::read_from_db] |
Module file-header table (7 rows)
| Rust | Upstream |
|---|---|
[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