From 3307e18aa182fe090eb45b4ad9e9308218c01a95 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 28 Jul 2022 14:13:53 +0200 Subject: [PATCH] Refactor --- .../src/algorithms/intersection/curve_face.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/intersection/curve_face.rs b/crates/fj-kernel/src/algorithms/intersection/curve_face.rs index 60956af58..e9be9e811 100644 --- a/crates/fj-kernel/src/algorithms/intersection/curve_face.rs +++ b/crates/fj-kernel/src/algorithms/intersection/curve_face.rs @@ -22,7 +22,11 @@ impl CurveFaceIntersectionList { ) -> Self { let intervals = intervals .into_iter() - .map(|interval| interval.map(Into::into)) + .map(|interval| { + interval + .map(Into::into) + .map(CurveEdgeIntersection::from_point_on_curve) + }) .collect(); Self { intervals } } @@ -40,7 +44,7 @@ impl CurveFaceIntersectionList { let intersection = CurveEdgeIntersection::compute(curve, &edge); if let Some(intersection) = intersection { - intersections.push(intersection.point_on_curve()); + intersections.push(intersection); } } @@ -129,7 +133,7 @@ impl IntoIterator for CurveFaceIntersectionList { } /// An intersection between a curve and a face, in curve coordinates -pub type CurveFaceIntersection = [Point<1>; 2]; +pub type CurveFaceIntersection = [CurveEdgeIntersection; 2]; #[cfg(test)] mod tests {