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 edge;
|
||||||
mod face;
|
mod face;
|
||||||
mod shell;
|
mod shell;
|
||||||
|
mod solid;
|
||||||
mod surface;
|
mod surface;
|
||||||
|
|
||||||
pub use self::{
|
pub use self::{
|
||||||
|
@ -9,5 +10,6 @@ pub use self::{
|
||||||
edge::BuildHalfEdge,
|
edge::BuildHalfEdge,
|
||||||
face::{BuildFace, Polygon},
|
face::{BuildFace, Polygon},
|
||||||
shell::{BuildShell, TetrahedronShell},
|
shell::{BuildShell, TetrahedronShell},
|
||||||
|
solid::BuildSolid,
|
||||||
surface::BuildSurface,
|
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::{
|
pub use self::{
|
||||||
build::{
|
build::{
|
||||||
BuildCycle, BuildFace, BuildHalfEdge, BuildShell, BuildSurface,
|
BuildCycle, BuildFace, BuildHalfEdge, BuildShell, BuildSolid,
|
||||||
Polygon, TetrahedronShell,
|
BuildSurface, Polygon, TetrahedronShell,
|
||||||
},
|
},
|
||||||
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
|
insert::{Insert, IsInserted, IsInsertedNo, IsInsertedYes},
|
||||||
join::JoinCycle,
|
join::JoinCycle,
|
||||||
|
|
Loading…
Reference in New Issue