Returns the number of meshes that could be created by calling SplitDisjointMesh.
rhinoscriptsyntax.DisjointMeshCount (object_id)
rhinoscript.mesh.DisjointMeshCount (object_id)
object_id |
Required. String or Guid. The identifier of a mesh object. |
Number |
The number of meshes that could be created 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)>1: rs.SplitDisjointMesh(obj)