Improve grouping of related code

This commit is contained in:
Hanno Braun 2025-05-23 12:44:30 +02:00
parent c5cf4d8b6c
commit 550370fe66

View File

@ -42,13 +42,15 @@ pub fn model(viewer: &Viewer) -> TriMesh {
Handle::new(face)
};
let solid = top.sweep(
FloatingCurve::new(Line {
direction: Vector::from([0., 0., -2.]),
}),
[1.],
);
let solid = solid.to_tri_mesh(tolerance);
let solid = {
let solid = top.sweep(
FloatingCurve::new(Line {
direction: Vector::from([0., 0., -2.]),
}),
[1.],
);
solid.to_tri_mesh(tolerance)
};
viewer.display_model(solid.clone());