Refactor to prepare for follow-on change

This commit is contained in:
Hanno Braun 2023-12-14 12:59:56 +01:00
parent bb9e8d4daa
commit d3c7924f6b

View File

@ -20,6 +20,9 @@ pub fn model(
height: f64, height: f64,
services: &mut Services, services: &mut Services,
) -> Handle<Solid> { ) -> Handle<Solid> {
let surface = services.objects.surfaces.xy_plane();
let path = Vector::from([0., 0., height]);
let sketch = Sketch::empty().add_region( let sketch = Sketch::empty().add_region(
Region::circle(Point::origin(), outer, services) Region::circle(Point::origin(), outer, services)
.add_interiors([Cycle::circle(Point::origin(), inner, services) .add_interiors([Cycle::circle(Point::origin(), inner, services)
@ -28,8 +31,6 @@ pub fn model(
.insert(services), .insert(services),
); );
let surface = services.objects.surfaces.xy_plane();
let path = Vector::from([0., 0., height]);
sketch sketch
.sweep_sketch(surface, path, services) .sweep_sketch(surface, path, services)
.insert(services) .insert(services)