STEP/IGES file in Python

Greetings,

I would like to know if it is possible to read a STEP/IGES NURBS file in Python using OpenNurbs. Otherwise, if you know any way to read these file formats using Python/MATLAB without losing any accuracy I would be very grateful.

Hi @kroncatti,

The openNURBS toolkit does not have the ability to read or write STEP or IGES files. However, Rhino does. And using the new Rhino.Inside technology to run Rhino inside Python, you can do something like this:

import rhinoinside
rhinoinside.load()
import Rhino

doc = Rhino.RhinoDoc.CreateHeadless(None)
doc.Import('/users/dale/desktop/test.igs')
for rh_obj in doc.Objects:
    print(rh_obj.ShortDescription(False))
doc.Dispose()

Does this help?

– Dale

Hi @dale,

Thank you, I will try to use your tip, I was not aware of this technology but this sounds pretty helpful,

Thank you