Exploring the python method I found a mesh object has the method ExplodeAtUnweldedEdges()
it also answers the question what the logic is: separate by unwelded edges
def ExplodeMeshes(mesh_ids, delete=False):
"""Explodes a mesh object, or mesh objects int submeshes. A submesh is a
collection of mesh faces that are contained within a closed loop of
unwelded mesh edges. Unwelded mesh edges are where the mesh faces that
share the edge have unique mesh vertices (not mesh topology vertices)
at both ends of the edge
Parameters:
mesh_ids = list of mesh identifiers
delete[opt] = delete the input meshes
Returns:
List of identifiers
"""
id = rhutil.coerceguid(mesh_ids)
if id: mesh_ids = [mesh_ids]
rc = []
for mesh_id in mesh_ids:
mesh = rhutil.coercemesh(mesh_id, True)
if mesh:
submeshes = mesh.ExplodeAtUnweldedEdges()
if submeshes:
for submesh in submeshes:
id = scriptcontext.doc.Objects.AddMesh(submesh)
if id!=System.Guid.Empty: rc.append(id)
if rc: scriptcontext.doc.Views.Redraw()
return rc
That would be perfect. Unfortunately, I don’t use RhinoCommon (yet).
Nevertheless, it clearly demonstrates the logic of the process, which can be useful