• Technical Overview
  • Release Notes
  • Reference Manual
  • HOOPS Visualize
TechSoft3d

HOOPS 3D Exchange Integration

1.0 Using the HOOPS 3D Exchange HIO Component

2.0 Supported Entities

3.0 Integrating Directly with HOOPS 3D Exchange

4.0 Platform Support

5.0 Required Libraries


1.0 Using the HOOPS 3D Exchange HIO Component

HOOPS 3D Exchange (3DX) provides you with both import and export capabilities. Firstly, it allows you to use the powerful data translation capabilities of 3DX to bring the tesselation data from over 15 MCAD formats into the HOOPS scene-graph. A full list of the supported formats is detailed here. Specifically, the integration uses 3DX to build a HOOPS scene graph which includes all the assembly and visualization info, as well as PMI info (for select formats) that is contained in the file. Secondly, it allows you to export PRC, IGES, STEP, Parasolid and STL data. The PRC export is particularly important as it is the native 3D representation used within PDF. The PRC export capabilities are required if you want to export PDFs with 3D content.

To use the 3DX HIO component, you first need to rebuild it. This requires that you first have HOOPS 3D Exchange installed on your system. Define an environment variable H3DX_INSTALL_DIR and set it equal to the root of the HOOPS 3D Exchange installation directory. Then open the hio_3dx_vc <version> .vcproj project located in the <hoops> /Dev_Tools/hoops_hio/hio_3dx/source directory. Once the project is built, an .hio file will be created.

To subsequently use the HOOPS/HIO component for HOOPS 3D Exchange, please follow the steps below:

  1. Create a hio_plugins directory in your application's working directory.
  2. Copy the hio3dx<version>.hio file found in <hoops>/bin/<platform>/hio_plugins/hio_3dx to the hio_plugins directory created in the previous step.
  3. Ensure the DLLs from 3DX are in your application's path (32-bit libraries are found in <3dx>/bin/win32, 64-bit libraries are found in <3dx>/bin/x64)
  4. Run your application.

During start-up, when HOOPS/MVO finds the 3DX HIO component (and the 3DX DLLs) in your application's path, it will perform the following steps:

  1. Create the appropriate input and output handler.
  2. Register this handler and the associated file extensions to the HIOManager.

Once the 3DX HIO component is successfully loaded, your application will be able to export via any available writer and import any of the files supported by HOOPS 3D Exchange without having to recompile HOOPS. To utilize the extensive 3DX API services, you must compile against HOOPS 3D Exchange directly and follow the steps described in 3.0 Integrating Directly with HOOPS 3D Exchange.

 

2.0 Supported Files and Data Types

PRC export has the current following restrictions:

  • All analytics (Polycylinders, NURBS Surfaces, Spheres, Ellipses, Circles) will be turned into shells via Compute_Shell_From_Geometry. Furthermore, all curves will be turned into polylines.
  • Color interpolation is supported via textures. However, color interpolation will always be turned on with such models.
  • Images and simple diffuse textures are supported. However, any texture that has an automatic texture map will appear untextured. Environment maps are supported but secondary diffuse textures and bump maps are not.
  • Text and subwindows are not currently supported.
  • Heuristics and Rendering Options are not currently supported. This means that "mask transform" and "screen range" settings are ignored.

A full list of supported CAD file formats is available here. Since HOOPS/3DGS does not have a BREP definition the HIO_3DX component ignores the BREP data and asks 3DX to provide all data in tesselated form.

3.0 Integrating Directly with HOOPS 3D Exchange

If you want to use the full range of services available via HOOPS 3D Exchange, the 3DX HIO Component may not be suitable. Instead, you should integrate directly with the 3DX itself. First, please ensure you review the HOOPS 3D Exchange documentation so that you understand how 3DX is integrated into your application. Once you have done that, you can use our integration as the basis upon which to extend the 3D Exchange capabilities within your application. Note that you must have HOOPS 3D Exchange installed on your system. To get our integration working within your application:

  1. Define an environment variable H3DX_INSTALL_DIR which points to the root of the 3D Exchange installation
  2. Add files HIOUtility3DX.h/.cpp and H3DXHelper.h/.cpp to your project. These files are located in the Dev_Tools/hoops_hio/hio_3dx/source directory of your HOOPS installation.
  3. Add following directory paths to your additional include folders' list:
    • $(HOOPS_INSTALL_DIR)/Dev_Tools/hoops_3dgs/source
    • $(HOOPS_INSTALL_DIR)/Dev_Tools/hoops_mvo/source
    • $(HOOPS_INSTALL_DIR)/Dev_Tools/utility/source
    • $(H3DX_INSTALL_DIR)/headers
  4. Add 'HIO_3DX' in your preprocessor defines.
  5. Add 'hoops_utilsstatd_md.lib hoops_mvo_mgkd.lib hoopsd.lib' as additional dependencies
  6. Add following directory paths to your additional library folders' list:
    • $(HOOPS_INSTALL_DIR)/Dev_Tools/hoops_3dgs/lib/<platform>
    • $(HOOPS_INSTALL_DIR)/Dev_Tools/hoops_mvo/lib/<platform>
    • $(HOOPS_INSTALL_DIR)/Dev_Tools/utility/lib/<platform>
  7. Ensure the appropriate 3DX DLLs are in your application's path at runtime.

Once you have completed the above steps, you do not need to rely on the 3DX HIO component anymore. Please remove the associated .hio file from the hio_plugins directory in your application's working directory. Note that in a direct integration, you must register HIOUtility3DX via HIOManager::RegisterInputHandler so that the HBaseModel::Read function can register the formats supported by HOOPS 3D Exchange. For more information on HOOPS/MVO file input/output architecture, please see section 4.0 File Input/Output and the I/O Manager of the HOOPS/MVO Programming Guide.

You should now be able to read any of the formats supported by HOOPS 3D Exchange into your application with code similar to this:

// Code for reading a CATIA V5 Assembly File
HIOUtility3DX h3dx_reader;
HInputHandlerOptions h3dx_opt;
h3dx_opt.m_pHBaseView = view;
HFileInputResult result = h3dx_reader.FileInputByKey("c:\\temp\\myFile.CATProduct", view->GetModelKey(), &h3dx_opt);

// Code for exporting a STEP File
A3DAsmModelFile * pModelFile = /* model file constructed by user or returned from 3DX */;
HIOUtility3DX h3dx_writer;
HOutputHandlerOptions h3dx_opt;
h3dx_opt.m_pHBaseView = view;
h3dx_opt.m_pExtendedData = pModelFile;
HFileOutputResult result = h3dx_writer.FileOutputByKey("c:\\temp\\myFile.step", view->GetModelKey(), &h3dx_opt);

4.0 Platform Support

For Release 19.1, the 3DX HIO component project is supported under Windows 32-bit/64-bit for Microsoft Visual Studio 2008 and 2010.

For Release 19.0, the 3DX HIO component project is supported under Windows 32-bit for Microsoft Visual Studio 2008.

5.0 Required Libraries

For Release 19.1, the 3DX HIO component supports HOOPS 3D Exchange 4.1.

For Release 19.0, the 3DX HIO component supports HOOPS 3D Exchange 3.00.