mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-01 17:36:21 +03:00
Integrated DE plugin functionality. Reworked DE components: - TKDESTEP: Handling STEP file format. - TKDEOBJ: Handling OBJ file format. - TKDEIGES: Handling IGES file format. - TKDEGLTF: Handling GLTF file format. - TKDEVRML: Handling VRML file format. - TKDEPLY: Handling PLY file format. - TKDESTL: Handling STL file format. Reworked DE DRAW components: TKXSDRAWSTEP: Container for DE command to work with STEP. TKXSDRAWOBJ: Container for DE command to work with OBJ. TKXSDRAWIGES: Container for DE command to work with IGES. TKXSDRAWGLTF: Container for DE command to work with GLTF. TKXSDRAWVRML: Container for DE command to work with VRML. TKXSDRAWPLY: Container for DE command to work with PLY. TKXSDRAWSTL: Container for DE command to work with STL. TKXSDRAW rework to be base DRAW plugin to keep DE session and utils. Updated documentation Updated samples
WebGL: 3D Viewer (JavaScript|C++|WebAssembly)
This sample demonstrates simple way of using OCCT libraries in Web application written in C++ and translated into WebAssembly module using Emscripten SDK (emsdk): https://emscripten.org/
Sample consists of the Open CASCADE 3D Viewer with a button for opening a model in BREP format.
The sample requires a WebGL 2.0 capable browser supporting WebAssembly 1.0 (Wasm).
The sample could be found within OCCT repository in folder /samples/webgl/
.
@figure{sample_webgl.png,"",240} height=408px
Installation and configuration:
- Install Emscripten SDK and activate minimal configuration (Python, Java and CLang) following emsdk documentation. Activate also MinGW when building sample on Windows host.
- Build (using emsdk) or download FreeType static library.
- Configure CMake for building Open CASCADE Technology (OCCT) static libraries (BUILD_LIBRARY_TYPE="Static"). For this, activate emsdk command prompt, configure CMake for building OCCT using cross-compilation toolchain, disable BUILD_MODULE_Draw.
- Perform building and installation steps.
> ${EMSDK}/fastcomp/emscripten/cmake/Modules/Platform/Emscripten.cmake
- Configure CMake for building this WebGL sample using emsdk with paths to OCCT and FreeType. Perform building and installation steps.
- Copy data/occ/Ball.brep from OCCT into "samples" folder within WebGL sample installation path.
- Navigate to installation folder and start web server from it; Python coming with emsdk can be used for this purpose:
> python -m SimpleHTTPServer 8080
- Open compatible browser and enter path taking into account your web server settings:
> http://localhost:8080/occt-webgl-sample.html