From e5fbafd69219337dce7a7dc22297980b36ae1872 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Tue, 26 Mar 2024 12:16:59 +0100 Subject: [PATCH] Refactor to prepare for follow-on change --- crates/fj-core/src/algorithms/bounding_volume/edge.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/fj-core/src/algorithms/bounding_volume/edge.rs b/crates/fj-core/src/algorithms/bounding_volume/edge.rs index 21543cf3b..ad153cd8e 100644 --- a/crates/fj-core/src/algorithms/bounding_volume/edge.rs +++ b/crates/fj-core/src/algorithms/bounding_volume/edge.rs @@ -8,7 +8,9 @@ use crate::{ impl super::BoundingVolume<2> for &Handle { fn aabb(self, geometry: &Geometry) -> Option> { - match geometry.of_half_edge(self).path { + let half_edge = self; + + match geometry.of_half_edge(half_edge).path { SurfacePath::Circle(circle) => { // Just calculate the AABB of the whole circle. This is not the // most precise, but it should do for now. @@ -22,7 +24,7 @@ impl super::BoundingVolume<2> for &Handle { }) } SurfacePath::Line(_) => { - let geometry = geometry.of_half_edge(self); + let geometry = geometry.of_half_edge(half_edge); let points = geometry.boundary.inner.map(|point_curve| { geometry.path.point_from_path_coords(point_curve)