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
Gets or sets the number of mesh ngons.
public int Count { get; set; }
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
Gets or sets the number of mesh ngons.
[CLSCompliant(false)] public uint UnsignedCount { get; set; }

Indexers

Explicit

IList.this[]

#
object IList.this[
index
]

this[]

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

Methods

AddNgon

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

AddNgons

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

AddPlanarNgons

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

AddPlanarNgons

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

Clear

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

GetEnumerator

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

GetNgon

#Since v6.0
Returns the mesh ngon at the given index.
public MeshNgon GetNgon(
index
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
Get a list of vertices that form the boundary of a face set. This is often use to get ngon boundaries.
public int[] GetNgonBoundary(
ngonFaceIndexList
List of mesh face indices.
)
List of mesh vertex indices that form the boundary of the face set.

GetNgonBoundingBox

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

GetNgonBoundingBox

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

GetNgonCenter

#Since v6.0
Gets the center point of an ngon.

This the average of the corner points.

public Point3d GetNgonCenter(
index
A ngon index.
)
The center point.

GetNgonCenter

#Since v6.0
Gets the center point of an ngon.

This the average of the corner points.

public Point3d GetNgonCenter(
ngon
An ngon.
)
The center point.

GetNgonEdgeCount

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

GetNgonOuterEdgeCount

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

Insert

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

IsValid

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

IsValid

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

NgonBoundaryVertexList

#Since v6.0
Get an ngon's boundary points.
public Point3d[] NgonBoundaryVertexList(
ngon,
ngon.
bAppendStartPoint
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
Determines whether a ngon has holes.
public bool NgonHasHoles(
index
Ngon index.
)
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.
true for holes (or malformed ngon, see remarks), false for no holes.

NgonIndexFromFaceIndex

#Since v6.0
Returns the index of a mesh ngon the face belongs to.
public int NgonIndexFromFaceIndex(
meshFaceIndex
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
Determine if the ngon's boundary orientation matches that of the set of faces it is made from.
public int Orientation(
index,
Ngon index.
permitHoles
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
Removes all ngons from the mesh.
public int RemoveAllNgons()
The number deleted ngons.

RemoveAt

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

RemoveNgons

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

ReverseOuterBoundary

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

SetNgon

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

ICollection<MeshNgon>.Add

#
void ICollection<MeshNgon>.Add()
Explicit

ICollection<MeshNgon>.Contains

#
Explicit

ICollection<MeshNgon>.CopyTo

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

ICollection<MeshNgon>.Remove

#
Explicit

IList<MeshNgon>.IndexOf

#
int IList<MeshNgon>.IndexOf()
Explicit

IList<MeshNgon>.Insert

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

IList<MeshNgon>.RemoveAt

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

ICollection.CopyTo

#
void ICollection.CopyTo(
array,
index
)
Explicit

IEnumerable.GetEnumerator

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

IList.Add

#
int IList.Add(
value
)
Explicit

IList.Contains

#
bool IList.Contains(
value
)
Explicit

IList.IndexOf

#
int IList.IndexOf(
value
)
Explicit

IList.Insert

#
void IList.Insert(
index,
value
)
Explicit

IList.Remove

#
void IList.Remove(
value
)
Explicit

IList.RemoveAt

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