> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ntop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Collapse Vertices

<CardGroup cols={2}>
  <Card title="Graph, Scalar" href="#graph-scalar" />

  <Card title="Graph, Scalar, 1.1.0" href="#graph-scalar-110" />

  <Card title="Lattice, Scalar" href="#lattice-scalar" />

  <Card title="Lattice, Scalar, 1.1.0" href="#lattice-scalar-110" />

  <Card title="Mesh, Scalar, 1.1.0" href="#mesh-scalar-110" />
</CardGroup>

***

## About this Block

**What it does:** The **Collapse Vertices** block simplifies a surface mesh, lattice, or graph by joining and consolidating vertices with a certain distance to each other. When vertices are at a distance lower than the threshold input, a new vertex is placed at the average location of the vertices and joined back into the structure.

**Common uses:**

* Used to lower the element count
* Clean up a structure after merging multiple together

**Tips:**

* Drag and drop the vertices from the property panel to visualize them better.

## Example File

![Collapse Mesh Vertices](https://storage.googleapis.com/files-learn/static/ExtendedBlockDocs/collapse_vertices.png)

***

<h2 id="graph-scalar">
  Graph, Scalar
</h2>

Collapses and merges the vertices of a Graph that are within a given distance of each other.

### Inputs

| Name      | Type                                                   | Description                                                                     |
| --------- | ------------------------------------------------------ | ------------------------------------------------------------------------------- |
| Graph     | [Graph](../../../../block-documentation/types/graph)   | Graph to collapse the vertices of.                                              |
| Tolerance | [Scalar](../../../../block-documentation/types/scalar) | Vertices within this distance threshold will be collapsed into a single vertex. |

### Outputs

| Type                                                 |
| ---------------------------------------------------- |
| [Graph](../../../../block-documentation/types/graph) |

***

<h2 id="graph-scalar-110">
  Graph, Scalar, 1.1.0
</h2>

Collapses and merges the vertices of a Graph that are within a given distance of each other.

### Inputs

| Name      | Type                                                   | Description                                                                     |
| --------- | ------------------------------------------------------ | ------------------------------------------------------------------------------- |
| Graph     | [Graph](../../../../block-documentation/types/graph)   | Graph to collapse the vertices of.                                              |
| Tolerance | [Scalar](../../../../block-documentation/types/scalar) | Vertices within this distance threshold will be collapsed into a single vertex. |

### Outputs

| Type                                                 |
| ---------------------------------------------------- |
| [Graph](../../../../block-documentation/types/graph) |

***

<h2 id="lattice-scalar">
  Lattice, Scalar
</h2>

Collapses and merges the vertices of a Lattice that are within a given distance of each other.

### Inputs

| Name      | Type                                                     | Description                                                                     |
| --------- | -------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Lattice   | [Lattice](../../../../block-documentation/types/lattice) | Lattice to collapse the vertices of.                                            |
| Tolerance | [Scalar](../../../../block-documentation/types/scalar)   | Vertices within this distance threshold will be collapsed into a single vertex. |

### Outputs

| Type                                                     |
| -------------------------------------------------------- |
| [Lattice](../../../../block-documentation/types/lattice) |

***

<h2 id="lattice-scalar-110">
  Lattice, Scalar, 1.1.0
</h2>

Collapses and merges the vertices of a Lattice that are within a given distance of each other.

### Inputs

| Name      | Type                                                     | Description                                                                     |
| --------- | -------------------------------------------------------- | ------------------------------------------------------------------------------- |
| Lattice   | [Lattice](../../../../block-documentation/types/lattice) | Lattice to collapse the vertices of.                                            |
| Tolerance | [Scalar](../../../../block-documentation/types/scalar)   | Vertices within this distance threshold will be collapsed into a single vertex. |

### Outputs

| Type                                                     |
| -------------------------------------------------------- |
| [Lattice](../../../../block-documentation/types/lattice) |

***

<h2 id="mesh-scalar-110">
  Mesh, Scalar, 1.1.0
</h2>

Collapses and merges the vertices of a surface Mesh that are within a given distance of each other.

### Inputs

| Name      | Type                                                   | Description                                                                     |
| --------- | ------------------------------------------------------ | ------------------------------------------------------------------------------- |
| Mesh      | [Mesh](../../../../block-documentation/types/mesh)     | Mesh to collapse the vertices of.                                               |
| Tolerance | [Scalar](../../../../block-documentation/types/scalar) | Vertices within this distance threshold will be collapsed into a single vertex. |

### Outputs

| Type                                               |
| -------------------------------------------------- |
| [Mesh](../../../../block-documentation/types/mesh) |

## About this Block

**What it does:** The **Collapse Vertices** block simplifies a surface mesh, lattice, or graph by joining and consolidating vertices with a certain distance to each other. When vertices are at a distance lower than the threshold input, a new vertex is placed at the average location of the vertices and joined back into the structure.

**Common uses:**

* Used to lower the element count
* Clean up a structure after merging multiple together

**Tips:**

* Drag and drop the vertices from the property panel to visualize them better.

## Example File

![Collapse Mesh Vertices](https://storage.googleapis.com/files-learn/static/ExtendedBlockDocs/collapse_vertices.png)
