MeshNgonList

References
Provides access to the ngons and ngon-related functionality of a Mesh. See also the Mesh.Ngons property for Ngon functionality details.

Properties

Count

#Since v6.0
public int Count { get; set; }
Gets or sets the number of mesh ngons.
Count
Explicit

ICollection<MeshNgon>.IsReadOnly

#
Explicit

ICollection.IsSynchronized

#
bool ICollection.IsSynchronized
Explicit

ICollection.SyncRoot

#
Explicit

IList.IsFixedSize

#
bool IList.IsFixedSize
Explicit

IList.IsReadOnly

#
bool IList.IsReadOnly

UnsignedCount

#Since v6.0
[CLSCompliant(false)] public uint UnsignedCount { get; set; }
Gets or sets the number of mesh ngons.

Indexers

Explicit

IList.this[]

#
object IList.this[int index]
index (int)

this[]

#
public MeshNgon this[int index] { get; set; }
Returns the mesh ngon at the given index.
index (int)Index of face to get. Must be larger than or equal to zero and smaller than the Face Count of the mesh.

Methods

AddNgon

#Since v6.0
public int AddNgon(MeshNgon ngon)
Appends a new ngon to the end of the mesh ngon list.
ngon (MeshNgon)Ngon to add.
The index of the newly added ngon.

AddNgons

#Since v6.0
public int[] AddNgons(IEnumerable<MeshNgon> ngons)
Appends a list of ngons to the end of the mesh ngon list.
ngons (IEnumerable<MeshNgon>)Ngons to add.
Indices of the newly created ngons

AddPlanarNgons

#Since v6.0
public int AddPlanarNgons(double planarTolerance, int minimumNgonVertexCount, int minimumNgonFaceCount, bool allowHoles)
Add an ngon for each group of connected coplanar faces.
planarTolerance (double)3d distance tolerance for coplanar test.
minimumNgonVertexCount (int)Minimum number of vertices for an ngon.
minimumNgonFaceCount (int)Minimum number of faces for an ngon.
allowHoles (bool)Determines whether the ngon can have inner boundaries.
Number of ngons added to the mesh.

AddPlanarNgons

#Since v6.0
public int AddPlanarNgons(double planarTolerance)
Add an ngon for each group of connected coplanar faces.
planarTolerance (double)3d distance tolerance for coplanar test.
Number of ngons added to the mesh.

Clear

#Since v6.0
public void Clear()
Clears the Ngon list on the mesh.

GetEnumerator

#Since v6.0
public IEnumerator<MeshNgon> GetEnumerator()
Gets an enumerator that yields all ngons in this collection.
The enumerator.

GetNgon

#Since v6.0
public MeshNgon GetNgon(int index)
Returns the mesh ngon at the given index.
index (int)Index of ngon to get. Must be larger than or equal to zero and smaller than the Ngon Count of the mesh.
The mesh ngon at the given index. This ngon can be MeshNgon.Empty.

GetNgonBoundary

#Since v6.0
public int[] GetNgonBoundary(IEnumerable<int> ngonFaceIndexList)
Get a list of vertices that form the boundary of a face set. This is often use to get ngon boundaries.
ngonFaceIndexList (IEnumerable<int>)List of mesh face indices.
List of mesh vertex indices that form the boundary of the face set.

GetNgonBoundingBox

#Since v6.0
public BoundingBox GetNgonBoundingBox(int index)
Gets the bounding box of an ngon.
index (int)A ngon index.
A new bounding box, or BoundingBox.Empty on error.

GetNgonBoundingBox

#Since v6.0
public BoundingBox GetNgonBoundingBox(MeshNgon ngon)
Gets the bounding box of an ngon.
ngon (MeshNgon)An ngon.
A new bounding box, or BoundingBox.Empty on error.

GetNgonCenter

#Since v6.0
public Point3d GetNgonCenter(int index)
Gets the center point of an ngon.

This the average of the corner points.

index (int)A ngon index.
The center point.

GetNgonCenter

#Since v6.0
public Point3d GetNgonCenter(MeshNgon ngon)
Gets the center point of an ngon.

This the average of the corner points.

ngon (MeshNgon)An ngon.
The center point.

GetNgonEdgeCount

#Since v6.0
public int GetNgonEdgeCount(int index)
Gets the complete edge count of an ngon.
index (int)Ngon index.
Complete edge count or zero on error.

GetNgonOuterEdgeCount

#Since v6.0
public int GetNgonOuterEdgeCount(int index)
Gets the outer edge count of an ngon.
index (int)Ngon index.
Outer edge count or zero on error.

Insert

#Since v6.0
public void Insert(int index, MeshNgon ngon)
Inserts a mesh ngon at a defined index in this list.
index (int)An ngon index.
ngon (MeshNgon)An ngon.
ArgumentOutOfRangeExceptionIf index is negative or >= Count.

IsValid

#Since v6.0
[CLSCompliant(false)] public uint IsValid(int index, TextLog textLog)
Tests an ngon to see if the vertex and face references are valid and pass partial boundary validity checks.
Remarks: If the return value is > MeshNgon.BoundaryVertexCount, then the ngon has either inner boundaries or duplicate vertices.
index (int)The index of the ngon to test.
textLog (TextLog)A text log for collecting information about problems.
0 if the ngon is not valid, otherwise the number of boundary edges.

IsValid

#Since v6.0
[CLSCompliant(false)] public uint IsValid(int index)
Tests an ngon to see if the vertex and face references are valid and pass partial boundary validity checks.
Remarks: If the return value is > MeshNgon.BoundaryVertexCount, then the ngon has either inner boundaries or duplicate vertices.
index (int)The index of the ngon to test.
0 if the ngon is not valid, otherwise the number of boundary edges.

NgonBoundaryVertexList

#Since v6.0
public Point3d[] NgonBoundaryVertexList(MeshNgon ngon, bool bAppendStartPoint)
Get an ngon's boundary points.
ngon (MeshNgon)ngon.
bAppendStartPoint (bool)If true, the first point in the list is also appended to the end of the list to create a closed polyline.
A list of ngon boundary points.

NgonHasHoles

#Since v6.0
public bool NgonHasHoles(int index)
Determines whether a ngon has holes.
Remarks: A slit, for example, will give an edge count that differs from outer edge count despite the lack of true "holes" i.e. interior edges that are not shared by more than one face of the ngon in question.
index (int)Ngon index.
true for holes (or malformed ngon, see remarks), false for no holes.

NgonIndexFromFaceIndex

#Since v6.0
public int NgonIndexFromFaceIndex(int meshFaceIndex)
Returns the index of a mesh ngon the face belongs to.
meshFaceIndex (int)Index of a mesh face.
The index of the mesh ngon the face belongs to or -1 if the face does not belong to an ngon.

Orientation

#Since v7.0
public int Orientation(int index, bool permitHoles)
Determine if the ngon's boundary orientation matches that of the set of faces it is made from.
index (int)Ngon index.
permitHoles (bool)true if the ngon is permitted to have interior holes, false otherwise.
1: The ngon does not have holes, the ngon's faces are compatibly oriented, and the ngon's outer boundary orientation matches the faces' orientation. -1: The ngon does not have holes, the ngon's faces are compatibly oriented, and the ngon's outer boundary orientation is opposite the faces' orientation. 0: Otherwise.The ngon may be invalid, have holes, the ngon's faces may not be compatibly oriented, the ngons edges may not have a consistent orientation with respect to the faces, or some other issue.

RemoveAllNgons

#Since v8.23
public int RemoveAllNgons()
Removes all ngons from the mesh.
The number deleted ngons.

RemoveAt

#Since v6.0
public void RemoveAt(int index)
Removes an ngon from the mesh.
index (int)The index of the ngon.

RemoveNgons

#Since v6.0
public int RemoveNgons(IEnumerable<int> indices)
Remove one or more ngons from the mesh.
indices (IEnumerable<int>)An array of ngon indices.
The number of deleted ngons.

ReverseOuterBoundary

#Since v7.0
public void ReverseOuterBoundary(int index)
Reverse the order of the m_vi[] array for an ngon
index (int)

SetNgon

#Since v6.0
public void SetNgon(int index, MeshNgon ngon)
Set an ngon in this list.
index (int)An ngon index.
ngon (MeshNgon)An ngon.
ArgumentOutOfRangeExceptionIf index is negative or >= Count.
Explicit

ICollection<MeshNgon>.Add

#
void ICollection<MeshNgon>.Add(MeshNgon item)
item (MeshNgon)
Explicit

ICollection<MeshNgon>.Contains

#
item (MeshNgon)
Explicit

ICollection<MeshNgon>.CopyTo

#
void ICollection<MeshNgon>.CopyTo(MeshNgon[] array, int arrayIndex)
array (MeshNgon[])
arrayIndex (int)
Explicit

ICollection<MeshNgon>.Remove

#
item (MeshNgon)
Explicit

IList<MeshNgon>.IndexOf

#
int IList<MeshNgon>.IndexOf(MeshNgon item)
item (MeshNgon)
Explicit

IList<MeshNgon>.Insert

#Since v6.0
void IList<MeshNgon>.Insert(int index, MeshNgon item)
index (int)
item (MeshNgon)
Explicit

IList<MeshNgon>.RemoveAt

#Since v6.0
void IList<MeshNgon>.RemoveAt(int index)
index (int)
Explicit

ICollection.CopyTo

#
void ICollection.CopyTo(Array array, int index)
array (Array)
index (int)
Explicit

IEnumerable.GetEnumerator

#Since v6.0
IEnumerator IEnumerable.GetEnumerator()
Explicit

IList.Add

#
int IList.Add(object value)
value (object)
Explicit

IList.Contains

#
bool IList.Contains(object value)
value (object)
Explicit

IList.IndexOf

#
int IList.IndexOf(object value)
value (object)
Explicit

IList.Insert

#
void IList.Insert(int index, object value)
index (int)
value (object)
Explicit

IList.Remove

#
void IList.Remove(object value)
value (object)
Explicit

IList.RemoveAt

#Since v6.0
void IList.RemoveAt(int index)
index (int)