axiolid-measure
Metric properties: area, volume, centroid, moments of inertia.
| Latest release | 0.3.15 (2026-11-13) |
| crates.io | axiolid-measure |
| Facade | axiolid feature measure |
| Layer | algorithms (algorithm.query) |
| API documentation | rustdoc · docs.rs |
| Source | crates/algorithms/query/measure/ |
Overview
Metric properties of geometry: surface area, signed volume, centroids and second moments of triangle meshes, closest points and distances between segments, triangles and meshes, certified Hausdorff distance between meshes, Frechet distance between polylines, winding numbers, and the area and extent of the faces selected by their normal (a floor, a wall side). Undefined quantities are refused: an open or non-manifold mesh gets an error, not a plausible volume. cycle_volume_properties also accepts meshes closed up to shells that touch along an edge, which are not two-manifold, and still refuses open surfaces. The optional exact feature adds mass properties, certified boundary distance and certified boundary Hausdorff distance for exact B-reps, single solids or bodies of several, without imposing them on mesh-only consumers.
Features
Default: none.
| Feature | Enables |
|---|---|
exact | axiolid-brep, axiolid-curve, axiolid-evaluate, axiolid-overlay, axiolid-surface, axiolid-topology |
Depends on
axiolid-brepaxiolid-coreaxiolid-curveaxiolid-evaluateaxiolid-meshaxiolid-overlayaxiolid-surfaceaxiolid-topology
Changes
Latest release, 0.3.15 (2026-11-13):
Changed
DistanceBounds::upper(all distance and clearance queries, plan and body variants) is at least the distance between the boundary points the witnesses stand for, not their computed distance: it adds their evaluation rounding, 16 ulps of each side's witness scale. A plan overlap still reports[0, 0](#439).
Fixed
- At georeferenced coordinates
Clearance::Belowcould be claimed within about1e-8of a limit the distance does not go below (#439). - The exact Hausdorff lower bound takes off its witness's rounding (a face charted from far away but lying near the origin raised it up to about
1e-9past the distance), and a point query's upper adds its nearest point's (#439). - B-spline witnesses are padded by the de Boor evaluation's rounding, a bound that counts the degrees and the weights' spread (#439). A B-spline face whose weight ratio exceeds
1 / (64 L eps)(Lthe sum of its degrees, about3.5e13for a bilinear patch) is refused withExactMeasureError::NonPlanarFace, since that bound is first order. - The exact Hausdorff upper bound about a B-spline patch's witness adds the distance from the witness to the centre of the patch's enclosing sphere (the control net's box midpoint), which it left out and so could report an upper bound below the distance (#459).
- The exact boundary distance and Hausdorff distance carry rounding margins derived from the magnitudes their numbers are computed from, in ulps of the coordinates, instead of
1e-12of them. At georeferenced coordinates (450000, 5600000) the old margins left an interval about1e-5wide that never closed to the accuracy asked; a search now settles at a floor of 128 ulps of its scale, about3.2e-7there and6e-14at unit scale, and an accuracy below the floor is never reported as met (#318). - The distance search closes gaps along a planar face's normal on certified foot witnesses (the foot of a witness on a planar face, the closest points of two line edges) instead of waiting for patch centres to line up, and the point queries of the Hausdorff search pop equal bounds first in, first out (#318).
- The margin for taking two boundary points as touching is 128 ulps of their magnitudes, not
1e-12of them: items of one body apart by more than that are measured instead of refused asItemsNearlyShareFace, and at unit scale a1e-13gap is now a gap (#318). - The sphere and torus branches of a projected range carried no rounding pad at all (#318).
- The Hausdorff matched bound, a translate's re-charted surface and cone pole, and the displacement gate use the same derived margins, and a plane, cylinder or elliptical cylinder is Lipschitz by its axes rather than
1 + |v|times as steep, which had inflated the bound of patches charted in world coordinates (#318).
Full history: crates/algorithms/query/measure/CHANGELOG.md