Skip to content

MeshFaceList

Public Class

Provides access to the faces and Face related functionality of a Mesh.

Inheritance Hierarchy

System.Object
Rhino.Geometry.Collections.MeshFaceList

Namespace: Rhino.Geometry.Collections

Assembly: RhinoCommon (in RhinoCommon.dll)

Syntax

public class MeshFaceList : IResizableList<MeshFace>,
IList<MeshFace>, ICollection<MeshFace>, IEnumerable<MeshFace>,
IEnumerable, IList, ICollection, IReadOnlyList<MeshFace>,
IReadOnlyCollection<MeshFace>

The MeshFaceList type exposes the following members.

Properties

Name

Description


Public Property

Gets or sets the total number of mesh triangles and quads the internal data structure can hold without resizing.


Public Property

Gets or sets the number of mesh faces. When getting this can includes invalid faces.


Public Property

Returns the mesh face at the given index.


Public Property

Gets the number of faces that are valid quads (4 corners).


Public Property

Gets the number of faces that are valid triangles (3 corners).


Methods

Name

Description


Public Method

Appends a new mesh face to the end of the mesh face list.


Public Method

Appends a new triangular face to the end of the mesh face list.


Public Method
Code Example

Appends a new quadrangular face to the end of the mesh face list.


Public Method

Appends a list of faces to the end of the mesh face list.


Public Method

Gets all faces that share a topological edge with a given face.


Public Method

Clears the Face list on the mesh.


Public Method
ConvertNonPlanarQuadsToTriangles

Splits non-planar quads into two triangles based on given parameters.


Public Method

Splits all quads along the short diagonal.


Public Method

Joins adjacent triangles into quads if the resulting quad is ‘nice’.


Public Method

Attempts to removes degenerate faces from the mesh.

Degenerate faces are faces that contains such a combination of indices, that their final shape collapsed in a line or point.

Before returning, this method also attempts to repair faces by juggling vertex indices.


Public Method

Removes a collection of faces from the mesh without affecting the remaining geometry.


Public Method

Removes a collection of faces from the mesh without affecting the remaining geometry.


Public Method

Releases all memory allocated to store faces. The list capacity will be 0 after this call.

Subsequent calls can add new items.


Public Method

Equals

Determines whether the specified object is equal to the current object.

(Inherited from Object.)


Public Method

Extracts, or removes, duplicate faces.


Public Method

Extracts, or removes, faces.


Protected Method

Finalize

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.

(Inherited from Object.)


Public Method

Gets an array of pairs of mesh faces that clash.


Public Method

Find all connected face indices


Public Method

Find all connected face indices where adjacent face normals meet the criteria of angleRadians and greaterThanAngle


Public Method

Uses startFaceIndex and finds all connected face indexes up to unwelded or naked edges. If treatNonmanifoldLikeUnwelded is true then non-manifold edges will be considered as unwelded or naked


Public Method

Finds all of the duplicate faces.


Public Method

Gets an enumerator that yields all faces in this collection.


Public Method

Returns the mesh face at the given index.


Public Method

Returns the mesh face at the given index.


Public Method

Gets the bounding box of a face.


Public Method

Gets the center point of a face.

For a triangular face, this is the centroid or barycenter.

For a quad, this is the average of four comer points.


Public Method

Gets the 3D location of the vertices forming a face.


Public Method

GetHashCode

Serves as the default hash function.

(Inherited from Object.)


Public Method

Gets the topology vertex indices of a face.


Public Method

GetType

Gets the Type of the current instance.

(Inherited from Object.)


Public Method

Examines and adds face indexes to whollyDegenerateFaces if the face is a triangle with zero area or a quad both triangles have zero area. Face indexes are added to partiallyDegenerateFaces when a quad has one triangle with zero area.


Public Method

Returns true if at least one of the face edges are not topologically connected to any other faces.


Public Method

Inserts a mesh face at a defined index in this list.


Public Method

Gets a value indicating whether a face is hidden.

A face is hidden if, and only if, at least one of its vertices is hidden.


Protected Method

MemberwiseClone

Creates a shallow copy of the current Object.

(Inherited from Object.)


Public Method

Merges two triangular mesh faces that share an edge into one quadrangular face.


Public Method

Removes a face from the mesh.


Public Method

Removes a face from the mesh.


Public Method

Deletes or fixes mesh faces that have zero area.


Public Method

Sets a face at a specific index of the mesh.


Public Method

Sets a triangular face at a specific index of the mesh.


Public Method

Sets a quadrangular face at a specific index of the mesh.


Public Method

Copies all of the face indices to a linear array of indices per face. Note that this includes indices from invalid faces too.


Public Method

Copies all of the faces to a linear array of indices. Clean-up of vertex indices if replacedIndices is a valid List<int> ///


Public Method

ToString

Returns a string that represents the current object.

(Inherited from Object.)