Inline redundant function

This commit is contained in:
Hanno Braun 2025-01-31 21:03:08 +01:00
parent a489484f95
commit 9937928005
2 changed files with 4 additions and 15 deletions

View File

@ -2,7 +2,7 @@ use crate::{
geometry::{AnyOp, Sketch},
math::{Bivector, Plane, Point, Vector},
storage::Stores,
topology::solid::Solid,
topology::sweep::SweepExt,
};
pub fn model() -> AnyOp {
@ -25,8 +25,7 @@ pub fn model() -> AnyOp {
let top = stores.faces.insert(top);
let solid = Solid::sweep_from(
top,
let solid = top.sweep(
[0., 0., -1.],
&mut stores.faces,
&mut stores.surfaces,

View File

@ -1,10 +1,10 @@
use crate::{
geometry::{AnyOp, Handle, Operation, TriMesh},
math::{Plane, Vector},
math::Plane,
storage::Store,
};
use super::{face::Face, sweep::SweepExt, vertex::Vertex};
use super::face::Face;
pub struct Solid {
faces: Vec<Handle<Face>>,
@ -17,16 +17,6 @@ impl Solid {
}
}
pub fn sweep_from(
origin: Handle<Face>,
path: impl Into<Vector<3>>,
faces: &mut Store<Face>,
surfaces: &mut Store<Plane>,
vertices: &mut Store<Vertex>,
) -> Self {
origin.sweep(path, faces, surfaces, vertices)
}
/// Connect two faces by creating a side wall of faces from their vertices
///
/// ## Panics