HOOPS Visualize | HOOPS Exchange | HOOPS Web Platform

The content is collected from the Internet, and the function is for reference only! ! !

HOOPS 3D Application Framework (HOOPS/3dAF) is a product developed by Tech Soft America and remarketed by Spatial that provides the core graphics architecture and graphics capabilities for today's world's leading 3D applications in the fields of CAD/CAM/CAE, engineering, visualization and simulation. With HOOPS/3dAF, users stand on a high starting point to develop and maintain high-performance user applications quickly and efficiently. By integrating HOOPS/3dAF into corresponding software development, users can better manage development costs, optimize resources and shorten time-to-market.

1. Overview
| It is a set of high-performance model conversion software library, which can provide the software with powerful model import and export functions. We can use it as a conversion tool alone, or integrate it into our own software. Similarly, other products of HOOPS are inseparable from the support of HOOPS Exchange. They also need HOOPS Exchange to provide them with the function of importing and exporting models. The following introduces the application of
HOOPS Exchange in HOOPS Visualize HPS, HOOPS Visualize 3DF and HOOPS Communicator  respectively .

2. Support for HOOPS Visualize HPS
Before integration, you should first pay attention to the HOOPS Exchange version corresponding to HOOPS Visualize HPS. If the version is wrong (high or low, it will not work), even if other settings are correct, it will not succeed. The HOOPS Exchange version supported by the test environment HOOPS HPS 2021 is HOOPS Exchange 2021.
 

(1) Add hps_cs_sprk_exchange library file

To use HOOPS Exchange in HOOPS Visualize  HPS , you first need to import the Visualize-Exchange integration library, and C++ users need to link to hps_sprk_exchange.lib. C# users need to add a reference to hps_cs_sprk_exchange.dll located in the bin directory. This demonstrates the use of HOOPS Exchange in hps_wpf_sandbox, first add the hps_cs_sprk_exchange.dll library in its reference.

The path of hps_cs_sprk_exchange.dll is as follows:

(2) Set the search path of HOOPS Exchange

Next, set the environment directory of HOOPS Exchange in the Path environment variable (or copy the DLL in the environment directory of HOOPS Exchange to the application execution directory). If this step is not performed, the library file will not be found when running the program.

The environment directory of HOOPS Exchange is as follows:

(3) Add the conditional compilation symbol of HOOPS Exchange

Finally, set the conditional compilation symbol, open the properties of the hps_wpf_sandbox project → generate, and add USING_EXCHANGE to the conditional compilation symbol.

At this point, the setting of integrating HOOPS Exchange in hps_wpf_sandbox is completed.

(4) Running effect
Run the hps_wpf_sandbox project, and then read and display the catia model. This process uses the HOOPS Exchange software library to import the model.

3. Support for HOOPS Visualize 3DF

Next, introduce the integration of HOOPS Exchange in HOOPS Visualize  3DF . Before the integration, you should also pay attention to the version of HOOPS Exchange corresponding to HOOPS Visualize 3DF. If the version is incorrect, the integration will not be successful. The Exchange version of HIO supported by the test environment HOOPS_3DF_2510 is HOOPS Exchange 2020 SP2. For specific version correspondence, please refer to the release notes of HOOPS Visualize 3DF: HOOPS Visualize 3DF Documentation — HOOPS Visualize 3DF 28.00 Documentation

(1) Using HOOPS Exchange HIO components

HOOPS Visualize 3DF integrates HOOPS Exchange using the HOOPS Exchange HIO component , which is provided as a .hio file.
First create a hio_plugins directory in the working directory of our own application, copy the 
hioexchange <version>.hio file in <hoops>/bin/<platform>/hio_plugins/hio_exchange to the working directory we created earlier.

(2) Set the search path of HOOPS Exchange

Next, set the environment directory of HOOPS Exchange in the Path environment variable (or copy the DLL in the environment directory of HOOPS Exchange to the application execution directory). If this step is not performed, the library file will not be found when running the program.

The environment directory of HOOPS Exchange is as follows:

(3) File loading

Next, read the model in HOOPS Visualize 3DF.
#include "HIOManager.h"
HFileInputResult result = InputOK;
HInputHandlerOptions input_options;
// Set input options using HOOPS Exchange license key and HBaseView object
// NOTE: If the license key was already included at startup via the initial call to HC_Define_System_Options, there is no need to include it here
const char* licensekey = "<license_key_string> "; 
input_options.m_license = licensekey; 
input_options.m_pHBaseView = my_view;
// Open required HOOPS/MVO model segment and read file
HC_Open_Segment_By_Key(<my model key>);
result = HBaseModel::Read("c:\\temp\\myFile.CATProduct", view, true, &input_options);
HC_Close_Segment();

(4) Running effect
Run the HOOPS Visualize 3DF program, use HOOPS Exchange to read and display a catia model.

4. Support for HOOPS Communicator

In HOOPS Communicator , using HOOPS Exchange is very simple, because HOOPS Exchange has been integrated in the software package of HOOPS Communicator, the name is: converter.exe, and its location is located in <HOOPS_Communicator>\authoring\converter\bin\win64.

It is also very simple to convert the model, first open the <HOOPS_Communicator>\quick_start directory:

Double-click the start_server.bat file to start HOOPS Communicator. The following information indicates that the startup is successful:

Then drag the model to be converted to convert_file.bat

The model will be lightweight converted:

The last line is the access address of the converted model, through which you can view the lightweight model:

Guess you like

Origin blog.csdn.net/john_dwh/article/details/131921727