diff --git a/crates/fj-core/src/algorithms/approx/cycle.rs b/crates/fj-core/src/algorithms/approx/cycle.rs index c2495fb0b..f975686d3 100644 --- a/crates/fj-core/src/algorithms/approx/cycle.rs +++ b/crates/fj-core/src/algorithms/approx/cycle.rs @@ -32,7 +32,10 @@ impl Approx for (&Cycle, &Handle) { .half_edges() .iter() .map(|half_edge| { - approx_half_edge(half_edge, surface, tolerance, cache, geometry) + let boundary = geometry.of_half_edge(half_edge).boundary; + approx_half_edge( + half_edge, surface, boundary, tolerance, cache, 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 8cf23fc69..8c83c0e41 100644 --- a/crates/fj-core/src/algorithms/approx/half_edge.rs +++ b/crates/fj-core/src/algorithms/approx/half_edge.rs @@ -4,8 +4,10 @@ use std::iter; +use fj_math::Point; + use crate::{ - geometry::Geometry, + geometry::{CurveBoundary, Geometry}, storage::Handle, topology::{HalfEdge, Surface}, }; @@ -20,13 +22,13 @@ use super::{ pub fn approx_half_edge( half_edge: &Handle, surface: &Handle, + boundary: CurveBoundary>, tolerance: impl Into, cache: &mut HalfEdgeApproxCache, geometry: &Geometry, ) -> HalfEdgeApprox { let tolerance = tolerance.into(); - let boundary = geometry.of_half_edge(half_edge).boundary; let [start_position_curve, _] = boundary.inner; let start = approx_vertex(