solidcore

Units / surface

surface.cone_p3 green

Layer
29
Upstream lines
1,940
Functions
4
Rust module
surface::cone::p3

Status history

Oct 12Nov 25
  1. todo 1,939 lines
  2. partial 1,939 lines
  3. green 1,939 lines

Source: crates/solidcore/src/surface/cone/p3.rs

Upstream: source/SMLib/src/SmCone.cpp

Port-plan notes

These notes preserve historical port measurements and limitations, not current CI results.

GREEN (PR #735, 2026-10-28, pinned SMLib 1.0.1 default): PASS surface.cone_p3 cases=1490 passed=1490 failed=0 deferred=0 max_rel_err=0e0 with_values=1474 no_values=16 vacuous=0. Retains all 1442 exact-base cases and adds 48 axial-domain fixtures; SENSITIVE 1490/1490. Kernel::fixes.cone_parallel_line_domains is an independent default-off correction for WR-259, completing the gap left by the midpoint option. Six analytic regressions and a below-midpoint overlapping-hole Boolean test verify corrected geometry independently; default native parity is unchanged. Full 261-unit sweep: 260 green, 1 existing partial, 0 failed; exact-base artifact ratchet: 0 units regressed. Evidence: plan/findings/surface.cone_p3--requested-axial-domains-735.md. Previous evidence: GREEN (2026-10-23, back-edges wired): PASS surface.cone_p3 cases=1436 passed=1436 failed=0 deferred=0 max_rel_err=0e0 with_values=1420 no_values=16 vacuous=0. Wired UNPORTED(surface.surface_p2): the coincident-cylinder boundary calls of IntersectWithCone now run Surface::intersect_surface_boundaries (on the caller's Surfaces via Cone::global_surface_intersect_on from the common dispatch, else on bare Surface copies), 30 cases; the runner's GlobalSurfaceIntersect ops go through Surface::global_surface_intersect (cone special cases, else base SmSurface::GlobalSurfaceIntersect), 5 cases. Fix needed for the 30: Surface::create_iso_boundaries now returns the typed iso curves (SmLine/SmEllipse as CreateIsoParametricCurve builds them, not their B-spline bases), so IntersectSurfaceBoundaries copies/trims lines and circles as upstream; surface.surface_p9 (779 pass, 42 deferred, unchanged) and surface.surface_p11 (806/806) re-run. PARTIAL (PR #292 / issue #276, UB-154 guard): Linux difftest 1436 cases, 1401 pass (1386 with values, 15 native-guard rejection assertions), 0 failed, 35 deferred (surface.surface_p2 35), max_rel_err 0, no absolute floors; --perturb SENSITIVE 1401/1401; 10,000-case fuzz FUZZ-PASS differs=0 (rejected=4251 malformed=2934 ran=2815). The shim replays IntersectWithCone / IntersectWithPlane up to the two seam-line smgu_LinePlaneIntersect calls of sm_GetEllipseTrimIntervals and refuses an input iff one fails (upstream then reads the uninitialised dParam); fixtures ub154.json: 7 rejections (issue fuzz00656, fuzz09540, zero-height and 0.99e-12 seams) and 13 neighbours just inside validity compared (1.13e-12 seams, axes 1.1e-6 rad apart, planes 3e-8 rad from the axis). Earlier: PARTIAL (PR #226 / issue #207; trim-domain status follow-up): Linux difftest 1416 cases, 1381 pass (1373 with values, 8 native-guard rejection assertions, Rust executed but not compared), 0 failed, 35 deferred (surface.surface_p2 typed Cone adapter 35; surface.cone_p2 wired by PR #153), max_rel_err 0, no absolute floors. Eight preserved status-1006 fuzz cases and four reduced plane intersections now pass after the GetHeight fix; two plane cases return circles. Three global fuzz cases and two valid-axis global neighbors explicitly defer on the existing general Cone adapter. The FFI accepts cone angles only within the documented [-360, 360]: far angles make native evaluation wrap one turn per iteration (HANG-1) and polar set-up never ends near 9.2e18 (HANG-23; Rust stops with NotConverged after 2^20 turns). 72 angle_bounds cases compare cones at both limits with every flag. A 10,000-case fuzz passes with no timeouts. The native guard intercepts only an attempted STEP-to-NURBS conversion with a null polar circle (UB-179), preserving defined early exits and non-null converters. Earlier evidence: PARTIAL (PR #131): 1308 difftest cases (108 fixtures + 1200 generated), 1187 pass bit-identical, 0 failed, 121 deferred (surface.cone_p2 91: sm_GetEllipseTrimIntervals; surface.surface_p2 30: Cone/Cylinder SurfaceKind adapter for the merged IntersectSurfaceBoundaries), max_rel_err 0, no absolute floors; 10108-case stress run clean (9048 pass, 1060 deferred), all 1187 default perturbations detected. Review follow-up adds optional/zero/negative/system-default tolerance fixtures, 320 native dispatch combinations and 14 constructor probes; native FFI tests are validated locally, separately from the unchanged CI workflow. Maintainer review: UB-123 documented; boundary bundles checked before duplicate removal; general fallback resets outputs. Global dispatch retains original arguments through a typed general-intersector callback until SurfaceKind can hold cones; sphere/shared Surface dispatch remains a documented gap (issue #76). 4 fns; largest: SmCone::IntersectWithPlane, SmCone::IntersectWithCone, sm_AddEllipseIntervalsTrimmedToTwoCones, SmCone::GlobalSurfaceIntersect; cycle back-edges (call into later units; stub or co-port): surface.surf_of_extrusion_p2(1), surface.surface_p11(1); unit-SCC #22 (220 units); 144 upstream test entry points reach this unit. Fuzz follow-up: reversed angle ranges snap/compare against the raw start/end angles as SmCone.cpp:3385-3390 (fixture fuzz_reversed_angle_range); IntersectWithCone ignores the ConvertUVFromSTEPToNURBS status (SmCone.cpp:2966-2967), now mirrored for a Y axis that unitizes to zero (upstream-issues WR-159; fixtures fuzz_axis_overflow_zero_y, _trimmed, _swapped). 1312 difftest cases (112 fixtures + 1200 generated), 1191 pass, 0 failed, 121 deferred [surface.cone_p2 wired (PR #153): 1312 cases, 1282 pass, 0 failed, 30 deferred (surface.surface_p2 30); --perturb SENSITIVE 1282/1282]

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,490
Stored error outcomes
9
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.extent3d green geom.geom_utility_p1 green geom.tol green geom.vector3d green nurbs.b_spline_curve_p1 green nurbs.b_spline_surface_p1 green surface.cone_p1 green surface.cone_p2 green surface.surf_of_revolution_p1 green surface.surf_of_revolution_p3 green surface.surface_p2 partial

Soft dependencies: curve.curve_p4 green curve.ellipse_p1 green curve.ellipse_p2 green curve.line green geom.geom_utility_p2 green geom.vector2d green nurbs.b_spline_curve_p2 green surface.plane_p1 partial surface.plane_p2 green surface.sphere green

Dependents: audit.recursion green

Soft dependents: none

Upstream functions

Upstream functionDefined atLinesRust (from the file header)
SmCone::GlobalSurfaceIntersectSmCone.cpp:2335111[Cone::global_surface_intersect_with]
SmCone::IntersectWithConeSmCone.cpp:2605609[Cone::intersect_with_cone]
SmCone::IntersectWithPlaneSmCone.cpp:32201077[Cone::intersect_with_plane]
sm_AddEllipseIntervalsTrimmedToTwoConesSmCone.cpp:5669143add_ellipse_intervals_trimmed_to_two_cones
Module file-header table (4 rows)
RustUpstream
[Cone::intersect_with_plane]SmCone::IntersectWithPlane
[Cone::intersect_with_cone]SmCone::IntersectWithCone
[Cone::global_surface_intersect_with]SmCone::GlobalSurfaceIntersect
add_ellipse_intervals_trimmed_to_two_conessm_AddEllipseIntervalsTrimmedToTwoCones

Upstream tests reaching this unit

prog_test:my_test_surface_interface, prog_test:my_test_ssi, prog_test:my_test_tsurf_section, prog_test:my_test_planar_section, prog_test:my_test_section, prog_test:my_test_edge_geometry_repairs, pt_TestFiles/shovel.srf