# ExplodeConnectedMeshes

> Separate each connected component into a separate occurrence

API function: [algo.explodeConnectedMeshes](/asset-transformer-sdk/2026.4/api/python/algo_functions.md#explodeconnectedmeshes).

Each occurrence is subdivided in one occurrence per surfacic connected subset (`polygons`) + one for the non-surfacic elements (`lines` and `points`).

## Outcome

A list of N (+1 if there are non-surfacic elements, ie, lines or points) occurrences, where N is the number of surfacic connected subsets in the parent occurrence.

The following images visualize one color per connected component in the PixyzUI before (first image) and after (second image) a call to [algo.explodeConnectedMeshes](/asset-transformer-sdk/2026.4/api/python/algo_functions.md#explodeconnectedmeshes):

![Segment Mesh Surface](/api/media?file=/asset-transformer-sdk/media/images/algo/explode-cc/before-explode.png)
![Segment Mesh Surface](/api/media?file=/asset-transformer-sdk/media/images/algo/explode-cc/after-explode.png)

The scene treeview on the left also shows that a component has been subdivided into 10 new ones.

> **Important:**
>
> The last image was computed for this documentation only, the algorithm does not add any identifiers or colors to individual connected components by default.

## Parameters

### bool explodeNonManifoldEdges

There's a single parameter to this algorithm. It determines how non-manifold edges (i.e., edges with more than two adjacent polygons) should be handled.

When `explodeNonManifoldEdges==True`, then non-manifold edges are considered to be a border of a connected component. In that case, each polygon adjacent to the non-manifold edge is considered to reside in a different connected components (unless they are connected via a sequence of manifold edges and polygons elsewhere).

When `explodeNonManifoldEdges==False`, then the polygons connecting at the non-manifold edge are considered to belong to the same connected component.
