surface.surface_p9 green
- Layer
- 23
- Upstream lines
- 1,252
- Functions
- 3
- Rust module
surface::surface::p9
Status history
- todo 1,252 lines
- partial 1,252 lines
- green 1,252 lines
Source: crates/solidcore/src/surface/surface/p9.rs
Upstream: source/SMLib/src/SmSurface.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
2026-10-26 (wire/small-unported-sites): +8 compared cases, sphere and torus diagonals (fixtures/surface.surface_p9/sphere-torus-diagonals.json; shim kinds 5 and 6): cases=833 passed=833 deferred=0; the bss() analytic-surface stub is unreachable (SmCrvOnSurf holds the analytic surface itself), now an InvalidInput. GREEN (2026-10-23, runner object): PASS surface.surface_p9 cases=821 passed=821 failed=0 deferred=0 max_rel_err=0e0 with_values=821 no_values=0 vacuous=0 (was 2 deferred: csi_domain_narrow_u/_v at SmSurface::GetNaturalUVDomain in geom::solution_array). The runner's solution-object handle for the surface now carries the real surface's natural UV domain (SolutionObject::natural_uv_domain), as the shim's surface pointer reaches it (same approach as geom.global_solver, PR #593); no library change. Cone iso/tessellation (area 6b, 2026-10-22): iso curves dispatch to the cone/sphere/torus CreateIsoParametricCurve, implicit iso curves evaluate cone/sphere/torus through the surface, SmLine iso lengths use the SmLine ApproximateLength override; difftest gains cylinder and canonical-cone kinds (30% of generated cases, no diagonals: the kernel only asks diagonals for B-spline/extrusion, the analytic diagonal SmCrvOnSurf stays unported); 821 cases, 779 pass, 42 deferred (intersect.curve_class_p2 40, surface.surface_p2 2), 0 failed, max_rel_err 1.8e-16; before 769 pass / 52 deferred. 3 fns; largest: SmCSIGlobalSolver::LocalSolve, SmSurface::FindTessellationSplits, SmSurface::CreateIsoBoundaries; cycle back-edges (call into later units; stub or co-port): surface.surface_p5(4), surface.surface_p1(3), surface.surface_p7(2), surface.surface_p4(1), surface.surface_p6(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; Follow-up (guard narrowing): 821 cases, 763 bit-identical, 0 failed, 58 deferred (intersect.curve_class_p4 50, surface.surface_p6 8); --perturb 763/763 detected; max_rel_err=0; FFI guard now only requires finite net/domain/chord/max side/line (CSI domains may be disjoint, touching or slivers; any scale; chord heights below 1e-3; max side above 100), keeping the [0,1] split/iso domain, the angle range, revolution-CSI rejection (one-node Rust harness tree does not model BuildTree) and the shim all-degenerate 0<max side<1 guard, plus max|net|/max side <= 1e5 (ULONG split-count conversion; Rust 1e6 split limit); 43 guard-narrowing fixtures (7 CSI crossings deferred on surface.surface_p6); max-side iso degeneracy now dispatches to the typed curve (SmEllipse/SmLine IsDegenerate); no absolute floors; CO-PORTED(surface.surface_p1): extend the existing CsiGlobalSolver with optional borrowed curve/cache/kernel context; preserve its constructor and implement its solves in p9; wire surface_to_evaluate, is_node_valid and is_point_valid; CSI disjoint fixture passes, crossing defers on surface.surface_p6; 16 explicit analytic-plane non-diagonal fixtures pass; latest main SurfOfRevolution delegates iso construction to its virtual implementation; 18 canonical-cylinder cases pass against C++ (16 splits, 2 iso boundaries) [surface.surface_p6 wired (PR #92): 821 cases, 763 pass, 58 deferred (intersect.curve_class_p4 50, surface.surface_p4 8)] Re-run (PR #52, after merging surface_p4/#49 and surface_p5/#50): 821 cases, 763 pass, 58 deferred (intersect.curve_class_p4 50, surface.surface_point_solve_p3 8). Re-run after merging PR #106 (surface.surface_point_solve_p3 wired, 2026-10-15): 821 cases, 769 pass, 52 deferred (intersect.curve_class_p4 50, surface.surface_p2 2), 0 failed, max_rel_err 0. Re-run (PR #118, round 3: implicit_iso over a plane evaluates through the plane): 821 cases, 769 pass, 52 deferred (intersect.curve_class_p4 50, surface.surface_p2 2), 0 failed; --perturb SENSITIVE 769/769.
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
- 833
- 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.extent1d green geom.extent2d green geom.global_solver green geom.object green geom.pseudo_box green geom.tol green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_p1 green surface.surface_cache_p1 green surface.surface_p2 partial
Soft dependencies: curve.crv_on_surf green curve.curve_cache green curve.curve_p1 green curve.curve_p3 partial curve.curve_p4 green curve.curve_p5 partial curve.curve_p6 green curve.iso_curve green geom.extent3d green geom.solution_array green geom.tree green nurbs.b_spline_curve_n_lib green nurbs.b_spline_curve_p2 green
Dependents: blend.identify_fillet green surface.surface_assert_valid green surface.surface_p11 green
Soft dependents: surface.surface_cache_p2 green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmSurface::FindTessellationSplits | SmSurface.cpp:11644 | 329 | [Surface::find_tessellation_splits] |
SmCSIGlobalSolver::LocalSolve | SmSurface.cpp:13887 | 878 | [CsiGlobalSolver::local_solve_branch] |
SmSurface::CreateIsoBoundaries | SmSurface.cpp:14877 | 45 | [Surface::create_iso_boundaries] |
Module file-header table (3 rows)
| Rust | Upstream |
|---|---|
[Surface::find_tessellation_splits] | SmSurface::FindTessellationSplits |
[Surface::create_iso_boundaries] | SmSurface::CreateIsoBoundaries |
[CsiGlobalSolver::local_solve_branch] | SmCSIGlobalSolver::LocalSolve |
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