I'd like to import STEP files through the Python API.
The only way I found so far is "Import.import". Side Note: "Import" is a legal name for a module, but maybe not the most appropriate...
But that function always returns None. It creates a new document with one object. You can also add the "Name" of an open document, which is also kind of inconvenient.
Is there any way to import a STEP File to a Shape object or similar?
Importing STEP Files
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Importing STEP Files
Open the python report panel, open the document in which you want to import your step file. Then from the menu use the import function.
In the python report panel you will see the python code to be used.
In the python report panel you will see the python code to be used.
Re: Importing STEP Files
Yes, I did exactly that and had the problems mentioned above.
Re: Importing STEP Files
Thank you, "Part.read" is what I was looking for.
The other way is extremely clumsy...
The other way is extremely clumsy...