RhinoCommon - Mesh.CreateFromBrep Method - default parameters

Hi,
This method is overloaded with a second optional argument that allows you to specify meshing parameters. I just wanted to know what parameters are used if these are not passed. The online help does not specify - or I didn’t find it. Is it the current file settings or the default “jagged and faster”?

BTW, @alain (I don’t know who is in charge of the online doc actually), on this particular page, the python sample is on the vb tab (there is no python tab)

Thanks, --Mitch

Hi Mitch!,

The 2nd argument is not optional.

Thanks for pointing out the problem with the docs. I’ll look into it

Edited:

Actually, the second argument does seem to be optional - the following works:

import rhinoscriptsyntax as rs
import scriptcontext as sc
import Rhino

objID=rs.GetObject("Select brep",8+16,True)
brep=sc.doc.Objects.Find(objID).Geometry
mesh=Rhino.Geometry.Mesh.CreateFromBrep(brep)
sc.doc.Objects.AddMesh(mesh[0])
sc.doc.Views.Redraw()

Edited again - without the second argument Rhino appears to use:

Rhino.Geometry.MeshingParameters.Coarse

Which corresponds to “Jagged and faster” according to the doc. Interestingly enough,

Rhino.Geometry.MeshingParameters.Default

makes a much coarser mesh than

Rhino.Geometry.MeshingParameters.Coarse

No idea what settings .Default is using…

Cheers, --Mitch

Hey Mitch,

The CreateFromBrep(Brep) overload doesn’t call into rhino with a default Geometry.MeshingParameters parameter. Whatever happens is determined on the native side so I’ll have to dig a bit to find out. I’ll get back to you.

Alain

OK, cool, thanks Alain! --Mitch