Click or drag to resize

AlignerAlignVertices Method (IEnumerableGeometryBase, Double, Boolean, Boolean)

Moves vertices that lie within the specified distance of one another onto the same location.

This is helpful to close the seams between separate pieces of geometry.

All vertices are considered, not only those on naked edges, unless onlyNaked says otherwise.

See the

_AlignVertices
Rhino command for more information.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Since: 9.0
Syntax
public static int AlignVertices(
	IEnumerable<GeometryBase> geometry,
	double distance,
	bool onlyNaked,
	bool average
)

Parameters

geometry
Type: System.Collections.GenericIEnumerableGeometryBase
The geometry to adjust. It is modified in place.

Meshes, SubDs, point clouds and degree 1 curves are supported.

distance
Type: SystemDouble
Distance that should not be exceed when moving a vertex.
onlyNaked
Type: SystemBoolean
If true, only vertices that lie along naked edges are moved, and only such vertices are used as targets to align to. Point cloud points and curve points are always considered, because neither has an interior for this to exclude.
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.

Return Value

Type: Int32
If the operation succeeded, the number of vertices that were moved, or -1 on error.
See Also