fj_kernel/algorithms/approx/shell.rs
1//! Shell approximation
2
3use std::collections::BTreeSet;
4
5use crate::objects::Shell;
6
7use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
8
9impl Approx for &Shell {
10 type Approximation = BTreeSet<FaceApprox>;
11 type Cache = EdgeCache;
12
13 fn approx_with_cache(
14 self,
15 tolerance: impl Into<Tolerance>,
16 cache: &mut Self::Cache,
17 ) -> Self::Approximation {
18 self.faces().approx_with_cache(tolerance, cache)
19 }
20}