Units / nurbs
nlib.spiral green
- Layer
- 8
- Upstream lines
- 392
- Functions
- 8
- Rust module
nurbs::spiral
Source: crates/solidcore/src/nurbs/spiral.rs
Upstream: source/SMLib/src/NL_Spiral.cpp, source/SMLib/src/SmNurbsVol.cpp
Notes
8 fns; largest: N_CrvApproxSpiral, sm_InitNurbVolumeMemory, sm_AllocateAndCopyNurbVolume, sm_ComputeNurbVolumeSize; 317 upstream test entry points reach this unit; GREEN: difftest 2032 cases (32 fixture from TestSmCreateHelixInvalidInputs, smSurfaceTest.cpp:1975 CreateHelixSegment, span-limit/fixed-point/volume edge cases + 2000 generated), all bit-identical (max_rel_err 0), 0 deferred; 20k-seed run clean; --perturb SENSITIVE. No UNPORTED(nlib.spiral) stubs existed. Upstream N_CrvApproxSpiral crashes (N_EndNurbs on uninitialised SL) on its early input errors: ffi rejects those inputs, Rust returns NL_INP_ERR (findings.md)
Difftest
- Cases
- 2,032
- Passed
- 2,032
- 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: none
Soft dependencies: nlib.crv_basic green nlib.crv_fit_p3 green nlib.crv_nurb green
Dependents: none
Soft dependents: nurbs.b_spline_curve_n_lib green surface.b_spline_volume green
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
N_CrvApproxSpiral | NL_Spiral.cpp:88 | 176 | [approx_spiral], [SpiralSpec], [ApproxSpiral] |
ST_GetSpiralAngle | NL_Spiral.cpp:459 | 5 | Spiral::radius_at (private) |
ST_GetPointAtAngle | NL_Spiral.cpp:468 | 13 | Spiral::point_at (private) |
ST_GetPointAtAngleD | NL_Spiral.cpp:485 | 15 | Spiral::deriv_at (private) |
sm_ComputeNurbVolumeSize | SmNurbsVol.cpp:1064 | 40 | (none: Rust owns memory) |
sm_InitNurbVolumeMemory | SmNurbsVol.cpp:1120 | 55 | [allocate_nurb_volume] |
sm_AllocateNurbVolume | SmNurbsVol.cpp:1239 | 38 | [allocate_nurb_volume] |
sm_AllocateAndCopyNurbVolume | SmNurbsVol.cpp:1287 | 50 | [copy_nurb_volume] |
Module file-header table (10 rows)
| Rust | Upstream |
|---|---|
[approx_spiral], [SpiralSpec], [ApproxSpiral] | N_CrvApproxSpiral |
[Hand] | RorL (1 = right hand, else left) |
Spiral::radius_at (private) | ST_GetSpiralAngle |
Spiral::point_at (private) | ST_GetPointAtAngle |
Spiral::deriv_at (private) | ST_GetPointAtAngleD |
[CURVE_CPT_LIMIT] | NL_CCPLIM |
[Volume] | NL_VOLUME / gw_VOLUME |
[allocate_nurb_volume] | sm_AllocateNurbVolume, sm_InitNurbVolumeMemory |
[copy_nurb_volume] | sm_AllocateAndCopyNurbVolume |
| (none: Rust owns memory) | sm_ComputeNurbVolumeSize |
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