Prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-06-24 22:23:30 +02:00
parent 978d4c00f1
commit e7edc33bcb

View File

@ -27,6 +27,18 @@ impl Approx for (&Handle<HalfEdge>, &Handle<Surface>) {
geometry: &Geometry, geometry: &Geometry,
) -> Self::Approximation { ) -> Self::Approximation {
let (half_edge, surface) = self; let (half_edge, surface) = self;
approx_half_edge(half_edge, surface, tolerance, cache, geometry)
}
}
/// Approximate the provided half-edge
pub fn approx_half_edge(
half_edge: &Handle<HalfEdge>,
surface: &Handle<Surface>,
tolerance: impl Into<Tolerance>,
cache: &mut HalfEdgeApproxCache,
geometry: &Geometry,
) -> HalfEdgeApprox {
let tolerance = tolerance.into(); let tolerance = tolerance.into();
let boundary = geometry.of_half_edge(half_edge).boundary; let boundary = geometry.of_half_edge(half_edge).boundary;
@ -67,7 +79,6 @@ impl Approx for (&Handle<HalfEdge>, &Handle<Surface>) {
HalfEdgeApprox { points } HalfEdgeApprox { points }
} }
}
/// An approximation of a [`HalfEdge`] /// An approximation of a [`HalfEdge`]
/// ///