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

Build a Face using FaceBuilder

Construct a new instance of Face

Creates the face with no interiors and the default color. This can be overridden using the with_ methods.

Add interior cycles to the face

Consumes the face and returns the updated instance.

Panics

Panics, if the added cycles are not defined in the face’s surface.

Panics, if the winding of the interior cycles is not opposite that of the exterior cycle.

Update the color of the face

Consumes the face and returns the updated instance.

Access this face’s surface

Access the cycle that bounds the face on the outside

Access the cycles that bound the face on the inside

Each of these cycles defines a hole in the face.

Access all cycles of this face

Access the color of the face

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

The approximation of the object
The cache used to cache approximation results
Approximate the object, using the provided cache Read more
Approximate the object Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Extends a collection with the contents of an iterator. Read more
🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
Return all objects that this one references
Iterate over all faces
Iterate over all curves
Iterate over all cycles
Iterate over all global curves
Iterate over all global vertices
Iterate over all half-edges
Iterate over all shells
Iterate over all sketches
Iterate over all solids
Iterate over all surfaces
Iterator over all vertices
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Reverse the direction/orientation of the object
The object that is created by sweeping the implementing object
Sweep the object along the given path
Transform the object
Translate the object Read more
Rotate the object Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Convert 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 more
Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more
Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more
Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more
Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Checks if self is actually part of its subset T (and can be converted to it).
Use with care! Same as self.to_subset but without any property checks. Always succeeds.
The inclusion map: converts self to the equivalent element of its superset.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Validate the object
Validate the object using default configuration Read more