mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 18:38:28 +00:00
Merge pull request #2357 from hannobraun/sweep
Make some minor cleanups in sweep code
This commit is contained in:
commit
c949ff7252
@ -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,
|
||||
|
@ -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());
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user