HOOPS Converter converts CAD models into the Stream Cache format used by Communicator to efficiently stream model data to the web client as well as a variety of other output formats. There are many options that control the conversion process.
Please refer to the list of command-line options.
HOOPS Converter requires a valid license to operate. The license must be provided as a command-line argument every time the converter is run.
Running on Windows
The Windows version of Converter can be run from any directory. This sample can be run from the root directory of the Communicator package:
authoring\converter\bin\win64\converter.exe --input "authoring\converter\example\_data\GarrettSupportBar4.CATPart" --output_sc "GarrettSupportBar" --license "LICENSE_KEY_GOES_HERE"
If you would prefer to use a text file containing your license key (instead of typing it on the command line), the –license_file option is also available:
authoring\converter\bin\win64\converter.exe --input "authoring\converter\example\_data\GarrettSupportBar4.CATPart" --output_sc "GarrettSupportBar" --license_file my_license.txt
Running in a “Headless” Linux environment
Most Linux-based servers are not set up for 3D graphics rendering by default. Many operations, such as converting certain types of files and creating PNG images, require that an X server and additional graphics libraries are available. The recommended approach for using HOOPS Converter on Linux servers without graphics hardware is to utilize Xvfb. The steps below illustrate the process to install Xvfb on Ubuntu server. This general process applies to all distributions; however, the exact steps may vary slightly. Please refer to your package manager’s listing for the exact package names on your system.
Install the required packages:
sudo apt-get update sudo apt-get install xvfb libsdl1.2-dev
hoops_convertershould be invoked using
xvfb-run. The example below shows how to generate a PNG image:
/usr/bin/xvfb-run "--auto-servernum" "-s" "-screen 0 640x480x24" /path/to/hoops/converter --license_file "/path/to/communicator_license.txt" --input "/path/to/input.file" --output_png "/path/to/output.png"
In the command line above, the first three parameters are passed to
xvfb-run. The next parameter specifies the path to the
hoops_converterexecutable. All additional parameters are passed to converter.
The following are examples of command line arguments:
This will only generate a PNG of the file with the default resolution of 640x480:
converter --license "LICENSE_KEY_GOES_HERE" --input "c:\temp\Axle.CATPart" --output_png "c:\temp\image.png"
This will execute Converter with all the commands as listed in MyConversions.xml:
converter --license "LICENSE_KEY_GOES_HERE" --input_xml_batch_file "c:\temp\MyConversions.xml"
Find more examples in the HOOPS Communicator package located at HOOPS_Communicator/authoring/converter/example/.
Distributing your application
To distribute a Windows application using the HOOPS Converter binary (i.e., the file called converter.exe in the authoring\converter\bin\<platform> folder), the following items must be included with your application:
All of the binaries contained in the authoring\converter\bin\<platform> folder
The 64-bit Visual C++ redistributable for Visual Studio 2015
For 64-bit Linux distributions, simply include all of the contents in this folder: