nurbs.b_spline_surface_n_lib_p2 green
- Layer
- 18
- Upstream lines
- 1,933
- Functions
- 4
- Rust module
nurbs::b_spline_surface_n_lib::p2
Status history
- todo 1,932 lines
- partial 1,932 lines
- green 1,932 lines
Source: crates/solidcore/src/nurbs/b_spline_surface_n_lib/p2.rs
Upstream: source/SMLib/src/SmBSplineSurfaceNLib.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
PARTIAL: difftest 654 cases (54 fixture + 600 generated), 632 pass bit-identical, 22 deferred (curve.crv_on_surf 17: SmCrvOnSurf::ApproximateCurve in G1 corner blends (surface.surface_p2 GetNaturalUVDomain wired); surface.surface_p3 5, moved from surface.surface_p7 with PR #24); 20k-seed run clean; GetDerivativeLimit co-ported (CO-PORT(surface.surface_p2)); no UNPORTED(nurbs.b_spline_surface_n_lib_p2) stubs existed. 4 fns; largest: SmBSplineSurface::CreateCornerBlend, SmBSplineSurface::Evaluate, SmBSplineSurface::CreateSkinnedSurface, SmBSplineSurface::TrimWithDomain; cycle back-edges (call into later units; stub or co-port): curve.curve_p2(4), surface.surface_p2(3), curve.tangent_field(2), curve.crv_on_surf(1), curve.curve_p3(1), curve.curve_p4(1), surface.surface_p1(1), surface.surface_p3(1), surface.surface_p7(1); unit-SCC #22 (220 units); 317 upstream test entry points reach this unit PR #106: internal evaluate_with_partial_output retains the derivative matrix written before exhausted zero-tangent correction; SurfaceEval consumes it as upstream does. Public Evaluate still returns its error. Collapsed-surface regressions compare the retained values in surface.surface_point_solve_p2/p3. fix/geom-stale-stubs: SmTangentField::ApproximateCurve (inherited SmCrvOnSurf::ApproximateCurve -> SmCurve::ApproximateCurve on the field) ported in p2 over the field (approximate_tangent_field), so the curve.crv_on_surf deferrals should now compare; counts pending the central difftest run. GREEN (2026-10-23, PR #587): difftest PASS nurbs.b_spline_surface_n_lib_p2 cases=654 passed=654 failed=0 deferred=0 max_rel_err=0e0 with_values=654 no_values=0 vacuous=0; the former 22 deferrals (curve.crv_on_surf 17, surface.surface_p3 5) no longer occur on main 9fd1c67c5 (crv_on_surf ones wired by fix/geom-stale-stubs, merged to main via #579); local rerun and CI run 39923812958 agree. UPDATE (PR #775): CreateCornerBlend evaluates its neighbours through the virtual SmSurface dispatch (Surface::evaluate_normal with the SmSphere/SmPlane overrides, evaluate_normal_section, the generic Evaluate and GetNaturalUVDomain; SmTangentField over the Surface) instead of their B-spline nets; BlendNeighbour carries the surface only. The UNPORTED(nurbs.b_spline_surface_n_lib_p2) non-B-spline neighbour stubs in topology::brep::p1 and blend::fillet_corner::p3 are wired (topology.brep_p1 cone/sphere/surf_sphere150 corner_blend_3 now stop at the topology.face_p2 owner handle of the face surface, #651, like torus/surf_rev). The runner adds 120 G1 corner blends on SmCone/SmCylinder/SmSphere/SmTorus neighbours (analytic000..119, own seed series): difftest 774 cases, 774 pass bit-identical, 0 deferred, 0 failed; --perturb SENSITIVE 774/774.
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
- 774
- 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: geom.extent1d green geom.extent2d green geom.extent3d green geom.object green geom.vector2d green geom.vector3d green nurbs.b_spline_curve_n_lib green nurbs.b_spline_curve_p1 green nurbs.b_spline_surface_n_lib_p1 green nurbs.b_spline_surface_p1 green
Soft dependencies: geom.tol green nlib.crv_basic green nlib.crv_tool_p1 green nlib.math green nlib.srf_adv_p1 green nlib.srf_adv_p5 green nlib.srf_basic green nlib.srf_nurb green nlib.srf_tool_p1 green nurbs.b_spline_curve_p2 green
Dependents: nurbs.b_spline_surface_p2 green surface.cone_p1 green surface.surface_approximate green
Soft dependents: blend.fillet_corner_p3 partial blend.fillet_custom_solver green blend.fillet_geom_p4 partial blend.fillet_standard_solver_p1 green blend.hcr green primitive.primitive_creation_p3 green surface.surface_p2 partial sweep.api_surfaces green topology.brep_p1 green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmBSplineSurface::CreateCornerBlend | SmBSplineSurfaceNLib.cpp:3008 | 740 | [BSplineSurface::create_corner_blend], [OrientType], [BlendNeighbour] |
SmBSplineSurface::CreateSkinnedSurface | SmBSplineSurfaceNLib.cpp:5269 | 457 | [BSplineSurface::create_skinned_surface], [SkinnedSurfaceOptions] |
SmBSplineSurface::TrimWithDomain | SmBSplineSurfaceNLib.cpp:7455 | 270 | [BSplineSurface::trim_with_domain], [BSplineSurface::trim_with_domain_with], [TrimOptions] |
SmBSplineSurface::Evaluate | SmBSplineSurfaceNLib.cpp:8131 | 466 | [BSplineSurface::evaluate], [EvaluateFlags] |
Module file-header table (5 rows)
| Rust | Upstream |
|---|---|
[BSplineSurface::create_corner_blend], [OrientType], [BlendNeighbour] | CreateCornerBlend, SmOrientType, its SmSurface* |
[BSplineSurface::create_corner_blend_on_faces] | CreateCornerBlend with the fork's lFaceSides (WR-613) |
[BSplineSurface::create_skinned_surface], [SkinnedSurfaceOptions] | CreateSkinnedSurface |
[BSplineSurface::trim_with_domain], [BSplineSurface::trim_with_domain_with], [TrimOptions] | TrimWithDomain |
[BSplineSurface::evaluate], [EvaluateFlags] | Evaluate |
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