Skip to main content

vScriptValFuseClosePoints

Merges points that lie within a distance of each other into one point.

IntermediateMograph / ScriptValScriptValArrayJSON
vScriptValFuseClosePoints node

vScriptValFuseClosePoints takes an array of points and welds those within Distance Threshold of each other. Fuse Mode keeps the first point of each group or the average, and Axis Mode picks the axes used for the distance.

Parameters​

ParameterTypeDefaultDescription
Distance ThresholdFloat0.02Points within this distance (or exactly at it) are joined. Minimum 0, default 0.02.
Fuse ModeDropdownAverageKeep First or Average (default).
Axis ModeDropdownXYZXYZ (default), XY, XZ, YZ, X Only, Y Only or Z Only. The axes used for the distance.
Minimum Cluster SizeInteger1Clusters with fewer points are removed from the output. Minimum 1, default 1.
Delete SinglesInteger0Removes points that have no neighbour within the threshold when on. Default off.
+1 more parameters
ParameterTypeDefaultDescription
InputDATATYPE—Data to process.
Read the full description

The node builds clusters. A point joins a cluster if it is within Distance Threshold of any point already in it, so a chain of close points becomes one cluster. Each cluster becomes one point: the first point of the cluster (Keep First) or the average of its X, Y and Z (Average, the default).

Axis Mode measures the distance over XYZ, XY, XZ, YZ or a single axis. Clusters with fewer points than Minimum Cluster Size are removed from the output. Delete Singles removes clusters of one point. The order of the output follows the first point of each cluster.

A label under the controls shows the counts of input points, output points and clusters.

Example Connections​

vScriptValRandom.Output -> vScriptValFuseClosePoints.Input
vScriptValFuseClosePoints.Output -> vScriptValCameraProjection.ArrayA
vScriptValCameraProjection.Output -> vScriptValShapeRender.ArrayPoint
Background.Output -> vScriptValShapeRender.Input