Refactor to prepare for follow-on change

This commit is contained in:
Hanno Braun 2023-12-14 12:51:01 +01:00
parent 07b3869698
commit 0e6b4037a4

View File

@ -19,6 +19,9 @@ pub fn model(
) -> Handle<Solid> { ) -> Handle<Solid> {
let [x, y, z] = size.into().components; let [x, y, z] = size.into().components;
let surface = services.objects.surfaces.xy_plane();
let path = Vector::from([Scalar::ZERO, Scalar::ZERO, z]);
let sketch = Sketch::empty().add_region( let sketch = Sketch::empty().add_region(
Region::polygon( Region::polygon(
[ [
@ -32,8 +35,6 @@ pub fn model(
.insert(services), .insert(services),
); );
let surface = services.objects.surfaces.xy_plane();
let path = Vector::from([Scalar::ZERO, Scalar::ZERO, z]);
sketch sketch
.sweep_sketch(surface, path, services) .sweep_sketch(surface, path, services)
.insert(services) .insert(services)