Units / nurbs
nurbs.nurbs_crv green
- Layer
- 7
- Upstream lines
- 2,200
- Functions
- 27
- Rust module
nurbs::nurbs_crv
Source: crates/solidcore/src/nurbs/nurbs_crv.rs
Upstream: source/SMLib/src/SmNurbsCrv.cpp
Notes
27 fns; largest: sm_CrvRemoveKnots, sm_BasisIDerivs, sm_BasisFindGlobalMax, sm_BasisDerivs; unit-SCC #22 (220 units); 317 upstream test entry points reach this unit; GREEN: difftest 4089 cases (1089 fixture from the six upstream .smc curves, SM_API_test rectangle/polygon edges and edge cases + 3000 generated), all bit-identical (max_rel_err 0), 0 deferred; 51,089-case run clean; --perturb SENSITIVE. No UNPORTED(nurbs.nurbs_crv) stubs existed to wire. Upstream quirks (sm_BasisEval flags domain ends, sm_CrvTrim returns NL_INP_ERR) in plan/findings.md
Difftest
- Cases
- 4,089
- Passed
- 4,089
- Deferred
- 0
- Failed
- 0
- Both errored
- 0
- Max rel. error
- 0.0
- Tolerance
- 1e-09 rel.
- Seeds
- 16
Blocked by
Nothing: no deferred cases.
Report JSON (per-case results)
Dependencies
Depends on: geom.axis2_placement green geom.extent3d green geom.tol green nlib.crv_basic green nlib.knots green nlib.math green
Soft dependencies: geom.extent1d green nlib.crv_nurb green nlib.geom green
Dependents: curve.curve_cache green nurbs.b_spline_curve_n_lib green nurbs.b_spline_curve_p1 green nurbs.b_spline_curve_p2 green nurbs.b_spline_surface_p1 green
Soft dependents: curve.ellipse_p1 green curve.line green nurbs.b_spline_surface_p2 partial surface.b_spline_volume green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmStackHandler::SmStackHandler | SmNurbsCrv.cpp:32 | 7 | (none: Rust owns memory) |
SmStackHandler::~SmStackHandler | SmNurbsCrv.cpp:45 | 6 | Drop of [Curve] |
sm_ExtractFrame | SmNurbsCrv.cpp:59 | 14 | [extract_frame] |
sm_GetKnots | SmNurbsCrv.cpp:82 | 51 | [get_knots] |
sm_CopyNurbCurve | SmNurbsCrv.cpp:166 | 17 | [copy_nurb_curve] |
sm_ComputeNurbCurveSize | SmNurbsCrv.cpp:205 | 12 | (none: Rust owns memory) |
sm_InitNurbCurveMemory | SmNurbsCrv.cpp:231 | 20 | [allocate_nurb_curve] |
sm_AllocateNurbCurve | SmNurbsCrv.cpp:307 | 18 | [allocate_nurb_curve] |
sm_AllocateAndCopyNurbCurve | SmNurbsCrv.cpp:333 | 30 | [copy_nurb_curve] |
sm_FreeNurbCurve | SmNurbsCrv.cpp:371 | 6 | Drop of [Curve] |
sm_FixupKnotVector | SmNurbsCrv.cpp:386 | 86 | [fixup_knot_vector] |
sm_CreateBezSegments | SmNurbsCrv.cpp:478 | 130 | [create_bez_segments] |
sm_CrvSplit | SmNurbsCrv.cpp:614 | 109 | [crv_split] |
sm_CrvTrim | SmNurbsCrv.cpp:729 | 120 | [crv_trim] |
sm_CrvGetEPolygon | SmNurbsCrv.cpp:990 | 27 | [crv_get_epolygon] |
sm_BasisDerivs | SmNurbsCrv.cpp:1023 | 153 | [basis_derivs], [BasisDerivs] |
sm_CrvRationalBasisDerivs | SmNurbsCrv.cpp:1182 | 73 | [crv_rational_basis_derivs] |
sm_CrvDerivs | SmNurbsCrv.cpp:1269 | 68 | [crv_derivs] |
sm_BasisEval | SmNurbsCrv.cpp:1343 | 75 | [basis_eval] |
sm_CrvEval | SmNurbsCrv.cpp:1424 | 51 | [crv_eval] |
sm_CrvRemoveKnots | SmNurbsCrv.cpp:1532 | 382 | [crv_remove_knots] |
sm_BasisFindAllSpanMaxima | SmNurbsCrv.cpp:1966 | 130 | [basis_find_all_span_maxima] |
sm_BasisIEval | SmNurbsCrv.cpp:2145 | 139 | [basis_i_eval] |
sm_CrvRemoveKnotMaxErr | SmNurbsCrv.cpp:2334 | 64 | [crv_remove_knot_max_err] |
sm_BasisIDerivs | SmNurbsCrv.cpp:2457 | 219 | [basis_i_derivs] |
sm_BasisFindGlobalMax | SmNurbsCrv.cpp:2727 | 169 | [basis_find_global_max] |
sm_IsNCrvDegenerate | SmNurbsCrv.cpp:2903 | 24 | [is_ncrv_degenerate] |
Module file-header table (25 rows)
| Rust | Upstream |
|---|---|
[extract_frame] | sm_ExtractFrame |
[get_knots] | sm_GetKnots |
[copy_nurb_curve] | sm_CopyNurbCurve, sm_AllocateAndCopyNurbCurve |
[allocate_nurb_curve] | sm_AllocateNurbCurve, sm_InitNurbCurveMemory |
Drop of [Curve] | sm_FreeNurbCurve, SmStackHandler::~SmStackHandler |
| (none: Rust owns memory) | SmStackHandler::SmStackHandler, sm_ComputeNurbCurveSize (both overloads) |
[fixup_knot_vector] | sm_FixupKnotVector |
[create_bez_segments] | sm_CreateBezSegments |
[crv_split] | sm_CrvSplit |
[crv_trim] | sm_CrvTrim |
[crv_get_epolygon] | sm_CrvGetEPolygon |
[basis_derivs], [BasisDerivs] | sm_BasisDerivs |
[crv_rational_basis_derivs] | sm_CrvRationalBasisDerivs |
[crv_derivs] | sm_CrvDerivs |
[basis_eval] | sm_BasisEval |
[crv_eval] | sm_CrvEval |
to_euclid (crate) | TO_EUCLID (SmNurbsCrv.h) |
[crv_remove_knots] | sm_CrvRemoveKnots |
[basis_find_all_span_maxima] | sm_BasisFindAllSpanMaxima |
[basis_i_eval] | sm_BasisIEval |
[crv_remove_knot_max_err] | sm_CrvRemoveKnotMaxErr |
[basis_i_derivs] | sm_BasisIDerivs |
[basis_find_global_max] | sm_BasisFindGlobalMax |
[is_ncrv_degenerate] | sm_IsNCrvDegenerate |
[MAX_DEGREE], [MAX_DERIV] | GW_MAX_DEGREE, GW_MAX_DERIV |
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