Skip to content

Commit

Permalink
Remove unused data from array
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 17, 2023
1 parent 86f0def commit 7066f6b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions crates/fj-kernel/src/algorithms/intersect/surface_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ impl SurfaceSurfaceIntersection {
// Adaptations were made to get the intersection curves in local
// coordinates for each surface.

let surfaces_and_planes = surfaces.map(|surface| {
let plane = plane_from_surface(&surface);
(surface, plane)
});
let [a, b] = surfaces_and_planes.clone().map(|(_, plane)| plane);
let planes = surfaces.map(|surface| plane_from_surface(&surface));
let [a, b] = planes;

let (a_distance, a_normal) = a.constant_normal_form();
let (b_distance, b_normal) = b.constant_normal_form();
Expand All @@ -57,7 +54,7 @@ impl SurfaceSurfaceIntersection {

let line = Line::from_origin_and_direction(origin, direction);

let curves = surfaces_and_planes.map(|(_, plane)| {
let curves = planes.map(|plane| {
let path = SurfacePath::Line(plane.project_line(&line));
let global_form = GlobalCurve.insert(objects);

Expand Down

0 comments on commit 7066f6b

Please sign in to comment.