Return bare Solid from star model

This commit is contained in:
Hanno Braun 2024-01-30 10:55:11 +01:00
parent 7234a05d41
commit aab193e02a
2 changed files with 2 additions and 6 deletions

View File

@ -11,7 +11,6 @@ use fj::{
update::{UpdateRegion, UpdateSketch},
},
services::Services,
storage::Handle,
},
math::Vector,
};
@ -22,7 +21,7 @@ pub fn model(
r2: f64,
h: f64,
services: &mut Services,
) -> Handle<Solid> {
) -> Solid {
let num_vertices = num_points * 2;
let vertex_iter = (0..num_vertices).map(|i| {
let angle_rad = 2. * PI / num_vertices as f64 * i as f64;
@ -55,5 +54,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 = star::model(5, 1., 2., 1., &mut services);
handle_model(model.deref(), services)?;
handle_model(&model, services)?;
Ok(())
}