axiolid-measure 0.3.4

Metric properties: area, volume, centroid, moments of inertia.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Open measurement capability.

use axiolid_core::Tolerance;

use crate::MassProperties;

/// Compute mass properties for one representation type.
pub trait Measure<T>: core::fmt::Debug + Send + Sync {
    /// Structured failure (open shell, self intersection, unsupported shape).
    type Error: std::error::Error + Send + Sync + 'static;

    /// Measure under an explicit geometric tolerance.
    fn measure(&self, value: &T, tolerance: Tolerance) -> Result<MassProperties, Self::Error>;
}