Refactor to prepare for follow-on change

This commit is contained in:
Hanno Braun 2024-03-26 12:16:59 +01:00
parent 8bdc4c4926
commit e5fbafd692

View File

@ -8,7 +8,9 @@ use crate::{
impl super::BoundingVolume<2> for &Handle<HalfEdge> {
fn aabb(self, geometry: &Geometry) -> Option<Aabb<2>> {
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<HalfEdge> {
})
}
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)