From b04638ea0ab6f1eda9b8ed3fb3a8dea502550eb9 Mon Sep 17 00:00:00 2001 From: Hanno Braun <hanno@braun-odw.eu> Date: Wed, 8 Feb 2023 12:07:37 +0100 Subject: [PATCH] Refactor --- crates/fj-kernel/src/algorithms/sweep/face.rs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/crates/fj-kernel/src/algorithms/sweep/face.rs b/crates/fj-kernel/src/algorithms/sweep/face.rs index f42cbb2f7..7cf5188df 100644 --- a/crates/fj-kernel/src/algorithms/sweep/face.rs +++ b/crates/fj-kernel/src/algorithms/sweep/face.rs @@ -47,7 +47,7 @@ impl Sweep for Handle<Face> { self.clone().reverse(objects) } }; - faces.push(bottom_face); + faces.push(bottom_face.clone()); let top_face = { let mut face = self.clone().translate(path, objects); @@ -61,12 +61,8 @@ impl Sweep for Handle<Face> { faces.push(top_face); // Generate side faces - for cycle in self.all_cycles().cloned() { - let cycle = if is_negative_sweep { - cycle.reverse(objects) - } else { - cycle - }; + for cycle in bottom_face.all_cycles().cloned() { + let cycle = cycle.reverse(objects); for half_edge in cycle.half_edges().cloned() { let face = (half_edge, self.color())