From f1e1b3ed63cd0315781d74e50c9b7b560cb21fd7 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 25 Jun 2024 20:26:15 +0200 Subject: [PATCH] Prepare for follow-on change --- crates/fj-core/src/algorithms/approx/cycle.rs | 8 +++++++- crates/fj-core/src/algorithms/approx/half_edge.rs | 10 ++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/crates/fj-core/src/algorithms/approx/cycle.rs b/crates/fj-core/src/algorithms/approx/cycle.rs index 50a674a7e..0a17cd2ba 100644 --- a/crates/fj-core/src/algorithms/approx/cycle.rs +++ b/crates/fj-core/src/algorithms/approx/cycle.rs @@ -31,7 +31,13 @@ pub fn approx_cycle( .map(|half_edge| { let boundary = geometry.of_half_edge(half_edge).boundary; approx_half_edge( - half_edge, surface, boundary, tolerance, cache, geometry, + half_edge, + surface, + boundary, + tolerance, + &mut cache.vertex, + &mut cache.curve, + geometry, ) }) .collect(); diff --git a/crates/fj-core/src/algorithms/approx/half_edge.rs b/crates/fj-core/src/algorithms/approx/half_edge.rs index 05be90a96..2a847b8c0 100644 --- a/crates/fj-core/src/algorithms/approx/half_edge.rs +++ b/crates/fj-core/src/algorithms/approx/half_edge.rs @@ -13,7 +13,8 @@ use crate::{ }; use super::{ - curve::approx_curve_with_cache, vertex::approx_vertex, ApproxCache, + curve::{approx_curve_with_cache, CurveApproxCache}, + vertex::{approx_vertex, VertexApproxCache}, ApproxPoint, Tolerance, }; @@ -23,7 +24,8 @@ pub fn approx_half_edge( surface: &Handle, boundary: CurveBoundary>, tolerance: impl Into, - cache: &mut ApproxCache, + vertex_cache: &mut VertexApproxCache, + curve_cache: &mut CurveApproxCache, geometry: &Geometry, ) -> HalfEdgeApprox { let tolerance = tolerance.into(); @@ -35,7 +37,7 @@ pub fn approx_half_edge( half_edge.curve(), surface, start_position_curve, - &mut cache.vertex, + vertex_cache, geometry, ); @@ -44,7 +46,7 @@ pub fn approx_half_edge( surface, boundary, tolerance, - &mut cache.curve, + curve_cache, geometry, );