Skip to content

Commit

Permalink
Refactor to prepare for follow-on change
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Mar 26, 2024
1 parent 85f57a9 commit 2160631
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/fj-core/src/algorithms/bounding_volume/edge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ impl super::BoundingVolume<2> for &Handle<HalfEdge> {
let half_edge = self;

let half_edge = geometry.of_half_edge(half_edge);
let path = half_edge.path;

match half_edge.path {
match path {
SurfacePath::Circle(circle) => {
// Just calculate the AABB of the whole circle. This is not the
// most precise, but it should do for now.
Expand All @@ -27,7 +28,7 @@ impl super::BoundingVolume<2> for &Handle<HalfEdge> {
}
SurfacePath::Line(_) => {
let points = half_edge.boundary.inner.map(|point_curve| {
half_edge.path.point_from_path_coords(point_curve)
path.point_from_path_coords(point_curve)
});

Some(Aabb::<2>::from_points(points))
Expand Down

0 comments on commit 2160631

Please sign in to comment.