Documentation

Support

Asset Transformer SDK


User Manual

Python API

C# API

Changelog

Discussions

Asset Transformer SDK

ExplodeConnectedMeshes

Separate each connected component into a separate occurrence
Read time 1 minuteLast updated 21 hours ago

API function: algo.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:
Segment Mesh Surface
Segment Mesh Surface
The scene treeview on the left also shows that a component has been subdivided into 10 new ones.

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.