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
§type Approximation = FaceApprox
type Approximation = FaceApprox
§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 PartialEq for Face
impl PartialEq for Face
source§impl PartialOrd for Face
impl PartialOrd for Face
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§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> 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§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.