MeshVertexListAlign Method (IEnumerableMesh, Double, Boolean, IEnumerableIEnumerableBoolean) |
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.
See the
Rhino command for more information.
Namespace:
Rhino.Geometry.Collections
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntaxpublic static int Align(
IEnumerable<Mesh> meshes,
double distance,
bool average,
IEnumerable<IEnumerable<bool>> whichVertices = null
)
Public Shared Function Align (
meshes As IEnumerable(Of Mesh),
distance As Double,
average As Boolean,
Optional whichVertices As IEnumerable(Of IEnumerable(Of Boolean)) = Nothing
) As Integer
Parameters
- meshes
- Type: System.Collections.GenericIEnumerableMesh
The enumerable of meshes that need to have vertices adjusted. - distance
- Type: SystemDouble
Distance that should not be exceed when modifying the mesh. - average
- Type: SystemBoolean
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 (Optional)
- Type: System.Collections.GenericIEnumerableIEnumerableBoolean
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.
Return Value
Type:
Int32If the operation succeeded, the number of mesh vertices that were moved, or -1 on error.
See Also