mirror of https://github.com/hannobraun/Fornjot
Add `BuildSolid`
This commit is contained in:
parent
eaaa89793b
commit
63bc10415e
|
@ -2,6 +2,7 @@ mod cycle;
|
|||
mod edge;
|
||||
mod face;
|
||||
mod shell;
|
||||
mod solid;
|
||||
mod surface;
|
||||
|
||||
pub use self::{
|
||||
|
@ -9,5 +10,6 @@ pub use self::{
|
|||
edge::BuildHalfEdge,
|
||||
face::{BuildFace, Polygon},
|
||||
shell::{BuildShell, TetrahedronShell},
|
||||
solid::BuildSolid,
|
||||
surface::BuildSurface,
|
||||
};
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
use crate::objects::Solid;
|
||||
|
||||
/// Build a [`Solid`]
|
||||
pub trait BuildSolid {
|
||||
/// Build an empty solid
|
||||
fn empty() -> Solid {
|
||||
Solid::new([])
|
||||
}
|
||||
}
|
||||
|
||||
impl BuildSolid for Solid {}
|
|
@ -7,8 +7,8 @@ mod update;
|
|||
|
||||
pub use self::{
|
||||
build::{
|
||||
BuildCycle, BuildFace, BuildHalfEdge, BuildShell, BuildSurface,
|
||||
Polygon, TetrahedronShell,
|
||||
BuildCycle, BuildFace, BuildHalfEdge, BuildShell, BuildSolid,
|
||||
BuildSurface, Polygon, TetrahedronShell,
|
||||
},
|
||||
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
|
||||
join::JoinCycle,
|
||||
|
|
Loading…
Reference in New Issue