Using a custom airfoil in a VSP script

618 views
Skip to first unread message

Michael Kruger

unread,
Nov 3, 2015, 4:24:04 AM11/3/15
to OpenVSP
Good day all.

Is there a way to import a custom airfoil file in a script?

The current usage of 'applying' an airfoil is:

InsertXSec( wid, 1, XS_FOUR_SERIES );

I would like to know if there is a way to substitute the XS_FOUR_SERIES part with a path to an airfoil file?

I have noticed the 'ReadFileAirfoil' command in this post but am not sure of its implementation.

Regards
Michael


Rob McDonald

unread,
Nov 3, 2015, 11:25:16 AM11/3/15
to OpenVSP
The 'TestAll.vspscript' example script that is distributed with OpenVSP attempts to demonstrate using everything in the API at least once.  Check out Line 284 with an example of how to read in an airfoil from a file.

I believe the problem from the other thread still exists -- that updating an airfoil points doesn't itself trigger an update of the wing.  You'll need to poke another wing parameter to make sure the model reflects your results.

Although TestAll.vspscript is in VSP's native AngelScript, if you have the Python API up and running, the commands there should be a very close match.

Rob

Michael Kruger

unread,
Nov 3, 2015, 1:18:36 PM11/3/15
to OpenVSP
Thank you very much. Good to know about the TestAll.vspscript script.

I am not aware of the Python API but would actually prefer it since I am familiar with Python. I will give it a go!

Kind regards

Rob McDonald

unread,
Nov 3, 2015, 1:20:52 PM11/3/15
to ope...@googlegroups.com
Using the Python API requires that you compile your own VSP on your
own computer.

This is because the API version of VSP must match your Python exactly
-- since we can't control the Python you have installed, it is best to
just build your own API version.

You'll need to follow the normal build instructions, but also make
sure you have SWIG installed. That is what creates the Python
wrapper.

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "OpenVSP" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openvsp+u...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages