MeshNgonList
ReferencesProvides access to the ngons and ngon-related functionality of a Mesh. See also the Mesh.Ngons property for Ngon functionality details.
Properties
Indexers
Methods
Appends a new ngon to the end of the mesh ngon list.
Parameters:
| ngon (MeshNgon) | Ngon to add. |
Returns: The index of the newly added ngon.
Appends a list of ngons to the end of the mesh ngon list.
Parameters:
| ngons (IEnumerable<MeshNgon>) | Ngons to add. |
Returns: Indices of the newly created ngons
public int AddPlanarNgons(double planarTolerance, int minimumNgonVertexCount, int minimumNgonFaceCount, bool allowHoles)
Add an ngon for each group of connected coplanar faces.
Parameters:
| 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. |
Returns: Number of ngons added to the mesh.
Add an ngon for each group of connected coplanar faces.
Parameters:
| planarTolerance (double) | 3d distance tolerance for coplanar test. |
Returns: Number of ngons added to the mesh.
Gets an enumerator that yields all ngons in this collection.
Returns: The enumerator.
Returns the mesh ngon at the given index.
Parameters:
| index (int) | Index of ngon to get. Must be larger than or equal to zero and smaller than the Ngon Count of the mesh. |
Returns: The mesh ngon at the given index. This ngon can be MeshNgon.Empty.
Get a list of vertices that form the boundary of a face set. This is often use to get ngon boundaries.
Parameters:
| ngonFaceIndexList (IEnumerable<int>) | List of mesh face indices. |
Returns: List of mesh vertex indices that form the boundary of the face set.
Gets the bounding box of an ngon.
Parameters:
| index (int) | A ngon index. |
Returns: A new bounding box, or BoundingBox.Empty on error.
Gets the bounding box of an ngon.
Parameters:
| ngon (MeshNgon) | An ngon. |
Returns: A new bounding box, or BoundingBox.Empty on error.
Gets the center point of an ngon.
This the average of the corner points.
Parameters:
| index (int) | A ngon index. |
Returns: The center point.
Gets the center point of an ngon.
This the average of the corner points.
Parameters:
| ngon (MeshNgon) | An ngon. |
Returns: The center point.
Gets the complete edge count of an ngon.
Parameters:
| index (int) | Ngon index. |
Returns: Complete edge count or zero on error.
Gets the outer edge count of an ngon.
Parameters:
| index (int) | Ngon index. |
Returns: Outer edge count or zero on error.
Inserts a mesh ngon at a defined index in this list.
Exceptions:
| ArgumentOutOfRangeException | If index is negative or >= Count. |
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.
Parameters:
| index (int) | The index of the ngon to test. |
| textLog (TextLog) | A text log for collecting information about problems. |
Returns: 0 if the ngon is not valid, otherwise the number of boundary edges.
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.
Parameters:
| index (int) | The index of the ngon to test. |
Returns: 0 if the ngon is not valid, otherwise the number of boundary edges.
Get an ngon's boundary points.
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.
Parameters:
| index (int) | Ngon index. |
Returns: true for holes (or malformed ngon, see remarks), false for no holes.
Returns the index of a mesh ngon the face belongs to.
Parameters:
| meshFaceIndex (int) | Index of a mesh face. |
Returns: The index of the mesh ngon the face belongs to or -1 if the face does not belong to an ngon.
Determine if the ngon's boundary orientation matches that of the set of faces it is made from.
Parameters:
| index (int) | Ngon index. |
| permitHoles (bool) | true if the ngon is permitted to have interior holes, false otherwise. |
Returns: 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.
Removes all ngons from the mesh.
Returns: The number deleted ngons.
Removes an ngon from the mesh.
Parameters:
| index (int) | The index of the ngon. |
Remove one or more ngons from the mesh.
Parameters:
| indices (IEnumerable<int>) | An array of ngon indices. |
Returns: The number of deleted ngons.
Reverse the order of the m_vi[] array for an ngon
Parameters:
| index (int) |
Set an ngon in this list.
Exceptions:
| ArgumentOutOfRangeException | If index is negative or >= Count. |
Parameters:
| item (MeshNgon) |
Parameters:
| item (MeshNgon) |
Parameters:
| array (MeshNgon[]) | |
| arrayIndex (int) |
Parameters:
| item (MeshNgon) |
Parameters:
| item (MeshNgon) |
Parameters:
| index (int) |