Data conversion failed from Goo to MeshParameters

Hello, I’m working on a python script, and I want to use a brep as an input and to create a mesh with MeshBrep inside the script. I initialize the parameters with SettingsCustom and when I create the mesh, it returns the error: Data conversion failed from Goo to MeshParameters.
I thank you in advance if you can help me to understand the problem. (5.7 KB)

Well … P is not my game (meaning that some other good Samaritan must resolve that for you) but given the opportunity … if you do this > that conversion ops I would strongly suggest to add several checks in case that things are not going according to plan.

Open attached (load first R file for the demos) and see the logic (it’s C# but I do hope that the checks are clear). (118.0 KB)
MeshFromBrep_EntryLevel_V1.3dm (353.4 KB)

For instance see that with the wrong meshingParameter you start with a closed Brep and you end-up with an open mesh:

I would advice against using ghpythonlib for this and either go through rhinoscriptsyntax or RhinoCommon directly. The latter like so: (4.3 KB)

You can inspect/get/set further meshing parameters through the properties of the MeshingParameters class.

1 Like

Thank you for your answer, I start using RhinoCommun, and it solves also other problem I had. I will learn it more in details.