Export geometry to STL, STEP, IGES, ect - Python API

168 views
Skip to first unread message

Carlos Rodriguez

unread,
Mar 2, 2024, 7:52:27 AM3/2/24
to OpenVSP
Hello everyone,

I am trying to export a simple geometry (fuselage + wing) generated directly in a script to a CAD format like STL, STEP or IGES. If I save it to .vsp3 format it does work, however when I try to export it with vsp.ExportFile() it doesn't take into account the manipulations, for example moving the wing a bit back with vspSetParam(wing, X_Rel_Rotation,..). But it does show correctly when opened the .vsp3 file in openVSP. 

Any ideas of what I'm doing wrong?

I attach the python script I use for this task.

Thanks in advance :)

Cheers,
Carlos


testExportSTLsimple.py

Rob McDonald

unread,
Mar 2, 2024, 12:21:48 PM3/2/24
to OpenVSP
You need to call

vsp.Update()

Before the export.  The Parms have been applied (so they get written to the *.vsp3 file), but the surface math has not been done, so the Export in other formats is out of date.

Rob

Carlos Rodriguez

unread,
Mar 4, 2024, 2:51:14 AM3/4/24
to OpenVSP
Hi Rob

That's it, it worked!

Thank you so much :)

Kind regards,
Carlos
Reply all
Reply to author
Forward
0 new messages