Meshing joined Brep from C# vs in GUI

Hi all,

I’m trying to mesh a Brep that I have created by joining two breps inC# using RhinoCommon (Mesh.CreateFromBrep() method), but it keeps giving me two separate result meshes. When I try to mesh the Brep in the Rhino GUI however, the command gives me a single mesh (not disjoint, i.e. what I want). Is there any way to achieve the same result using RhinoCommon?

Thanks,

Lucas.

Here is an example that might be helpful:

https://github.com/dalefugier/SampleCsCommands/blob/master/SampleCsMeshBrep.cs

Thanks Dale!

It seems that I can only fully solve the problem though by calling Mesh.Vertices.CombineIdentical() after appending the two component meshes in the same mesh.

Cheers,

Lucas