pub struct BrepFace {
pub id: usize,
pub edge_loops: Vec<Vec<usize>>,
pub surface_type: SurfaceType,
pub normal: [f64; 3],
pub origin: [f64; 3],
pub params: Vec<f64>,
}Expand description
A face in the BREP representation.
Fields§
§id: usizeUnique identifier.
edge_loops: Vec<Vec<usize>>Edge loops bounding this face (outer loop first, then holes).
surface_type: SurfaceTypeSurface type.
normal: [f64; 3]Surface normal (for planar faces).
origin: [f64; 3]Surface origin (for parametric surfaces).
params: Vec<f64>Surface parameters (type-dependent).
Implementations§
Source§impl BrepFace
impl BrepFace
Sourcepub fn planar(
id: usize,
edge_loop: Vec<usize>,
normal: [f64; 3],
origin: [f64; 3],
) -> Self
pub fn planar( id: usize, edge_loop: Vec<usize>, normal: [f64; 3], origin: [f64; 3], ) -> Self
Create a new planar face.
Sourcepub fn cylindrical(
id: usize,
edge_loop: Vec<usize>,
axis: [f64; 3],
origin: [f64; 3],
radius: f64,
) -> Self
pub fn cylindrical( id: usize, edge_loop: Vec<usize>, axis: [f64; 3], origin: [f64; 3], radius: f64, ) -> Self
Create a cylindrical face.
Sourcepub fn spherical(
id: usize,
edge_loop: Vec<usize>,
center: [f64; 3],
radius: f64,
) -> Self
pub fn spherical( id: usize, edge_loop: Vec<usize>, center: [f64; 3], radius: f64, ) -> Self
Create a spherical face.
Sourcepub fn outer_loop(&self) -> &[usize]
pub fn outer_loop(&self) -> &[usize]
Get the outer edge loop.
Sourcepub fn hole_loops(&self) -> &[Vec<usize>]
pub fn hole_loops(&self) -> &[Vec<usize>]
Get hole loops (if any).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BrepFace
impl RefUnwindSafe for BrepFace
impl Send for BrepFace
impl Sync for BrepFace
impl Unpin for BrepFace
impl UnsafeUnpin for BrepFace
impl UnwindSafe for BrepFace
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.