Skip to content

T_Rhino_Geometry_MeshFace

Will Pearson edited this page Aug 12, 2016 · 2 revisions

MeshFace Structure

Represents the values of the four indices of a mesh face quad. If the third and fourth values are the same, this face represents a triangle.

Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll) Version: Rhino 6.0

Syntax

C#

[SerializableAttribute]
public struct MeshFace : IEquatable<MeshFace>, 
	IComparable<MeshFace>, IComparable

VB

<SerializableAttribute>
Public Structure MeshFace
	Implements IEquatable(Of MeshFace), IComparable(Of MeshFace), 
	IComparable

The MeshFace type exposes the following members.

Constructors

 

Name Description
Public method MeshFace(Int32, Int32, Int32) Constructs a new triangular Mesh face.
Public method MeshFace(Int32, Int32, Int32, Int32) Constructs a new quadrangular Mesh face.
  Back to Top

Properties

 

Name Description
Public property A Gets or sets the first corner index of the mesh face.
Public property B Gets or sets the second corner index of the mesh face.
Public property C Gets or sets the third corner index of the mesh face.
Public property D Gets or sets the fourth corner index of the mesh face. If D equals C, the mesh face is considered to be a triangle rather than a quad.
Public property IsQuad Gets a value indicating whether or not this mesh face is a quad. A mesh face is considered to be a triangle when C does not equal D, thus it is possible for an Invalid mesh face to also be a quad.
Public property IsTriangle Gets a value indicating whether or not this mesh face is a triangle. A mesh face is considered to be a triangle when C equals D, thus it is possible for an Invalid mesh face to also be a triangle.
Public property Item Gets or sets the vertex index associated with an entry in this face.
Public propertyStatic member Unset Gets an Unset MeshFace. Unset faces have Int32.MinValue for all corner indices.
  Back to Top

Methods

 

Name Description
Public method CompareTo Compares this MeshFace with another MeshFace and returns a value of 1, 0, or -1, referring to dictionary order. Index evaluation priority is first A, then B, then C, then D.
Public method Equals(Object) Indicates whether this instance and a specified object are equal. (Inherited from ValueType.)
Public method Equals(Object) Returns a value indicating whether the other object obj has precisely the same value as the current one. (Overrides ValueType.Equals(Object).)
Public method Equals(MeshFace) Returns a value indicating whether the other mesh face has precisely the same value as the current one.
Public method Flip Reverses the orientation of the face by swapping corners. The first corner is always maintained.
Public method GetHashCode() Returns the hash code for this instance. (Inherited from ValueType.)
Public method GetHashCode() Returns a runtime-stable hashcode for the current mesh face. You are not allowed to rely on persistance of this hashcode in serialization, but for each version of RhinoCommon, this hashcode will be the same for each mesh face. (Overrides ValueType.GetHashCode().)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method IsValid() Gets a value indicating whether or not this mesh face is considered to be valid. Note that even valid mesh faces could potentially be invalid in the context of a specific Mesh, if one or more of the corner indices exceeds the number of vertices on the mesh. If you want to perform a complete validity check, use IsValid(int) instead.
Public method IsValid(Int32) Gets a value indicating whether or not this mesh face is considered to be valid. Unlike the simple IsValid function, this function takes upper bound indices into account.
Public method IsValid(Point3d[]) Gets a value indicating whether or not this mesh face is considered to be valid. Unlike the simple IsValid function, this function takes actual point locations into account.
Public method Repair Attempts to repair this mesh face by taking both face indexes and actual vertex locations into account.
Public method Set(Int32, Int32, Int32) Sets all the corners for this face as a triangle.
Public method Set(Int32, Int32, Int32, Int32) Sets all the corners for this face as a quad.
Public method ToString() Returns the fully qualified type name of this instance. (Inherited from ValueType.)
Public method ToString() Returns a string representation for this MeshFace. This is to provide a meaningful visualization of this structure and is subject to change in newer releases. (Overrides ValueType.ToString().)
  Back to Top

Operators

 

Name Description
Public operatorStatic member Equality Determines whether two MeshFace structures have equal values.
Public operatorStatic member Inequality Determines whether two MeshFace structures have different values.
  Back to Top

Version Information

Supported in: 6.0.16224.21491, 5D58w

See Also

Reference

Rhino.Geometry Namespace

Clone this wiki locally