MeshVertexList

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

Properties

Capacity

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

Count

#Since v5.0
Gets or sets the number of mesh vertices.
public int Count { get; set; }
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
Set to true if the vertices should be stored in double precision
public bool UseDoublePrecisionVertices { get; set; }

Indexers

Explicit

IList.this[]

#
object IList.this[
index
]

this[]

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

Methods

Add

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

Add

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

Add

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

Add

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

AddVertices

#Since v5.0
Adds a series of new vertices to the end of the vertex list.

This overload accepts double-precision points.

public void AddVertices(
vertices
A list, an array or any enumerable set of Point3d.
)

AddVertices

#Since v5.0
Adds a series of new vertices to the end of the vertex list.

This overload accepts single-precision points.

public void AddVertices(
vertices
A list, an array or any enumerable set of Point3f.
)

Align

#Since v9.0
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.

public int Align(
distance,
Distance that should not be exceed when modifying the mesh.
average,
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 = 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
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.

public int Align(
distance,
Distance that should not be exceed when modifying the mesh.
onlyNaked,
If true, only vertices that lie along naked edges are moved, and only such vertices are used as targets to align to.
average
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
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.

public int Align(
distance,
Distance that should not be exceed when modifying the mesh.
whichVertices = 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
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.

public static int Align(
meshes,
The enumerable of meshes that need to have vertices adjusted.
distance,
Distance that should not be exceed when modifying the mesh.
average,
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 = 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
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.

public static int Align(
meshes,
The enumerable of meshes that need to have vertices adjusted.
distance,
Distance that should not be exceed when modifying the mesh.
onlyNaked,
If true, only vertices that lie along naked edges are moved, and only such vertices are used as targets to align to.
average
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

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

public static int Align(
meshes,
The enumerable of meshes that need to have vertices adjusted.
distance,
Distance that should not be exceed when modifying the mesh.
whichVertices = 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
Clears the Vertex list on the mesh.
public void Clear()

CombineIdentical

#Since v5.0
Merges identical vertices.
public bool CombineIdentical(
ignoreNormals,
If true, vertex normals will not be taken into consideration when comparing vertices.
ignoreAdditional
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
Removes all vertices that are currently not used by the Face list.
public int CullUnused()
The number of unused vertices that were removed.

Destroy

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

Subsequent calls can add new items.

public void Destroy()

GetConnectedVertices

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

GetEnumerator

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

GetTopologicalIndenticalVertices

#Since v5.0
Gets a list of other vertices which are "topologically" identical to this vertex.
public int[] GetTopologicalIndenticalVertices(
vertexIndex
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
Gets a list of all of the faces that share a given vertex.
public int[] GetVertexFaces(
vertexIndex
The index of a vertex in the mesh.
)
An array of indices of faces on success, null on failure.

Hide

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

HideAll

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

IsHidden

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

Point3dAt

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

Remove

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

Remove

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

SetVertex

#Since v6.6
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.

public bool SetVertex(
index,
Index of vertex to set.
x,
X component of vertex location.
y,
Y component of vertex location.
z,
Z component of vertex location.
updateNormals
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
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.

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

SetVertex

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

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

SetVertex

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

public bool SetVertex(
index,
Index of vertex to set.
vertex
Vertex location.
)
true on success, false on failure.

SetVertex

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

public bool SetVertex(
index,
Index of vertex to set.
vertex
Vertex location.
)
true on success, false on failure.

Show

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

ShowAll

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

ICollection<Point3f>.Add

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

ICollection<Point3f>.Contains

#
Explicit

ICollection<Point3f>.CopyTo

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

ICollection<Point3f>.Remove

#
Explicit

IList<Point3f>.IndexOf

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

IList<Point3f>.Insert

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

IList<Point3f>.RemoveAt

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

ICollection.CopyTo

#
void ICollection.CopyTo(
array,
index
)
Explicit

IEnumerable.GetEnumerator

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

#
void IList.RemoveAt(
index
)

ToFloatArray

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

ToPoint3dArray

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

ToPoint3fArray

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