Merge pull request #2357 from hannobraun/sweep

Make some minor cleanups in sweep code
This commit is contained in:
Hanno Braun 2024-05-15 15:10:07 +02:00 committed by GitHub
commit c949ff7252
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 9 deletions

View File

@ -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>>,
@ -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>>,
@ -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,

View File

@ -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());

View File

@ -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,
@ -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,
@ -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,
@ -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,