Add `BuildSolid`

This commit is contained in:
Hanno Braun 2023-03-24 14:11:35 +01:00
parent eaaa89793b
commit 63bc10415e
3 changed files with 15 additions and 2 deletions

View File

@ -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,
};

View File

@ -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 {}

View File

@ -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,