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. Face
s 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 Shell
s, 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 HalfEdge
s that bound a Face
have the interior of the
face on their left side (on the face’s front side).
Implementations§
Source§impl Face
impl Face
Sourcepub fn new(surface: Handle<Surface>, region: Handle<Region>) -> Self
pub fn new(surface: Handle<Surface>, region: Handle<Region>) -> Self
Construct an instance of Face
Sourcepub fn coord_handedness(&self, geometry: &Geometry) -> Handedness
pub fn coord_handedness(&self, geometry: &Geometry) -> 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§
Source§impl AllHalfEdgesWithSurface for Face
impl AllHalfEdgesWithSurface for Face
Source§impl Approx for &Face
impl Approx for &Face
Source§type Approximation = FaceApprox
type Approximation = FaceApprox
Source§type Cache = HalfEdgeApproxCache
type Cache = HalfEdgeApproxCache
Source§fn approx_with_cache(
self,
tolerance: impl Into<Tolerance>,
cache: &mut Self::Cache,
core: &mut Core,
) -> Self::Approximation
fn approx_with_cache( self, tolerance: impl Into<Tolerance>, cache: &mut Self::Cache, core: &mut Core, ) -> Self::Approximation
Source§impl BoundingVerticesOfHalfEdge for Face
impl BoundingVerticesOfHalfEdge for Face
Source§fn bounding_vertices_of_half_edge(
&self,
half_edge: &Handle<HalfEdge>,
) -> Option<CurveBoundary<Vertex>>
fn bounding_vertices_of_half_edge( &self, half_edge: &Handle<HalfEdge>, ) -> Option<CurveBoundary<Vertex>>
Source§impl BoundingVolume<3> for Face
impl BoundingVolume<3> for Face
Source§impl BuildFace for Face
impl BuildFace for Face
Source§impl Ord for Face
impl Ord for Face
Source§impl PartialOrd for Face
impl PartialOrd for Face
Source§impl ReplaceCurve for Face
impl ReplaceCurve for Face
Source§fn replace_curve(
&self,
original: &Handle<Curve>,
replacement: Handle<Curve>,
core: &mut Core,
) -> ReplaceOutput<Self, Self::BareObject>
fn replace_curve( &self, original: &Handle<Curve>, replacement: Handle<Curve>, core: &mut Core, ) -> ReplaceOutput<Self, Self::BareObject>
Source§impl ReplaceHalfEdge for Face
impl ReplaceHalfEdge for Face
Source§fn replace_half_edge<const N: usize>(
&self,
original: &Handle<HalfEdge>,
replacements: [Handle<HalfEdge>; N],
core: &mut Core,
) -> ReplaceOutput<Self, Self::BareObject>
fn replace_half_edge<const N: usize>( &self, original: &Handle<HalfEdge>, replacements: [Handle<HalfEdge>; N], core: &mut Core, ) -> ReplaceOutput<Self, Self::BareObject>
Source§impl ReplaceVertex for Face
impl ReplaceVertex for Face
Source§fn replace_vertex(
&self,
original: &Handle<Vertex>,
replacement: Handle<Vertex>,
core: &mut Core,
) -> ReplaceOutput<Self, Self::BareObject>
fn replace_vertex( &self, original: &Handle<Vertex>, replacement: Handle<Vertex>, core: &mut Core, ) -> ReplaceOutput<Self, Self::BareObject>
Source§impl ReverseCurveCoordinateSystems for Face
impl ReverseCurveCoordinateSystems for Face
Source§fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self
fn reverse_curve_coordinate_systems(&self, core: &mut Core) -> Self
Source§impl TransformObject for Face
impl TransformObject for Face
Source§impl UpdateFace for Face
impl UpdateFace for Face
Source§impl Validate for Face
impl Validate for Face
Source§fn validate(
&self,
config: &ValidationConfig,
errors: &mut Vec<ValidationError>,
geometry: &Geometry,
)
fn validate( &self, config: &ValidationConfig, errors: &mut Vec<ValidationError>, geometry: &Geometry, )
Source§fn validate_and_return_first_error(
&self,
geometry: &Geometry,
) -> Result<(), ValidationError>
fn validate_and_return_first_error( &self, geometry: &Geometry, ) -> Result<(), ValidationError>
Source§impl ValidationCheck<Face> for FaceHasNoBoundary
impl ValidationCheck<Face> for FaceHasNoBoundary
Source§fn check(
object: &Face,
_: &Geometry,
_: &ValidationConfig,
) -> impl Iterator<Item = Self>
fn check( object: &Face, _: &Geometry, _: &ValidationConfig, ) -> impl Iterator<Item = Self>
impl Eq for Face
impl StructuralPartialEq for Face
Auto Trait Implementations§
impl Freeze for Face
impl !RefUnwindSafe for Face
impl Send for Face
impl Sync for Face
impl Unpin for Face
impl !UnwindSafe for Face
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn 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.Source§fn 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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§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>
self
from the equivalent element of its
superset. Read moreSource§fn 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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.