Skip to content

Commit

Permalink
Return bare Solid from star model
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Jan 30, 2024
1 parent 7234a05 commit aab193e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions models/star/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use fj::{
update::{UpdateRegion, UpdateSketch},
},
services::Services,
storage::Handle,
},
math::Vector,
};
Expand All @@ -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;
Expand Down Expand Up @@ -55,5 +54,4 @@ pub fn model(
.insert(services),
)
.sweep_sketch(bottom_surface, sweep_path, services)
.insert(services)
}
4 changes: 1 addition & 3 deletions models/star/src/main.rs
Original file line number Diff line number Diff line change
@@ -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(())
}

0 comments on commit aab193e

Please sign in to comment.