How roadinforest/occt-step-viewer-web works
This is a client-side CAD file viewer. A user selects a supported file, the Vue demo reads it and dispatches it to the OCCT WebAssembly importer, then exposes the import result and renders its meshes in an interactive Three.js viewer. The component also handles loading and error states. The README documents JSON mesh-structure display; the supplied excerpt does not show its rendering details, so that capability is represented without asserting a separate implementation path. Some template and rendering code is omitted from the excerpts.
Main entry points: OcctImportDemo.vue Format dispatch · main.js Vue entry point · App.vue Application shell · occt-import-js.js OCCT importer
Components 13
Vue application
- Vue entry point
occt-vue-demo/src/main.js - Application shell
occt-vue-demo/src/App.vue - Import demo UI
occt-vue-demo/src/components/OcctImportDemo.vue
CAD import
- File selection and reading
occt-vue-demo/src/components/OcctImportDemo.vue - Format dispatch
occt-vue-demo/src/components/OcctImportDemo.vue - OCCT importer
occt-vue-demo/public/occt-import-js.js - OCCT WebAssembly
occt-vue-demo/public/occt-import-js.wasm
Results and viewer
- Import result and status
occt-vue-demo/src/components/OcctImportDemo.vue - Mesh JSON display
occt-vue-demo/src/components/OcctImportDemo.vue - Mesh rendering
occt-vue-demo/src/components/OcctImportDemo.vue - Three.js renderer
- Orbit controls
Other components
- CAD file user
Connections 12
- CAD file user → Vue entry point: opens viewer
README.md - Vue entry point → Application shell: mounts
occt-vue-demo/src/main.js - Application shell → Import demo UI: renders
occt-vue-demo/src/App.vue - CAD file user → File selection and reading: selects file
occt-vue-demo/src/components/OcctImportDemo.vue - File selection and reading → Format dispatch: provides bytes
occt-vue-demo/src/components/OcctImportDemo.vue - Format dispatch → OCCT importer: calls parser
occt-vue-demo/src/components/OcctImportDemo.vue - OCCT importer → OCCT WebAssembly: loads engine
- Format dispatch → Import result and status: sets result
occt-vue-demo/src/components/OcctImportDemo.vue - Import result and status → Mesh JSON display: displays structure
README.md - Import result and status → Mesh rendering: renders meshes
occt-vue-demo/src/components/OcctImportDemo.vue - Mesh rendering → Three.js renderer: uses renderer
occt-vue-demo/src/components/OcctImportDemo.vue - Mesh rendering → Orbit controls: creates controls
occt-vue-demo/src/components/OcctImportDemo.vue