mass.integrator partial
- Layer
- 48
- Upstream lines
- 1,066
- Functions
- 26
- Rust module
mass::integrator
Status history
- todo 1,031 lines
- partial 1,031 lines
- green 1,031 lines
- partial 1,066 lines
Source: crates/solidcore/src/mass/integrator.rs
Upstream: source/SMLib/inc/SmIntegrator.h, source/SMLib/src/SmBrep.cpp, source/SMLib/src/SmEdge.cpp, source/SMLib/src/SmFace.cpp, source/SMLib/src/SmIntegrator.cpp, source/SM_API/src/SmApiQueries.cpp
Port-plan notes
These notes preserve historical port measurements and limitations, not current CI results.
[2026-11-05 (#2091): PARTIAL, 127 known mismatches and 16 parked: UpstreamFixes::precise_properties_span_end_from_below is deleted, each iso-u piece's end is evaluated from its own knot span (WR-670); 34 issue1435 cases move again within their accuracy (plan/findings/mass.integrator--span-end-from-below-default-moves-cases-2026-11-05.md)] [2026-11-05 (#1435): PARTIAL, 127 known mismatches and 16 parked: UpstreamFixes::precise_properties_split_at_surface_knots is deleted, precise properties always integrate between the surface's knots (WR-494); 34 issue1435 cases move again within their accuracy and issue1435_multispan_full_eps1e-08_*_flags63 succeed (2.8e-11 off a 1e-10 reference at 1e-8) where they underflowed (plan/findings/mass.integrator--split-at-surface-knots-default-moves-cases-2026-11-05.md)] [2026-11-05 (#1556 follow-on): PARTIAL, 127 known mismatches and 16 parked: precise-property steps are accepted on the larger of the embedded and the fifth-order estimate (plan/findings/mass.integrator--quadrature-step-estimate-moves-cases-2026-11-05.md)] [2026-11-05 (#1556): PARTIAL, 38 known mismatches and 16 parked WR-563 cases: UpstreamFixes::precise_properties_trim_base_v is deleted, the iso-u integrals always start at the trims' lowest v; the bounded-face cases move within their accuracy (plan/findings/mass.integrator--trim-base-v-default-moves-cases-2026-11-05.md), the unbounded and half-open ones are C++ defects (plan/upstream-issues/WR-563--addendum-2026-11-05-trim-base-v-default.md)] PARTIAL (PR #119): difftest 1528 cases, 1521 pass, 0 fail, 7 deferred (query.brep 3, query.face_p1 2, topology.brep_p1 2; the thick-face case deferred on surface.offset_surface passes since PR #62), max_rel_err 4.979280456316938e-14, no absolute floors. Real C++ scalar/ODE integrators, precise edge/face properties and API queries; all 63 face masks in both orientations; disk/annulus trims, rotated planes and curved B-spline patches; exact rational arcs, weighted curves, cusps, zero spans, tight-accuracy failures/retries and nested AreaIntegrand; 1200 fixed-seed generated cases and 155 review regressions, adaptive step sizes/counts, scale mutation, evaluator failures, reversed and near-zero intervals, small/large magnitudes. Full precise-property and SM_API control flow ported with explicit stubs for missing bounding-box/enumeration/oriented-boundary/region/offset callees; boundary_properties accepts already-oriented trims. All 3 UNPORTED(mass.integrator) sites wired (curve.curve_p5, surface.surface_p1, topology.face_p2). Dimensions <=4096, steps <=1000000, rejected-step retries <=1024, no input-driven recursion. 25 fns; largest: SmBrep::ComputePreciseProperties, SmODEIntegrator::RungeKuttaODEIntegrate, SmFace::ComputePreciseProperties, SmApiBrepComputeMassProperties; entry points: SmApiBrepComputeArea, SmApiBrepComputeMassProperties, SmApiBrepComputeVolume, SmApiEdgeComputeLength, SmApiFaceComputeArea, SmApiFaceComputeCentroid; cycle back-edges (call into later units; stub or co-port): query.brep(2), query.face_p1(2); unit-SCC #22 (220 units); 146 upstream test entry points reach this unit; Re-run in PR #154: SmRegion::IsVoid wired to topology::Region::is_void (topology.shell); re-run after merging main: same 1528 cases, 1521 pass, 0 fail, 7 deferred UPDATE after topology.brep_p1 (PR #145): SmBrep::GetFaces/GetEdges/GetVertices wired. The runner integrates an empty Brep for the face queries 2-6 (the C++ constructs a face from the parameters), which was the real cause of the query-4 disagreement seen when wiring; the Rust is still run so a genuine unit blocker keeps its label, and only an outcome that depends on the missing face is deferred as harness:mass.integrator-face-construction. Re-run (after merging main with #62): 1528 cases, 1521 pass, 0 fail, 7 deferred (query.brep 3, query.face_p1 2, harness:mass.integrator-face-construction 1, topology.brep_p2 1). Re-run in PR #238 (query.face_p1 wired, face_box takes the kernel; after merging main with #145): 1528 cases, 1521 pass, 0 fail, 7 deferred (query.brep 3, topology.brep_p8 2: the face API probes 2-3 run on an empty Rust B-rep and defer to SmBrep::CreateFaceFromSurface, harness:mass.integrator-face-construction 1, topology.brep_p2 1). UPDATE after topology.brep_p2 (PR #149) wired SmBrep::IsManifoldSolid: the topology.brep_p2 deferral (a face query on the runner's empty Brep) takes the harness:mass.integrator-face-construction label of #145's runner change: 1528 cases, 1520 pass, 0 fail, 8 deferred (query.brep 3, query.face_p1 2, harness:mass.integrator-face-construction 2, surface.offset_surface 1). Re-run after merging #145 5b1b28ae (main through e1ae2640) into #149: 1528 cases, 1521 pass, 0 fail, 7 deferred (query.brep 3, query.face_p1 2, harness:mass.integrator-face-construction 2). Re-run in PR #149 (merge with main through 39ceb995, #283): 1528 cases, 1521 pass, 0 fail, 7 deferred (query.brep 3, topology.brep_p8 2, harness:mass.integrator-face-construction 2): main's topology.brep_p2 IsManifoldSolid deferral takes the runner's face-construction label. Runner fix (difftest bit-identical runners): plane-face trims are rebuilt as the SmLine the C++ integrates, not their NURB; 1528 cases, 1521 pass, 0 fail, 7 deferred, max_rel_err 0. GREEN 2026-10-23: runner wired to build the face for queries 2-6 as the shim does (new_brep + topology::brep::p8::create_face_from_surface over the requested UV domain, then props::face_area / face_centroid / brep_area / brep_volume / brep_mass_properties); UNPORTED(topology.brep_p8) stub and harness:mass.integrator-face-construction deferral for those queries removed. difftest: 1528 cases, 1528 pass, 0 fail, 0 deferred, max_rel_err 0 (face_api_dependency_6 compares the status only: both sides reject the sheet in SmApiBrepComputeMassProperties). Disk/annulus faces (CreateFacesWithCurves) are not wired for queries 2-6; no case exercises them. #1435 (WR-494): opt-in UpstreamFixes::precise_properties_split_at_surface_knots ports the SolidCraft fork's tangency-labs/smlib@08d9a14 (both integration levels split at the surface's knots; topology::face::p2::trim_curve_breaks / surface_knots_inside); default off, unchanged. New face kind 5 (multi-span rational quadratic B-spline patch: u knot 0.4, double v knot 0.5) with 62 cases in fixtures/mass.integrator/issue1435_multispan.json (domains crossing, between and at the knots; accuracies 1e-3 to 1e-8; huge/tiny scale; queries 0 and 2-6). difftest: 1590 cases, 1590 pass, 0 fail, 0 deferred, max_rel_err 0. #1556 (WR-563): opt-in UpstreamFixes::precise_properties_trim_base_v starts the iso-u integrals at the trims' lowest v, not the face UV domain's (a face unbounded in v lost its accuracy, C++ too); default off, unchanged. 24 disk cases with bounded, unbounded and half-open v domains in fixtures/mass.integrator/issue1556_unbounded_v.json. difftest: 1614 cases, 1614 pass, 0 fail, 0 deferred, max_rel_err 0.
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,628
- 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.a_object green geom.extent3d green geom.object green geom.vector3d green topology.brep_p1 green topology.brep_p2 green topology.edge green topology.edgeuse_p1 green topology.face_p1 green topology.face_p2 partial
Soft dependencies: curve.curve_p2 green curve.curve_p5 partial geom.attribute green geom.context green geom.extent1d green geom.extent2d green geom.tol green nurbs.b_spline_curve_p1 green topology.shell green topology.vertex green
Dependents: audit.recursion green
Soft dependents: none
Upstream functions
| Upstream function | Defined at | Lines | Rust (from the file header) |
|---|---|---|---|
SmIntegFuncEvalObj::Evaluate | SmIntegrator.h:57 | 2 | |
SmIntegrator::~SmIntegrator | SmIntegrator.h:83 | 1 | |
SmIntegrator::SmIntegrator | SmIntegrator.h:105 | 4 | |
SmODEIntegFuncEvalObj::Evaluate | SmIntegrator.h:126 | 3 | |
SmODEIntegrator::~SmODEIntegrator | SmIntegrator.h:174 | 1 | |
SmBrep::ComputePreciseProperties | SmBrep.cpp:1627 | 218 | |
SmEdge::ComputePreciseProperties | SmEdge.cpp:355 | 71 | |
SmLoopOrientationSampler::SignedArea | SmFace.cpp:1671 | 8 | |
SmODEAreaIFEO::SmODEAreaIFEO | SmFace.cpp:5780 | 12 | |
SmFace::ComputePreciseProperties | SmFace.cpp:6119 | 15 | |
SmFace::ComputePreciseProperties | SmFace.cpp:6144 | 140 | |
SmODEEval::SmODEEval | SmIntegrator.cpp:45 | 1 | [integrate], [integrate_with_kernel] |
SmODEEval::Evaluate | SmIntegrator.cpp:57 | 12 | |
SmIntegrator::IntegrateIt | SmIntegrator.cpp:78 | 45 | [integrate], [integrate_with_kernel] |
SmODEIntegrator::SmODEIntegrator | SmIntegrator.cpp:307 | 11 | [OdeIntegrator] |
SmODEIntegrator::RungeKutta5thOrderStep | SmIntegrator.cpp:368 | 49 | [OdeIntegrator::step] |
SmODEIntegrator::RungeKuttaCashKarpAdvance | SmIntegrator.cpp:424 | 83 | [OdeIntegrator::step] |
SmODEIntegrator::RungeKuttaODEIntegrate | SmIntegrator.cpp:516 | 124 | [OdeIntegrator::integrate] |
sm_BrepComputePropertiesAbout | SmApiQueries.cpp:808 | 16 | |
SmApiBrepComputeVolume | SmApiQueries.cpp:835 | 26 | |
SmApiBrepComputeArea | SmApiQueries.cpp:873 | 28 | |
SmApiBrepComputeMassProperties | SmApiQueries.cpp:917 | 90 | |
sm_FaceAreaEstimate | SmApiQueries.cpp:1115 | 6 | |
SmApiFaceComputeArea | SmApiQueries.cpp:1134 | 37 | |
SmApiFaceComputeCentroid | SmApiQueries.cpp:1294 | 42 | |
SmApiEdgeComputeLength | SmApiQueries.cpp:1378 | 21 |
Module file-header table (4 rows)
| Rust | Upstream |
|---|---|
[integrate], [integrate_with_kernel] | SmIntegrator::IntegrateIt, SmODEEval |
[OdeIntegrator] | SmODEIntegrator |
[OdeIntegrator::integrate] | RungeKuttaODEIntegrate |
[OdeIntegrator::step] | RungeKutta5thOrderStep, RungeKuttaCashKarpAdvance |
Upstream tests reaching this unit
prog_test:my_test_curve_interface, prog_test:my_test_methods, SM_API_test:TestSmCreateSkinPrimitive, prog_test:my_test_bsplinecurve, prog_test:my_test_closed_sphere_properties, prog_test:my_test_squeeze_edge_tracks_removal