OpenVSP / OpenVSP

A parametric aircraft geometry tool
https://www.openvsp.org
Other
552 stars 292 forks source link
3d 3d-models aerodynamics aerospace aerospace-engineering aircraft aircraft-design cfd engineering finite-element-methods modeling parametric

Build and Installation Instructions for OpenVSP

INTRODUCTION

OpenVSP is a parametric aircraft geometry tool. OpenVSP allows the user to create a 3D model of an aircraft defined by common engineering parameters. This model can be processed into formats suitable for engineering analysis.

The predecessors to OpenVSP have been developed by JR Gloudemans and others for NASA since the early 1990's. In January 2012, OpenVSP was released as an open source project under the NOSA 1.3 license. The first open source version was 2.0.0.

LICENSE

OpenVSP is available under the terms of the NASA Open Source Agreement (NOSA) version 1.3. The complete terms of the license are specified in the LICENSE file.

DEPENDENCIES

OpenVSP relies on a variety of libraries and code made available by other authors. If you are a VSP user, you probably don't need to worry about this. Take this section as informational, providing credit where due.

If you wish to compile VSP or to use the VSP API, then you will need to know more. These dependencies fall into four categories: those assumed to be provided by the operating system; those that must be downloaded and installed by the developer; those that are bundled with OpenVSP, but the developer may want to use a different version installed on the system; and those that are bundled with OpenVSP.

Most users are familiar with the OpenVSP GUI. OpenVSP can also be accessed by other programs via an API, or in a batch mode with no user interaction. These 'headless' targets may be compiled without any of the graphics libraries installed. Although most developers will want to build the graphical version, those dependencies only needed by the GUI program and graphics-enabled API are marked GRAPHICS_ONLY.

Assumed provided by the operating system.
Installed by the developer.
Bundled with OpenVSP, but system libraries may substitute.
Bundled with OpenVSP.

BUILD INSTRUCTIONS

If you want to build OpenVSP on a Debian based Linux computer (Debian, Ubuntu, Mint, etc.), step-by-step instructions are included on the OpenVSP Wiki here: Debian Based Build.

If you want to build OpenVSP on a RPM based Linux distribution, step-by-step instructions are included on the OpenVSP Wiki here: RPM Based Build.

All of the supporting libraries and code described above in DEPENDENCIES categories 1 and 2 must be properly installed. Those in categories 3 and 4 can be satisfied by OpenVSP itself. Any dependencies from category 3 that the developer prefers to use a system library must be properly installed.

We only expect two common cases where developers would prefer to use the system libraries over the bundled ones. First, on Linux where system libraries are readily available and distributions strongly prefer they are used. Second, when a developer is simultaneously working on OpenVSP and the dependency in question.

OpenVSP is packaged for compilation into three CMake projects: the main OpenVSP project with all the OpenVSP source and the category 4 dependencies; a Libraries project with all the category 3 dependencies; a SuperProject that can unify building the other two projects.

Casual developers new to OpenVSP will want to use the SuperProject; building it should take care of everything. More involved developers will want to use the OpenVSP and Libraries projects directly; the OpenVSP project integrates better than the SuperProject with most IDEs. Developers who want to use only system libraries for the category 3 dependencies have no need for the Libraries project; they can work only with the main project.

CMake is used to construct the build files for a project. CMake supports out-of-tree builds which keep the source tree free of generated files. Create a build directory to contain the generated files, say openvsp/build. Then, change to the build directory and run CMake - passing a relative path to openvsp/src, say cmake ../src.

Once CMake has generated the files for your favorite build system, load them in the IDE and compile or launch the build from the command line.

The OpenVSP CMake system can be configured by defining a handful of variables. These variables may be relevant to some or all of the projects.

All project variables:
OpenVSP project variables:
Libraries & SuperProject project variables:

Build Instructions for Windows 10 and Visual Studio Express 2017

These instructions are for building the Libraries and OpenVSP separately. It is assumed the user has successfully installed CMake, Python, SWIG, and Doxygen and those utilities can be called from the command line.

Building Libraries

  1. Create a new directory called build located outside the locally cloned OpenVSP repo

  2. In the new build directory, create new directories "Libraries" and "vsp"

  3. Using the CMake gui (cmake-gui.exe), click "Browse Source" and browse to .../OpenVSP/Libraries where OpenVSP is the top level of the cloned repo for the source code.

  4. Click "Browse Build" and browse to the newly created "Libraries" directory (.../build/Libraries) for the build location of the new binaries.

  5. Click "Configure" and select "Visual Studio 2017" for the project generator and "x64" for the Optional Platform Generator. Click "Finish".

  6. Click the "Add Entry" button. For Name, enter "CMAKE_BUILD_TYPE". For Type, select STRING, and Value type "Release". Click OK.

  7. Click "Generate".

  8. Open Visual Studio Express 2017 and select File > Open Project and browse to .../build/Libraries/VSP_LIBARIES.sln.

  9. In the Solutions Configurations pulldown, change from "Debug" to "Release".

  10. Right-click on "ALL_BUILD" in the Solution Explorer and select "Build". When complete, repeat this step to verify no errors.

Building OpenVSP

  1. Open the CMake Gui (cmake-gui.exe) and browse to .../OpenVSP for the source code and .../build/vsp for the build location for the binaries.

  2. Click "Add Entry" and type "CMAKE_BUILD_TYPE" for Name, select "String" for Type and enter "Release" for Value.

  3. Click "Add Entry" again and input "VSP_LIBRARY_PATH" for Name, select PATH for Type and browse to .../build/Libraries

  4. Click "Configure" and select "Visual Studio 2017" for the project generator and "x64" for the Optional Platform for Generator. Click "Finish".

  5. Click "Generate".

  6. Open Visual Studio Express 2017 and select File > Open Project and browse to .../build/vsp/VSP_TOP.sln.

  7. In the Solutions Configurations pulldown, change from "Debug" to "Release".

  8. Right-click on ALL_BUILD in the Solution Explorer and select Build. When complete, repeat this step to verify no errors.

  9. Right-click on PACKAGE in the Solution Explorer and select Build. This packages all the directories and executables in a zip file. This zip file will be placed in .../build/vsp/.