mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-08 03:48:27 +00:00
Prepare for follow-on change
This commit is contained in:
parent
77183637a3
commit
93be464872
@ -26,6 +26,24 @@ impl Approx for (&Handle<Curve>, &Handle<Surface>, CurveBoundary<Point<1>>) {
|
|||||||
) -> Self::Approximation {
|
) -> Self::Approximation {
|
||||||
let (curve, surface, boundary) = self;
|
let (curve, surface, boundary) = self;
|
||||||
|
|
||||||
|
approx_curve_with_cache(
|
||||||
|
curve, surface, boundary, tolerance, cache, geometry,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Approximate the provided curve
|
||||||
|
///
|
||||||
|
/// The approximation is cached, and cached approximations are used, where
|
||||||
|
/// possible.
|
||||||
|
pub fn approx_curve_with_cache(
|
||||||
|
curve: &Handle<Curve>,
|
||||||
|
surface: &Handle<Surface>,
|
||||||
|
boundary: CurveBoundary<Point<1>>,
|
||||||
|
tolerance: impl Into<Tolerance>,
|
||||||
|
cache: &mut CurveApproxCache,
|
||||||
|
geometry: &Geometry,
|
||||||
|
) -> CurveApprox {
|
||||||
match cache.get(curve, boundary) {
|
match cache.get(curve, boundary) {
|
||||||
Some(approx) => approx,
|
Some(approx) => approx,
|
||||||
None => {
|
None => {
|
||||||
@ -45,7 +63,6 @@ impl Approx for (&Handle<Curve>, &Handle<Surface>, CurveBoundary<Point<1>>) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
fn approx_curve(
|
fn approx_curve(
|
||||||
path: &SurfacePath,
|
path: &SurfacePath,
|
||||||
|
Loading…
Reference in New Issue
Block a user