Skip to content

Commit

Permalink
Merge pull request #2357 from hannobraun/sweep
Browse files Browse the repository at this point in the history
Make some minor cleanups in sweep code
  • Loading branch information
hannobraun committed May 15, 2024
2 parents ae6c209 + a63ad30 commit c949ff7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions crates/fj-core/src/operations/sweep/cycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub trait SweepCycle {
/// operation is called in, and therefore falls outside of its scope.
fn sweep_cycle(
&self,
surface: Handle<Surface>,
bottom_surface: Handle<Surface>,
top_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
Expand All @@ -50,7 +50,7 @@ pub trait SweepCycle {
impl SweepCycle for Cycle {
fn sweep_cycle(
&self,
surface: Handle<Surface>,
bottom_surface: Handle<Surface>,
top_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
Expand All @@ -68,7 +68,7 @@ impl SweepCycle for Cycle {

let (side_face, top_half_edge) = bottom_half_edge.sweep_half_edge(
bottom_half_edge_next.start_vertex().clone(),
surface.clone(),
bottom_surface.clone(),
color,
path,
cache,
Expand Down
2 changes: 1 addition & 1 deletion crates/fj-core/src/operations/sweep/face.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl SweepFace for Handle<Face> {
core,
)
.all_faces()
.map(|side_face| side_face.insert(core));
.map(|face| face.insert(core));

let mut faces = Vec::new();
faces.push(bottom_face.clone());
Expand Down
10 changes: 5 additions & 5 deletions crates/fj-core/src/operations/sweep/region.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub trait SweepRegion {
/// operation's scope.
fn sweep_region(
&self,
surface: Handle<Surface>,
bottom_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
Expand All @@ -42,7 +42,7 @@ pub trait SweepRegion {
impl SweepRegion for Region {
fn sweep_region(
&self,
surface: Handle<Surface>,
bottom_surface: Handle<Surface>,
color: Option<Color>,
path: impl Into<Vector<3>>,
cache: &mut SweepCache,
Expand All @@ -52,11 +52,11 @@ impl SweepRegion for Region {

let mut faces = Vec::new();

let top_surface = surface.translate(path, core).insert(core);
let top_surface = bottom_surface.translate(path, core).insert(core);

let top_exterior = sweep_cycle(
self.exterior(),
surface.clone(),
bottom_surface.clone(),
top_surface.clone(),
color,
&mut faces,
Expand All @@ -71,7 +71,7 @@ impl SweepRegion for Region {
.map(|bottom_cycle| {
sweep_cycle(
bottom_cycle,
surface.clone(),
bottom_surface.clone(),
top_surface.clone(),
color,
&mut faces,
Expand Down

0 comments on commit c949ff7

Please sign in to comment.