## WeldPoints

### Introduced

v4.0

### Description

Welds the specified set of points, by merging source points to target points based on spatial proximity. This command installs a WeldPoints operator. The input ConnectionSet specifies two point sets: the welding sources, followed by the welding targets (optional).

### Scripting Syntax

    oReturn = WeldPoints( [ConnectionSet], [ImmediateMode] );

### Return Value

Returns an XSICollection that contains the created WeldPoints operator.

### Parameters

Parameter | Type | Description
--- | --- | ---
ConnectionSet | ConnectionSet | Specifies source and target point sets. See Operator Presets for details on the connection set required for this operator. Default Value: Currently selected components are used as sources. Warning: An error occurs if the connection set is invalid. Please verify the connection set required for this operator to avoid breaking your scripts.
ImmediateMode | siOperationMode | Specifies whether or not the operator should be immediately frozen. Default Value: siPersistentOperation

### Examples

#### JScript Example

    // Create a grid and weld a row of points to the next one.
    NewScene(null, null);
    CreatePrim("Grid", "MeshSurface", null, null);
    WeldPointsOp = WeldPoints("grid.pnt[18-26];grid.pnt[27-35]", siPersistentOperation);
    Application.LogMessage("New WeldPoints operator: " + WeldPointsOp);
    // Running this script should log the following:
    // ---------------------------------------------
    //INFO : "New WeldPoints operator: grid.polymsh.weldpointsop"

### See Also

ApplyTopoOp