### Parasolid Setup and Integration Example (C++) Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/class_h_p_s_1_1_o_o_c Demonstrates the necessary steps to set up and integrate the Parasolid library within a C++ project. This includes setting header paths, schema directories, and linking the library. ```c++ #include "parasolid.h" // Step 1: Set Up Parasolid (Assuming environment variables or paths are set) // Step 2: Include Parasolid Header (already done above) // Step 3: Set Schema Directory Location std::string schemaDir = "/path/to/parasolid/schema"; PK_Schema_Set_Directory(schemaDir.c_str()); // Step 4: Link Against Parasolid (Usually handled by build system, but conceptually represented here) // Linker flags would typically include libraries like libPK_Core.lib, etc. ``` -------------------------------- ### C# Introduction to HOOPS Visualize Desktop Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cpp/class_h_p_s_1_1_material Basic C# examples for getting started with HOOPS Visualize Desktop on Windows. This covers essential setup and interaction with the library. ```csharp using System; using HOOPS.Visualize; public class VisualizeApp { public static void Main(string[] args) { // Initialize HOOPS Visualize HC_Open_System("Data/Program.exe"); // Create a view int viewKey = 0; HC_Create_View("MyView", ref viewKey); // ... your visualization code ... // Close HOOPS Visualize HC_Close_System(); } } ``` -------------------------------- ### Step 1: Set Up Parasolid Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cpp/class_h_p_s_1_1_selection This step involves the initial setup required before interacting with the Parasolid kernel. It typically includes initializing the Parasolid environment and potentially setting up licensing information. Refer to Parasolid documentation for specific initialization routines. ```c++ // Placeholder for Parasolid initialization code // This would involve calling specific Parasolid API functions // Example: // PK_SESSION_init_args_t init_args; // PK_SESSION_init(&init_args); // Ensure proper error handling and cleanup ``` -------------------------------- ### Getting Started Source: https://docs.techsoft3d.com/hoops/visualize-desktop/general/release_notes/2025.6.0 Guides and overviews for starting with HOOPS Visualize Desktop, including introduction, technical details, supported platforms, and file formats. ```APIDOC ## Introduction Provides an overview of HOOPS Visualize Desktop. ### Method N/A ### Endpoint N/A ## Technical Overview Details the architecture, segments, styles, geometry types, display drivers, and other technical aspects of HOOPS Visualize Desktop. ### Method N/A ### Endpoint N/A ## Supported Platforms Lists the platforms supported by HOOPS Visualize Desktop, including Windows, Linux, macOS, iOS, and Android, with platform-specific notes. ### Method N/A ### Endpoint N/A ## Supported File Formats Details the 3D, 2D, and image file formats supported by HOOPS Visualize Desktop. ### Method N/A ### Endpoint N/A ``` -------------------------------- ### Setting up Parasolid Environment Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/_h_p_s_8_navigation_cube_control_8cs This section provides steps and code examples for setting up the Parasolid environment, including including headers and linking libraries. It's a prerequisite for Parasolid integration. ```c++ // Step 2: Include Parasolid Header #include // Step 3: Set Schema Directory Location // Example: PK_Schema_Set_Directory("path/to/parasolid/schemas"); // Step 4: Link Against Parasolid (Optional - typically handled by build system) // This comment indicates that linking is usually managed by the build configuration. ``` -------------------------------- ### Example: Edge Attribute Control in C++ Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/_h_p_s_8_marker_attribute_control_8cs Demonstrates how to set and get edge attributes using attribute controls in C++. This example is part of the HOOPS Visualize Desktop Programming Guide, specifically within the 'Attributes' section. ```cpp HAttributecontrol edge_control(H_EDGE); // Set edge color to red edge_control.SetColor(H_RGB, 255, 0, 0); // Get edge color float r, g, b; edge_control.GetColor(H_RGB, r, g, b); // Set edge weight edge_control.SetWeight(1.5); // Get edge weight float weight; weight = edge_control.GetWeight(); ``` -------------------------------- ### Set Up Parasolid Prerequisites Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/_h_p_s_8_g_p_u_8cs Outlines the necessary setup steps before integrating Parasolid with HOOPS Visualize Desktop. This includes setting up the Parasolid environment, including header files, and configuring schema directory locations. Linking against the Parasolid library is also an optional but often necessary step. ```c++ // Step 1: Ensure Parasolid is installed and licensed correctly. // Step 2: Include Parasolid header files. // This path will depend on your Parasolid installation. #include #include #include // Step 3: Set Schema Directory Location. // This is crucial for Parasolid to load necessary schema files. // For example, using environment variables or direct path setting. // HPS::SetEnvironmentVariable("PARASOLID_SCHEMA_DIR", "/path/to/parasolid/schemas"); // Step 4: Link Against Parasolid (Optional but typical). // This is usually done in your build system (e.g., CMake, Makefile, Visual Studio project settings). // Linker input: libpmodeler.lib (or equivalent for your platform) ``` -------------------------------- ### C++ Example: Edge Attribute Control Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/_h_p_s_8_exchange_8cs A specific C++ code example demonstrating the use of attribute controls to set and get edge properties. This includes setting edge weights and colors, providing a practical implementation guide. ```c++ // Assuming 'edge_key' is a valid segment key representing an edge // Setting the edge weight to 3.0 Hpoints::Set_Attribute(Hpoint::Edge_Control, edge_key, HBaseModel::Weight, 3.0f); // Getting the edge color float edge_color[3]; Hpoints::Get_Attribute(Hpoint::Edge_Control, edge_key, HBaseModel::Color, edge_color); // Setting the edge color to red float red_color[] = {1.0f, 0.0f, 0.0f}; Hpoints::Set_Attribute(Hpoint::Edge_Control, edge_key, HBaseModel::Color, red_color); ``` -------------------------------- ### Start and Initialize VR Session using VR API Source: https://docs.techsoft3d.com/hoops/visualize-desktop/prog_guide/0702_offscreen_rendering Provides specific code examples for starting and initializing a Virtual Reality session using the HOOPS Visualize VR API. This covers the initial setup required before interacting with the VR environment. ```c++ #include "pch.h" #include "Visualize.h" #include "VR.h" // Function to start and initialize a VR Session bool StartAndInitializeVR() { HPS::VR::Manager& vrManager = HPS::VR::Manager::GetInstance(); // Check if the VR system (e.g., OpenVR) is available if (!vrManager.IsSystemAvailable(HPS::VR::SystemType::OpenVR)) { std::cerr << "OpenVR system not available." << std::endl; return false; } // Start the VR session HPS::Result startResult = vrManager.StartSession(HPS::VR::SystemType::OpenVR); if (!startResult.Ok()) { std::cerr << "Failed to start VR session: " << startResult.GetMessage() << std::endl; return false; } // Create and initialize a VR session object HPS::VR::Session session; HPS::Result initResult = session.Initialize(); if (!initResult.Ok()) { std::cerr << "Failed to initialize VR session: " << initResult.GetMessage() << std::endl; vrManager.EndSession(); // Clean up session start return false; } std::cout << "VR session started and initialized successfully." << std::endl; return true; } // To end the session later: void EndVRSession() { HPS::VR::Manager::GetInstance().EndSession(); std::cout << "VR session ended." << std::endl; } ``` -------------------------------- ### Step 1: Set Up Parasolid for HOOPS Visualize Desktop Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/_h_p_s_8_invalid_license_exception_8cs This documentation outlines the initial prerequisite for integrating Parasolid with HOOPS Visualize Desktop, specifically the setup phase. It involves ensuring that the Parasolid environment is correctly configured before proceeding with any Parasolid-related operations within Visualize Desktop. This typically includes installation and licensing. ```plaintext Step 1: Set Up Parasolid Ensure that the Parasolid libraries are installed and properly licensed on your system. This may involve obtaining a Parasolid license from Siemens and installing the Parasolid SDK according to their documentation. Verify that the Parasolid environment variables are set correctly if required by your installation. ``` -------------------------------- ### Virtual Reality Application Setup (OpenVR) Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/_h_p_s_8_zoom_fit_touch_operator_8cs Guides on setting up a VR application using the OpenVR API, including initializing and starting a VR session, and interacting with VR devices. ```C++ #include HIP::VR::VR vr_system; vr_system.Initialize(); vr_system.StartSession(); // ... (VR interaction code) ... ``` -------------------------------- ### Parasolid: Set Up Parasolid Prerequisites Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/_h_p_s_8_sprocket_8cs This section outlines the necessary steps to set up the Parasolid environment. It includes setting up the Parasolid installation, including the header files, and configuring the schema directory location. Linking against the Parasolid library is also detailed as an optional step. ```cpp #include #include // ... other setup code ... ``` -------------------------------- ### Example: Edge Attribute Control in C++ Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/class_h_p_s_1_1_g_p_u Demonstrates how to set and get edge attributes using attribute controls in C++. This is part of the 'Programming Guide' and is useful for developers manipulating geometry appearance. ```c++ // Example: Edge Attribute Control in C++ // HOOPS::Result rc = HOOPS::SetEdgeAttribute( // segment_key, // HOOPS::EdgeAttribute::Weight, // Attribute type // 1.5f // Attribute value // ); // if (rc != HOOPS::Utility::ok) { // // Handle error // } ``` -------------------------------- ### Setting Up Parasolid Integration: Step 1 Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cpp/class_h_p_s_1_1_text_attribute_control This step outlines the initial setup required for integrating the Parasolid modeling kernel. It involves ensuring the Parasolid environment is correctly configured before proceeding with further integration steps. ```cpp // Step 1: Set Up Parasolid // This typically involves initializing the Parasolid environment. // The exact API calls depend on the Parasolid version and SDK. #include // Parasolid header void InitializeParasolid() { // Example initialization, consult Parasolid documentation for specifics if (PS_startup() != PS_SUCCESS) { // Handle initialization error fprintf(stderr, "Failed to initialize Parasolid.\n"); return; } printf("Parasolid initialized successfully.\n"); } ``` -------------------------------- ### Basic File Loading with HOOPS Exchange Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cpp/class_h_p_s_1_1_vector__2_d Covers the fundamental steps required to load files using the HOOPS Exchange library. It outlines prerequisites such as installation and environment setup, and provides an example of initiating the file loading process. ```c++ #include "hps/exchange/Exchange.h" void loadModelExchange(HPS::Database& database, const std::string& filePath) { HPS::Exchange::LoadOptions loadOptions; // Configure load options as needed (e.g., specific formats, units). HPS::ErrorCode status = HPS::Exchange::LoadFile(database.GetRootNode(), filePath.c_str(), loadOptions); if (status != HPS::ErrorCode::Success) { // Handle file loading error. } } ``` -------------------------------- ### Parasolid: Setting Up and Linking Source: https://docs.techsoft3d.com/hoops/visualize-desktop/api_ref/cs/class_h_p_s_1_1_shell_relation_array Guides users on setting up the Parasolid environment, including including the necessary header files and optionally linking against the Parasolid library. This is a prerequisite for using Parasolid functionalities within the application. ```c++ #include // Optional: Link against the Parasolid library // For example, using a compiler flag or build system setting. ```