Rhino3dmIO to make obj

I have created a stand-alone app to manipulate Rhino files using the Rhino3dmIO package. I have been asked to add the ability to export a 3dm file to an obj and/or stl file.

I don’t see an immediate solution to this. Is there a way to do it? I’m not really a cad guy, so I admit I don’t know all the ins & out of this.

Don Sayler

Hi @don.sayler,

Rhino3dm does not contain classes that read/write OBJ or STL files. However, both of these formats are pretty simple to write. A quick Google search should return a number of open-source samples.

– Dale

Thanks Dale.

I did a little research.

In the Rhino mesh object, what order the Vertices in? Are they in CCW order, or the order that they were created?

If the meshes were created in Rhino then they are likely in a consistent order. We use the “right hand rule”. The vertexes are ordered so that if you are able to curl your fingers in the order of the vertexes with your right hand, the face normal points in the direction of your thumb. If the objects were imported then we used the order that was in file (except for ngons where we triangulate) but it is typically in that order too.


1 Like