CAD Exchanger SDK
Examples

CAD Exchanger SDK includes a set of C++ and C# examples demonstrating its functionality. The examples are located in the ${install_dir}/examples subdirectory.

The examples are provided under a permissive Modified BSD License.

Before launching examples set an environment (PATH on Windows, LD_LIBRARY_PATH on Linux, DYLD_LIBRARY_PATH on MacOS) to CAD Exchanger SDK libraries. Make sure you consistently use release and debug libraries with respective example executables.

C++ Examples

List of Examples

Example Purpose
General Example Demonstrates how to simply convert CAD files with the help of CAD Exchanger SDK
Model Explorer Demonstrates how to explore imported model contents
Assembly Creation Demonstrates how to create an assembly of sub-assemblies and parts of solid primitives and to export to target format
Meshing Example Demonstrates how to create polygonal representations using computational meshers
Progress Status Example Demonstrates how to integrate support of progress status update

Building

Before compiling examples make sure you have substituted the original ${install_dir}/examples/cadex_license.cxx file with the one that you received for your evaluation process, or with the production license file upon purchasing a commercial license.

Building with Microsoft Visual Studio

On Windows, the examples should be built using corresponding Visual Studio project files. Currently the SDK ships with example project files for Visual Studio 2013. To downgrade to an earlier Visual Studio version (2010 or 2012), open the project file and replace the platform toolset and the linker settings in the project properties dialog box. The following example demonstrates how to downgrade to Visual Studio 2010:

examples_prop_toolset.png
Setting Platform Toolset to VS2010
examples_prop_lib.png
Setting Linker settings to VS2010

Make sure you do this downgrade for any configuration you plan to work with (Debug/Release, Win32/x64).

Building with GNU Makefiles

On Linux or MacOS, to build an example with the help of GNU make, change the current directory to the example directory and type:

  • make or make release to build release mode;
  • make debug to build debug mode.

C# Examples

C# examples are alocated in the subfolder ./examples/csharp of the SDK package.

Provided C# examples demonstrate how to integrate C++ based CAD Exchanger SDK into C# applications.