Exporting Nurbs to OpenCascade (PyOCCT)

Hi

Im trying to create a direct link between Rhino geometry and GMSH, an open-source Finite element mesher.

GMSH is using the OpenCascade geometry kernel and here i would like to map the NURBS surfaces directly from Rhino3dm to an OpenCascade representation using PyOCCT and Rhino3dm in python.

I can export .stp file from Rhino and import this into the kernel, but i would rather not use this approach.

Has anyone here done something similar or can you point to some projects for inspiration?

-Jesper

Hey @jp1,

I doubt anyone here (at McNeel) has experience with PyOCCT.

Any reason in particular?

– Dale

Alright, thanks Dale. I think I have crunched my way through this.

It seems that I loose the layer structure and the user data when going the .stp approach and as far as i can tell there is not functionality for exporting stp from the rhino3dm library

Hi @jp1,

No, rhino3dm does not include STEP file support.

It seems like GMSH is being actively worked on, and it’s written in C++. You might contact the developers and see if they could add .3dm file support using our free openNURBS toolkit, which is also written in C++.

There are also a of OpenCascade file export plug-ins available for Rhino:

https://www.datakit.com/cad-convertors/rhino-to-open-cascade/2000-rhino-3d-to-open-cascade.html

I thought this sounded interesting. But what do I know…

– Dale