We recommend that you review the Technical Overview for a brief tour of the architecture and subcomponents of HOOPS Communicator. The Package Description provides an overview of the SDK contents.

The sections below show how to quickly get started by viewing the sample models, and converting and viewing your CAD models using HOOPS Communicator.

Viewing the Sample Page

Navigate to the quick_start directory, ensure you have Admin privileges, and run start_server.[bat|sh]. This script will deploy the provided HOOPS Server on your local machine, which is built with Node.js (included with the HOOPS Communicator installer).

Open http://localhost:11180/index.html to view a variety of provided sample models that highlight the functionality of the HOOPS Web Viewer. The source code for these examples can be found in web_viewer/examples of your HOOPS Communicator installed package. When viewing one of the example models you will notice you are viewing from hoops_web_viewer_example.html. This page was served from the HOOPS Server, which was launched with start_server.[bat|sh].

Each viewed model starts an instance of the Stream Cache Server, which is responsible for streaming converted CAD models via WebSocket connections. The HOOPS Server is responsible for starting and monitoring Stream Cache Servers connected to Web Viewers in the client. The HOOPS Server has two main functions:

  1. Serve static assets such as HTML files
  2. Provide an API for a HOOPS Web Viewer to request a CAD model for rendering via a Stream Cache Server

Viewing your model

You can convert your CAD models by simply dragging them on convert_file.[bat|sh] in the quick_start directory. If the HOOPS Server is currently running, the model will automatically be displayed in your browser when the conversion is complete. You can view a list of all converted models by opening the converted_files.html document within the quick_start directory. This document is created after converting your first model using convert_file.[bat|sh], view here: http://localhost:11180/converted_files.html

This file is being served from the HOOPS Server, which is also managing and monitoring all of the Stream Cache Servers that are streaming CAD models to the Web Viewer.

After the conversion process has finished, you can find the resulting .scz file in the /quick_start/converted_models/user/sc_models directory. Additionally, a .scs file is generated and placed into the /quick_start/converted_models/user/scs_models directory, and an image of the model is created in the /quick_start/converted_models/user/images directory.

Executing convert_file.[bat|sh] starts a python script that runs an application called converter (converter.exe on Windows) with some predefined settings designed to handle the conversion of the CAD files to the Stream Cache format (SC). The SC format is the streaming-optimized internal format that the Web Viewer component can parse.

Converter Application

The easiest way to test HOOPS Converter more directly is to navigate to the authoring/converter/example directory. You will find the sample.[bat|sh] script that demonstrates various CAD conversion scenarios.

Consult License Overview to location and/or obtain your license key.

Let us modify sample.[bat|sh] to perform your CAD conversion. Open the script in a text editor and remove (or comment out) everything after the first line that calls Converter.


set CONVERTER_LICENSE_KEY="your_license_key"
IF NOT EXIST output mkdir output
../bin/<platform>/converter --input "_data/micro_engine/_micro engine.CATProduct" --output_scs "../../../quick_start/TestModel.scs" --output_png "../../../quick_start/TestModel.png" --output_png_resolution 320x240 --license %CONVERTER_LICENSE_KEY%

In the example above, we are specifying a relative path to a sample CAD file. You can adjust this path to point to a valid model on your hard drive. If you don't have a CAD file available, you can find additional sample models in the HOOPS Communicator package at authoring/converter/example/_data. Also, the command has been modified to generate an image file of the default view for this model with options to specify a custom image size.

After running the script, ensure the HOOPS Server is still running and navigate to http://localhost:11180/hoops_web_viewer_sample.html?scs=TestModel.scs

There is a lot more to HOOPS Converter. Visit our API Reference for more information on its various command-line options. HOOPS Converter is provided as a C++ library with the same functionality as the standalone executable included with your installed HOOPS Communicator package.