mirror of
https://github.com/hannobraun/Fornjot
synced 2025-05-05 02:18:28 +00:00
Inline redundant function
This commit is contained in:
parent
a489484f95
commit
9937928005
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user