Return bare Solid from spacer model

This commit is contained in:
Hanno Braun 2024-01-30 10:54:29 +01:00
parent d2b47bcb6a
commit 5ba2eb09be
2 changed files with 2 additions and 6 deletions

View File

@ -9,7 +9,6 @@ use fj::{
update::{UpdateRegion, UpdateSketch},
},
services::Services,
storage::Handle,
},
math::{Point, Vector},
};
@ -19,7 +18,7 @@ pub fn model(
inner: f64,
height: f64,
services: &mut Services,
) -> Handle<Solid> {
) -> Solid {
let bottom_surface = services.objects.surfaces.xy_plane();
let sweep_path = Vector::from([0., 0., height]);
@ -36,5 +35,4 @@ pub fn model(
.insert(services),
)
.sweep_sketch(bottom_surface, sweep_path, services)
.insert(services)
}

View File

@ -1,10 +1,8 @@
use std::ops::Deref;
use fj::{core::services::Services, handle_model};
fn main() -> fj::Result {
let mut services = Services::new();
let model = spacer::model(1., 0.5, 1., &mut services);
handle_model(model.deref(), services)?;
handle_model(&model, services)?;
Ok(())
}