RC - CreateMeshFromBrep() - closed polysurface makes unjoined mesh


#1

One mesh is created for each Brep face, not one mesh for the whole object. Is this supposed to work this way? Do I always have to join the individual mesh parts? Or is there a parameter I missed in Rhino.Geometry.MeshingParameters that will join the meshes into one?

Thanks, --Mitch


(Luis Fraguada) #2

I think it is working as designed: http://developer.rhino3d.com/api/RhinoCommonWin/html/M_Rhino_Geometry_Mesh_CreateFromBrep_1.htm

Most examples make a new mesh from the results:

    var brep_mesh = new Mesh();
    foreach (var mesh in meshes)
      brep_mesh.Append(mesh);
    doc.Objects.AddMesh(brep_mesh);
    doc.Views.Redraw();

#3

Yeah, I was afraid of that. Unfortunately, joining (appending) all the pieces does not always result in a closed mesh from a closed polysurface (imperative for my application), whereas using something like the Mesh command does (with the same part).

Also I am finding it virtually impossible to have a correspondence between what Rhino native Mesh does with a set of custom parameters and what Mesh.CreateFromBrep() does with more or less the same parameters. It seems likely that Mesh is not using RhinoCommon and not calling exactly the same functions under the hood…

–Mitch


(Dale Fugier) #4

This is a known issue:

http://mcneel.myjetbrains.com/youtrack/issue/RH-35007

– Dale


(Menno Deij - van Rijswijk) #5

And also see


(Brian Gillespie) #6

RH-35007 is fixed in the latest WIP