Skip to content

Commit

Permalink
Simplify result of Sketch's Sweep impl
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Nov 20, 2023
1 parent ce10c4c commit e2df073
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions crates/fj-core/src/operations/sweep/sketch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
use super::{Sweep, SweepCache};

impl Sweep for (&Sketch, Handle<Surface>) {
type Swept = Handle<Solid>;
type Swept = Solid;

fn sweep_with_cache(
self,
Expand All @@ -31,6 +31,6 @@ impl Sweep for (&Sketch, Handle<Surface>) {
shells.push(shell);
}

Solid::new(shells).insert(services)
Solid::new(shells)
}
}
2 changes: 1 addition & 1 deletion models/cuboid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ pub fn model(x: f64, y: f64, z: f64, services: &mut Services) -> Handle<Solid> {

let surface = services.objects.surfaces.xy_plane();
let path = Vector::from([0., 0., z]);
(&sketch, surface).sweep(path, services)
(&sketch, surface).sweep(path, services).insert(services)
}
2 changes: 1 addition & 1 deletion models/spacer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,5 @@ pub fn model(

let surface = services.objects.surfaces.xy_plane();
let path = Vector::from([0., 0., height]);
(&sketch, surface).sweep(path, services)
(&sketch, surface).sweep(path, services).insert(services)
}
2 changes: 1 addition & 1 deletion models/star/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ pub fn model(

let surface = services.objects.surfaces.xy_plane();
let path = Vector::from([0., 0., h]);
(&sketch, surface).sweep(path, services)
(&sketch, surface).sweep(path, services).insert(services)
}

0 comments on commit e2df073

Please sign in to comment.