How get BrepToMesh using RhinoCommon (5)?

I’m trying to find a way around the failing Mesh.Split() by doing the split one by one. But it seems that the GetMesh function doesn’t actually do anything. It allways returns only null:

foreach( var brep in Breps )
{
    var brep_mesh = brep.Faces[0].GetMesh( MeshType.Any );
    if( brep_mesh != null )
    {
       // Allways null :(
    }

// Rolf

Hi @RIL,

See the following:

https://github.com/mcneel/rhino-developer-samples/blob/6/rhinocommon/cs/SampleCsCommands/SampleCsMeshBrep.cs

– Dale

https://github.com/mcneel/rhino-developer-samples/blob/5/rhinocommon/cs/SampleCsCommands/SampleCsMeshBrep.cs for the link to v5. Should be still pretty much the same, though