ChronoEngine:Unit CASCADE

From ChronoWiki

Jump to: navigation, search

unit_CASCADE

Status:

Tested

Build depends:

Chrono::Engine
OpenCASCADE

Run depends:

Chrono::Engine
OpenCASCADE

Main developers:

Alessandro Tasora

This is an optional unit that adds 3D CAD file support (STEP format) for Chrono::Engine. Read the introduction to units for a technical background on the modularity of the Chrono::Engine project.

Features

The CASCADE unit 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 unit:
  • To build applications based on this unit:

Building instructions

This unit corresponds to an additional DLL library, called ChronoEngine_CASCADE.dll, that can be linked to your application if you want to use it. On Linux systems, the .dll suffix is .so.

That library is not available in the SVN or in the easy installer, so you have to build it. The building process requires the following steps.

  • Repeat the instructions for the full installation, but when you see the CMake window, you must add the following steps:
  • Set the ENABLE_UNIT_CASCADE as 'on', then press 'Configure' (to refresh the variable list)
    File:cmake_units.gif
  • Set the CH_CASCADEDIR to the path where you have your OpenCASCADE SDK,

for example it could be C:/OpenCASCADE6.5.5

  • Press 'Configure' again, then 'Generate', and proceed as usual in the installation instructions.


When you will rebuild the project, you will find some OpenCASCADE-based demos in the binary directory, among other default demos. Look at the C++ source of these demos (in chronoengine/source/demos/cascade/ ) to learn how to use the functions of this unit.

Warning! if you execute the demo .exe programs of this unit, most likely you will get an error message because Windows cannot find some OpenCascade DLLs. Solution: execute the env.bat script in the OpenCascade ros/ 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 these paths (assuming you installed OpenCASCADE in C: , otherwise put your path), separating them with ; and no spaces:
    • C:\OpenCASCADE6.5.5\ros\win32\vc8\bin
    • C:\OpenCASCADE6.5.5\ros\..\3rdparty\win32\freeimage\bin
    • C:\OpenCASCADE6.5.5\ros\..\3rdparty\win32\tbb\bin
  • 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=C:\OpenCASCADE6.5.5\ros\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.

Personal tools