Skip to content

MergePoints

Introduction

vtkMergePoints merge exactly coincident points.

vtkMergePoints is a locator object to quickly locate points in 3D.

Methods

extend

Method used to decorate a given object (publicAPI+model) with vtkMergePoints characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIMergePointsInitialValuesNo(default: {})

insertUniquePoint

Insert a point into the merge points structure. If the point is already present, it returns the existing ID. Otherwise, it inserts the point and returns a new ID.

ArgumentTypeRequiredDescription
xVector3YesThe point to insert as an array of 3 numbers.

Returns

TypeDescription
IInsertPointResultAn object indicating if the point was inserted and its ID.

isInsertedPoint

Check if a point is already inserted in the merge points structure.

ArgumentTypeRequiredDescription
xVector3YesThe point to check.

Returns

TypeDescription
NumberThe ID of the point if it exists, otherwise -1.

newInstance

Method used to create a new instance of vtkMergePoints.

ArgumentTypeRequiredDescription
initialValuesIMergePointsInitialValuesNofor pre-setting some of its content