//! 实心体轮廓
use std::collections::BTreeSet;
use crate::{geometry::Geometry, topology::Solid};
use super::{face::FaceApprox, Approx, ApproxCache, Tolerance};
impl Approx for &Solid {
type Approximation = BTreeSet<FaceApprox>;
type Cache = ApproxCache;
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
geometry: &Geometry,
) -> Self::Approximation {
let tolerance = tolerance.into();
self.shells()
.iter()
.flat_map(|shell| {
shell.approx_with_cache(tolerance, cache, geometry)
})
.collect()
}
}
标签:use,4.1,geometry,cache,1.8,approx,实心体,tolerance
From: https://blog.csdn.net/weixin_43219667/article/details/144023316