# Sandbox.PolygonMesh.MergeVerticesWithinDistance

```csharp
int MergeVerticesWithinDistance(IReadOnlyList<VertexHandle> originalVertices, float flMaxDistance, bool bPreConnect, bool bAveragePositions, out List<VertexHandle> pOutFinalVertices)
```

### Parameters

- `originalVertices` (`IReadOnlyList<VertexHandle>`)
- `flMaxDistance` (`float`)
- `bPreConnect` (`bool`)
- `bAveragePositions` (`bool`)
- `out pOutFinalVertices` (`List<VertexHandle>`)

### Returns

`int`

Declared in [Sandbox.PolygonMesh](/api/Sandbox.PolygonMesh).
Assembly: `Sandbox.Engine`.
