MeshVertexList

References
Provides access to the vertices and vertex-related functionality of a mesh.

Properties

Capacity

#Since v6.0
public int Capacity { get; set; }
Gets or sets the total number of vertices the internal data structure can hold without resizing.

Count

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

ICollection<Point3f>.IsReadOnly

#
Explicit

ICollection.IsSynchronized

#
bool ICollection.IsSynchronized
Explicit

ICollection.SyncRoot

#
Explicit

IList.IsFixedSize

#
bool IList.IsFixedSize
Explicit

IList.IsReadOnly

#
bool IList.IsReadOnly

UseDoublePrecisionVertices

#Since v6.4
public bool UseDoublePrecisionVertices { get; set; }
Set to true if the vertices should be stored in double precision

Indexers

Explicit

IList.this[]

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

this[]

#
public Point3f this[int index] { get; set; }
Gets or sets the vertex at the given index. The index must be valid or an IndexOutOfRangeException will be thrown.
index (int)Index of control vertex to access.
The control vertex at [index].
IndexOutOfRangeExceptionThrown when the index is invalid.

Methods

Add

#ExampleSince v5.0
public int Add(double x, double y, double z)
Adds a new vertex to the end of the Vertex list.
x (double)X component of new vertex coordinate.
y (double)Y component of new vertex coordinate.
z (double)Z component of new vertex coordinate.
The index of the newly added vertex.

Add

#ExampleSince v5.0
public int Add(float x, float y, float z)
Adds a new vertex to the end of the Vertex list.
x (float)X component of new vertex coordinate.
y (float)Y component of new vertex coordinate.
z (float)Z component of new vertex coordinate.
The index of the newly added vertex.

Add

#Since v5.0
public int Add(Point3d vertex)
Adds a new vertex to the end of the Vertex list.
vertex (Point3d)Location of new vertex.
The index of the newly added vertex.

Add

#Since v5.0
public int Add(Point3f vertex)
Adds a new vertex to the end of the Vertex list.
vertex (Point3f)Location of new vertex.
The index of the newly added vertex.

AddVertices

#Since v5.0
public void AddVertices(IEnumerable<Point3d> vertices)
Adds a series of new vertices to the end of the vertex list.

This overload accepts double-precision points.

vertices (IEnumerable<Point3d>)A list, an array or any enumerable set of Point3d.

AddVertices

#Since v5.0
public void AddVertices(IEnumerable<Point3f> vertices)
Adds a series of new vertices to the end of the vertex list.

This overload accepts single-precision points.

vertices (IEnumerable<Point3f>)A list, an array or any enumerable set of Point3f.

Align

#Since v9.0
public int Align(double distance, bool average, IEnumerable<bool> whichVertices = null)
Moves mesh vertices to neighboring vertices, within the specified distance.

This forces unaligned mesh vertices to the same location and is helpful to clean meshes for 3D printing.

All vertices are considered, not only those on naked edges. Use whichVertices to restrict which ones are moved, or Align(double, bool, bool) to move and align onto naked vertices only.

See the

_AlignVertices
Rhino command for more information.

distance (double)Distance that should not be exceed when modifying the mesh.
average (bool)If true, vertices that are candidates for one another are moved towards each other, rather than one of them being privileged and the others moved onto it.
whichVertices (IEnumerable<bool> = null)If not null, defines which vertices should be considered for adjustment.
If the operation succeeded, the number of mesh vertices that were moved, or -1 on error.

Align

#Since v9.0
public int Align(double distance, bool onlyNaked, bool average)
Moves mesh vertices to neighboring vertices, within the specified distance.

This forces unaligned mesh vertices to the same location and is helpful to clean meshes for 3D printing.

See the

_AlignVertices
Rhino command for more information.

distance (double)Distance that should not be exceed when modifying the mesh.
onlyNaked (bool)If true, only vertices that lie along naked edges are moved, and only such vertices are used as targets to align to.
average (bool)If true, vertices that are candidates for one another are moved towards each other, rather than one of them being privileged and the others moved onto it.
If the operation succeeded, the number of mesh vertices that were moved, or -1 on error.

Align

#Since v6.0
public int Align(double distance, IEnumerable<bool> whichVertices = null)
Moves mesh vertices to neighboring vertices, within the specified distance.

This forces unaligned mesh vertices to the same location and is helpful to clean meshes for 3D printing.

All vertices are considered, not only those on naked edges. Use whichVertices to restrict which ones are moved, or Align(double, bool, bool) to move and align onto naked vertices only.

See the

_AlignVertices
Rhino command for more information.

distance (double)Distance that should not be exceed when modifying the mesh.
whichVertices (IEnumerable<bool> = null)If not null, defines which vertices should be considered for adjustment.
If the operation succeeded, the number of mesh vertices that were moved, or -1 on error.

Align

#Since v9.0
public static int Align(IEnumerable<Mesh> meshes, double distance, bool average, IEnumerable<IEnumerable<bool>> whichVertices = null)
Moves mesh vertices to neighboring vertices, within the specified distance.

This forces unaligned mesh vertices to the same location and is helpful to clean meshes for 3D printing.

All vertices are considered, not only those on naked edges. Use whichVertices to restrict which ones are moved, or Align(IEnumerable<Mesh>, double, bool, bool) to move and align onto naked vertices only.

See the

_AlignVertices
Rhino command for more information.

meshes (IEnumerable<Mesh>)The enumerable of meshes that need to have vertices adjusted.
distance (double)Distance that should not be exceed when modifying the mesh.
average (bool)If true, vertices that are candidates for one another are moved towards each other, rather than one of them being privileged and the others moved onto it.
whichVertices (IEnumerable<IEnumerable<bool>> = null)If not null, defines which vertices should be considered for adjustment.

If this parameter is non-null, then all items within it have to be non-null as well, defining for each mesh, which vertices to adjust.

If the operation succeeded, the number of mesh vertices that were moved, or -1 on error.

Align

#Since v9.0
public static int Align(IEnumerable<Mesh> meshes, double distance, bool onlyNaked, bool average)
Moves mesh vertices to neighboring vertices, within the specified distance.

This forces unaligned mesh vertices to the same location and is helpful to clean meshes for 3D printing.

See the

_AlignVertices
Rhino command for more information.

meshes (IEnumerable<Mesh>)The enumerable of meshes that need to have vertices adjusted.
distance (double)Distance that should not be exceed when modifying the mesh.
onlyNaked (bool)If true, only vertices that lie along naked edges are moved, and only such vertices are used as targets to align to.
average (bool)If true, vertices that are candidates for one another are moved towards each other, rather than one of them being privileged and the others moved onto it.
If the operation succeeded, the number of mesh vertices that were moved, or -1 on error.

Align

#
public static int Align(IEnumerable<Mesh> meshes, double distance, IEnumerable<IEnumerable<bool>> whichVertices = null)
Moves mesh vertices to neighboring vertices, within the specified distance.

This forces unaligned mesh vertices to the same location and is helpful to clean meshes for 3D printing.

All vertices are considered, not only those on naked edges. Use whichVertices to restrict which ones are moved, or Align(IEnumerable<Mesh>, double, bool, bool) to move and align onto naked vertices only.

See the

_AlignVertices
Rhino command for more information.

meshes (IEnumerable<Mesh>)The enumerable of meshes that need to have vertices adjusted.
distance (double)Distance that should not be exceed when modifying the mesh.
whichVertices (IEnumerable<IEnumerable<bool>> = null)If not null, defines which vertices should be considered for adjustment.

If this parameter is non-null, then all items within it have to be non-null as well, defining for each mesh, which vertices to adjust.

If the operation succeeded, the number of mesh vertices that were moved, or -1 on error.

Clear

#Since v5.0
public void Clear()
Clears the Vertex list on the mesh.

CombineIdentical

#Since v5.0
public bool CombineIdentical(bool ignoreNormals, bool ignoreAdditional)
Merges identical vertices.
ignoreNormals (bool)If true, vertex normals will not be taken into consideration when comparing vertices.
ignoreAdditional (bool)If true, texture coordinates, colors, and principal curvatures will not be taken into consideration when comparing vertices.
true if the mesh is changed, in which case the mesh will have fewer vertices than before.

CullUnused

#Since v5.0
public int CullUnused()
Removes all vertices that are currently not used by the Face list.
The number of unused vertices that were removed.

Destroy

#Since v6.0
public void Destroy()
Releases all memory allocated to store faces. The list capacity will be 0 after this call.

Subsequent calls can add new items.

GetConnectedVertices

#Since v5.0
public int[] GetConnectedVertices(int vertexIndex)
Gets indices of all vertices that form "edges" with a given vertex index.
vertexIndex (int)The index of a vertex to query.
An array of vertex indices that are connected with the specified vertex.

GetEnumerator

#Since v5.0
public IEnumerator<Point3f> GetEnumerator()
Gets an enumerator that yields all mesh vertices (points) in this collection.
The enumerator.

GetTopologicalIndenticalVertices

#Since v5.0
public int[] GetTopologicalIndenticalVertices(int vertexIndex)
Gets a list of other vertices which are "topologically" identical to this vertex.
vertexIndex (int)A vertex index in the mesh.
Array of indices of vertices that are topologically the same as this vertex. The array includes vertexIndex. Returns null on failure.

GetVertexFaces

#Since v5.0
public int[] GetVertexFaces(int vertexIndex)
Gets a list of all of the faces that share a given vertex.
vertexIndex (int)The index of a vertex in the mesh.
An array of indices of faces on success, null on failure.

Hide

#Since v5.0
public void Hide(int vertexIndex)
Hides the vertex at the given index.
vertexIndex (int)Index of vertex to hide.

HideAll

#Since v5.0
public void HideAll()
Hides all vertices in the mesh.

IsHidden

#Since v5.0
public bool IsHidden(int vertexIndex)
Gets a value indicating whether or not a vertex is hidden.
vertexIndex (int)Index of vertex to query.
true if the vertex is hidden, false if it is not.

Point3dAt

#Since v6.4
public Point3d Point3dAt(int index)
Get double precision location at a given index
index (int)

Remove

#Since v5.0
public bool Remove(IEnumerable<int> indices, bool shrinkFaces)
Removes the vertices at the given indices and all faces that reference those vertices.
indices (IEnumerable<int>)Vertex indices to remove.
shrinkFaces (bool)If true, quads that reference the deleted vertex will be converted to triangles.
true on success, false on failure.

Remove

#Since v5.0
public bool Remove(int index, bool shrinkFaces)
Removes the vertex at the given index and all faces that reference that index.
index (int)Index of vertex to remove.
shrinkFaces (bool)If true, quads that reference the deleted vertex will be converted to triangles.
true on success, false on failure.

SetVertex

#Since v6.6
public bool SetVertex(int index, double x, double y, double z, bool updateNormals)
Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.

index (int)Index of vertex to set.
x (double)X component of vertex location.
y (double)Y component of vertex location.
z (double)Z component of vertex location.
updateNormals (bool)Set to true if you'd like the vertex and face normals impacted by the change updated.
true on success, false on failure.

SetVertex

#Since v5.0
public bool SetVertex(int index, double x, double y, double z)
Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.

index (int)Index of vertex to set.
x (double)X component of vertex location.
y (double)Y component of vertex location.
z (double)Z component of vertex location.
true on success, false on failure.

SetVertex

#Since v5.0
public bool SetVertex(int index, float x, float y, float z)
Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.

index (int)Index of vertex to set.
x (float)X component of vertex location.
y (float)Y component of vertex location.
z (float)Z component of vertex location.
true on success, false on failure.

SetVertex

#Since v5.0
public bool SetVertex(int index, Point3d vertex)
Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.

index (int)Index of vertex to set.
vertex (Point3d)Vertex location.
true on success, false on failure.

SetVertex

#Since v5.0
public bool SetVertex(int index, Point3f vertex)
Sets or adds a vertex to the Vertex List.

If [index] is less than [Count], the existing vertex at [index] will be modified.

If [index] equals [Count], a new vertex is appended to the end of the vertex list.

If [index] is larger than [Count], the function will return false.

index (int)Index of vertex to set.
vertex (Point3f)Vertex location.
true on success, false on failure.

Show

#Since v5.0
public void Show(int vertexIndex)
Shows the vertex at the given index.
vertexIndex (int)Index of vertex to show.

ShowAll

#Since v5.0
public void ShowAll()
Shows all vertices in the mesh.
Explicit

ICollection<Point3f>.Add

#Since v5.0
void ICollection<Point3f>.Add(Point3f item)
item (Point3f)
Explicit

ICollection<Point3f>.Contains

#
item (Point3f)
Explicit

ICollection<Point3f>.CopyTo

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

ICollection<Point3f>.Remove

#
item (Point3f)
Explicit

IList<Point3f>.IndexOf

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

IList<Point3f>.Insert

#
void IList<Point3f>.Insert(int index, Point3f item)
index (int)
item (Point3f)
Explicit

IList<Point3f>.RemoveAt

#
void IList<Point3f>.RemoveAt(int index)
index (int)
Explicit

ICollection.CopyTo

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

IEnumerable.GetEnumerator

#Since v5.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

#
void IList.RemoveAt(int index)
index (int)

ToFloatArray

#Since v5.9
public float[] ToFloatArray()
Copies all vertices to a linear array of float in x,y,z order
The float array.

ToPoint3dArray

#Since v5.0
public Point3d[] ToPoint3dArray()
Copies all vertices to a new array of Point3d.
A new array.

ToPoint3fArray

#Since v5.0
public Point3f[] ToPoint3fArray()
Copies all vertices to a new array of Point3f.
A new array.