Python Export obj files - set polygon density variable

The _ (underscore) is just to make shure that the commands can be used in different languages of Rhino, if you would not use it, your script will work in english language version only. The - (hyphen) sign before -Export is to prevent the dialog to pop up, so you can enter everything via the commandline.

About your other quesitons: If you only have _PolygonDensity in your commandline and _DetailedOptions is missing, then i guess this is not yet hooked up in the mac version. I can not verify this from my windows PC but i hope @Helvetosaur or @pascal can chime in to clarify.

Yes, if you have a NURBS surface or polysurface and want to export it as OBJ file, it has to be approximated which means it gets meshed into polygons. These polygons are just faces (quads or triangles) using points. The density sets how far the resulting mesh is allowed to deviate from the originating NURBS object. The smaller the density, the smaller the file size will be. If you select eg. a NURBS sphere and run the _Mesh command in Rhino, you can see various options available in the dialog to control the final density of the mesh. The same options are available in the commandline when you export as OBJ file. At least this is how it works on windows.

c.

1 Like