Splits up a mesh object into its unconnected pieces.
rhinoscriptsyntax.SplitDisjointMesh (object_id, delete_input=False)
rhinoscript.mesh.SplitDisjointMesh (object_id, delete_input=False)
object_id |
Required. String or Guid. The identifier of a mesh object. |
delete_input |
Optional. Boolean. Delete the input object. The default is not to delete the input object (False). |
list |
A list of Guids identifying the newly created mesh objects if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select mesh", rs.filter.mesh)
if rs.DisjointMeshCount(obj)>0: rs.SplitDisjointMesh(obj)