Click or drag to resize

AlignerAlignVertices Method (IEnumerableGeometryBase, Double, Boolean, Boolean, IEnumerableIEnumerableBoolean)

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.

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,
	IEnumerable<IEnumerable<bool>> whichVertices
)

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.
whichVertices
Type: System.Collections.GenericIEnumerableIEnumerableBoolean
If not null, defines which vertices should be considered for adjustment.

If this parameter is non-null, it needs one item per piece of geometry, and each item needs one value per vertex of the geometry it belongs to.

SubD vertices are not currently supported: a list given for a SubD is ignored, and every one of its vertices is considered. This may be supported in a future version.

Return Value

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