pub struct Face { /* private fields */ }Expand description
A face of a shape
A Face is a bounded area of a Surface, the Surface itself being an
infinite 2-dimensional object in 3D space. Faces are bound by one exterior
cycle, which defines the outer boundary, and an arbitrary number of interior
cycles (i.e. holes).
Face has a defined orientation, a front and a back side. When faces are
combined into Shells, the face orientation defines what is inside and
outside of the shell. This stands in contrast to Surface, which has no
defined orientation.
You can look at a Face from two directions: front and back. The winding of
the exterior cycle will be clockwise or counter-clockwise, depending on your
perspective. The front side of the face, is the side where from which the
exterior cycle appear counter-clockwise.
Interior cycles must have the opposite winding of the exterior cycle,
meaning on the front side of the face, they must appear clockwise. This
means that all HalfEdges that bound a Face have the interior of the
face on their left side (on the face’s front side).
Implementations
sourceimpl Face
impl Face
sourcepub fn new(
exterior: Handle<Cycle>,
interiors: impl IntoIterator<Item = Handle<Cycle>>,
color: Color
) -> Self
pub fn new(
exterior: Handle<Cycle>,
interiors: impl IntoIterator<Item = Handle<Cycle>>,
color: Color
) -> Self
Construct a new instance of Face
sourcepub fn interiors(&self) -> impl Iterator<Item = &Handle<Cycle>> + '_
pub fn interiors(&self) -> impl Iterator<Item = &Handle<Cycle>> + '_
Access the cycles that bound the face on the inside
Each of these cycles defines a hole in the face.
sourcepub fn all_cycles(&self) -> impl Iterator<Item = &Handle<Cycle>> + '_
pub fn all_cycles(&self) -> impl Iterator<Item = &Handle<Cycle>> + '_
Access all cycles of this face
sourcepub fn coord_handedness(&self) -> Handedness
pub fn coord_handedness(&self) -> Handedness
Determine handed-ness of the face’s front-side coordinate system
A face is defined on a surface, which has a coordinate system. Since surfaces aren’t considered to have an orientation, their coordinate system can be considered to be left-handed or right-handed, depending on which side of the surface you’re looking at.
Faces do have an orientation, meaning they have definite front and back sides. The front side is the side, where the face’s exterior cycle is wound counter-clockwise.
Trait Implementations
sourceimpl Approx for &Face
impl Approx for &Face
type Approximation = FaceApprox
type Approximation = FaceApprox
type Cache = CurveCache
type Cache = CurveCache
sourcefn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache
) -> Self::Approximation
fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache
) -> Self::Approximation
sourceimpl From<&Face> for PartialFace
impl From<&Face> for PartialFace
sourceimpl HasPartial for Face
impl HasPartial for Face
type Partial = PartialFace
type Partial = PartialFace
sourcefn to_partial(&self) -> Self::Partial
fn to_partial(&self) -> Self::Partial
sourceimpl Ord for Face
impl Ord for Face
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
sourceimpl PartialOrd<Face> for Face
impl PartialOrd<Face> for Face
sourcefn partial_cmp(&self, other: &Face) -> Option<Ordering>
fn partial_cmp(&self, other: &Face) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresourceimpl Validate for Face
impl Validate for Face
type Error = FaceValidationError
type Error = FaceValidationError
sourcefn validate_with_config(&self, _: &ValidationConfig) -> Result<(), Self::Error>
fn validate_with_config(&self, _: &ValidationConfig) -> Result<(), Self::Error>
impl Eq for Face
impl StructuralEq for Face
impl StructuralPartialEq for Face
Auto Trait Implementations
impl !RefUnwindSafe for Face
impl Send for Face
impl Sync for Face
impl Unpin for Face
impl !UnwindSafe for Face
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s. Read moreimpl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.