From d3c7924f6bb24f404c5a40f5bbfc3e2878567e62 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 14 Dec 2023 12:59:56 +0100 Subject: [PATCH] Refactor to prepare for follow-on change --- models/spacer/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/models/spacer/src/lib.rs b/models/spacer/src/lib.rs index b45af3891..aaf9800c4 100644 --- a/models/spacer/src/lib.rs +++ b/models/spacer/src/lib.rs @@ -20,6 +20,9 @@ pub fn model( height: f64, services: &mut Services, ) -> Handle { + let surface = services.objects.surfaces.xy_plane(); + let path = Vector::from([0., 0., height]); + let sketch = Sketch::empty().add_region( Region::circle(Point::origin(), outer, services) .add_interiors([Cycle::circle(Point::origin(), inner, services) @@ -28,8 +31,6 @@ pub fn model( .insert(services), ); - let surface = services.objects.surfaces.xy_plane(); - let path = Vector::from([0., 0., height]); sketch .sweep_sketch(surface, path, services) .insert(services)