use fj_math::Point;
use crate::{
objects::{Shell, Solid},
operations::{
build::shell::BuildShell, Insert, IsInsertedYes, TetrahedronShell,
UpdateSolid,
},
services::Services,
};
pub trait BuildSolid {
fn empty() -> Solid {
Solid::new([])
}
fn tetrahedron(
points: [impl Into<Point<3>>; 4],
services: &mut Services,
) -> Tetrahedron {
let shell = Shell::tetrahedron(points, services).insert(services);
let solid = Solid::empty().add_shell(shell.shell.clone());
Tetrahedron { solid, shell }
}
}
impl BuildSolid for Solid {}
pub struct Tetrahedron {
pub solid: Solid,
pub shell: TetrahedronShell<IsInsertedYes>,
}