pub struct BrepSolid {
pub name: String,
pub vertices: Vec<BrepVertex>,
pub edges: Vec<BrepEdge>,
pub faces: Vec<BrepFace>,
}Expand description
Complete BREP solid.
Fields§
§name: StringName of the solid.
vertices: Vec<BrepVertex>Vertices.
edges: Vec<BrepEdge>Edges.
faces: Vec<BrepFace>Faces.
Implementations§
Source§impl BrepSolid
impl BrepSolid
Sourcepub fn add_vertex(&mut self, position: [f64; 3]) -> usize
pub fn add_vertex(&mut self, position: [f64; 3]) -> usize
Add a vertex and return its index.
Sourcepub fn add_line_edge(&mut self, start: usize, end: usize) -> usize
pub fn add_line_edge(&mut self, start: usize, end: usize) -> usize
Add a line edge and return its index.
Sourcepub fn add_planar_face(
&mut self,
edge_loop: Vec<usize>,
normal: [f64; 3],
origin: [f64; 3],
) -> usize
pub fn add_planar_face( &mut self, edge_loop: Vec<usize>, normal: [f64; 3], origin: [f64; 3], ) -> usize
Add a planar face and return its index.
Sourcepub fn bounding_box(&self) -> BoundingBox
pub fn bounding_box(&self) -> BoundingBox
Compute the bounding box of the solid.
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Validate the topology: check that all edge vertex references are valid.
Sourcepub fn euler_characteristic(&self) -> i64
pub fn euler_characteristic(&self) -> i64
Get Euler characteristic: V - E + F.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BrepSolid
impl RefUnwindSafe for BrepSolid
impl Send for BrepSolid
impl Sync for BrepSolid
impl Unpin for BrepSolid
impl UnsafeUnpin for BrepSolid
impl UnwindSafe for BrepSolid
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.