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

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::{ 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,