RhinoCommon equivalent of Join (meshes) JoinDisjointMeshes=No

Probably answering my own question here, I was looking for a way in RhinoCommon to join all joinable meshes but not disjoint ones, like the native Rhino command Join with the option JoinDisjointMeshes=No.

As RhinoCommon does not actually have a JoinMeshes() method - am I to assume that the correct (optimal) way to accomplish the above is to join all the meshes into one (via Append for example), then run SplitDisjointPieces() on the result? Perhaps with a MatchEdges() in between to try to ‘solidify’ the joined meshes better?

Hi Mitch,

What you have described is the way the native command does it. Appends all of the meshes into a single mesh and then runs the code that splits it up into disjoint pieces. If does not do the MatchEdges step though.