This is an optional module that adds 3D CAD file support (STEP format) for Chrono using the OpenCASCADE library.
Read the introduction to modules for a technical background on the modularity of the Chrono project.
Features
The CASCADE module uses the functions of the OpenCASCADE open-source library in order to allow loading CAD models that were saved in the STEP file format.
Here are the main features:
- Load object shapes saved in STEP file format
- Compute the center of mass, the mass, the inertia of shapes
- Convert shapes in triangulated meshes for visualization
Requirements
- To run applications based on this module:
- you must have the OpenCASCADE libraries installed.
- To build this module:
- you must have the OpenCASCADE libraries installed.
Building instructions
- Repeat the instructions for the full installation, but when you see the CMake window, you must add the following steps:
- Set the
ENABLE_MODULE_CASCADE
as 'on', then press 'Configure' (to refresh the variable list) - Set the
CASCADE_ROOT
to the path where you have your OpenCASCADE SDK (the one that has inc/, src/, etc. subdirectories), for example it could beD:/OpenCASCADE6.9.0/opencascade-6.9.0
- If prompted, also set the
CASCADE_LIBDIR
to the path where the OpenCASCADE libraries are located. Depending on your version of OpenCASCADE, this could beD:/OpenCASCADE6.9.0/opencascade-6.9.0/win64/vc10/lib
, orD:/OpenCASCADE6.9.0/opencascade-6.9.0/win32/vc10/lib
, orD:/OpenCASCADE6.9.0/opencascade-6.9.0/win64/vc12/lib
, etc. - Press 'Configure' again, then 'Generate', and proceed as usual in the installation instructions.
In order to have the DLLs reachable, on Windows, do the following:
Execute the env.bat
script in the OpenCascade directory before launching the demo (but only from the same DOS shell, via command line) or better, to have path and environment variables already set all times you start windows, go to control panel / system / environment variables window, and just add this minimal set of data:
- to the PATH variable, add the paths containing the required OpenCASCADE .dll files (assuming you installed OpenCASCADE 6.9.0 in D:, otherwise put your paths), separating them with ; and no spaces:
D:\OpenCASCADE6.9.0\opencascade-6.9.0\win64\vc10\bin
D:\OpenCASCADE6.9.0\freeimage-3.16.0-vc10-64\bin
D:\OpenCASCADE6.9.0\tbb42_20140416oss\bin\intel64\vc10
- optionally add also these environment variables with these values (again, modify the path if you used another installation directory for OpenCASCADE)
CSF_LANGUAGE=us
MMGT_CLEAR=1
CSF_EXCEPTION_PROMPT=1
CSF_STEPDefaults=D:\OpenCASCADE6.9.0\opencascade-6.9.0\src\XSTEPResource
In this way, you will be able to start the OpenCASCADE demos by simply clicking on the .exe, without the need of calling the env.bat script before.
How to use it
- Look at the API section of this module for documentation about classes and functions.
- Look at the C++ source of demos to learn how to use the functions of this module.