1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//! Approximation of objects

mod curve;
mod cycle;
mod edge;
mod face;
mod local;
mod tolerance;

pub use self::{
    cycle::CycleApprox,
    face::FaceApprox,
    local::{Local, LocalForm},
    tolerance::{InvalidTolerance, Tolerance},
};

/// Approximate an object
pub trait Approx {
    /// The approximation of the object
    type Approximation;

    /// Approximate the object
    ///
    /// `tolerance` defines how far the approximation is allowed to deviate from
    /// the actual object.
    fn approx(&self, tolerance: Tolerance) -> Self::Approximation;
}