fj_kernel/algorithms/approx/sketch.rs
1//! Sketch approximation
2
3use std::collections::BTreeSet;
4
5use crate::objects::Sketch;
6
7use super::{edge::EdgeCache, face::FaceApprox, Approx, Tolerance};
8
9impl Approx for &Sketch {
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}