The Model Structure Viewer adds a synchronized tree panel to the base viewer. Users can inspect the loaded hierarchy, toggle node visibility, and keep tree state connected to objects in the Three.js scene.

Use this example when you need a tree-driven model browser:
The shared ModelStructureViewer extends the selection-capable viewer and listens to tree nodeCheckStateChanged events. The React page owns the side panel and tree presentation.
| Source | Description |
|---|---|
ModelStructureViewerreact/src/pages/model-structure-viewer/ModelStructureViewer.tsx | Main page component. It creates the shared viewer, uploads models, renders a splitter layout, switches visualization status, and chooses the model or drawing tree container. |
ModelStructureContainerreact/src/features/model-structure-container/ModelStructureContainer.tsx | Displays a model structure tree with icons, selection, expansion, and checkboxes. |
DrawingStructureContainerreact/src/features/drawing-structure-container/DrawingStructureContainer.tsx | Displays drawing structure and sheet selection for drawing visualization mode. |
Treereact/src/common/ui/tree/Tree.tsx | Wraps Ant Design tree UI and delegates conversion, selection, expansion, and check state to useTreeAdapter. |
useTreeAdapterreact/src/common/hooks/useTreeAdapter.ts | Converts shared TreeNode instances to UI nodes and mirrors checked, expanded, and selected keys into React state. |
Canvasreact/src/features/canvas/Canvas.tsx | Displays the viewport controlled by the shared viewer. |
react/src/features/model-structure-container/ | Displays the reusable model tree UI and connects it to the shared model structure. |
| Source | Description |
|---|---|
ModelStructureViewershared/src/viewers/model-structure-viewer/ModelStructureViewer.ts | Extends SelectionHandlingViewer, expands newly built structures, and maps tree check-state changes to object3d.visible. |
SelectionHandlingViewershared/src/viewers/selection-handling-viewer/SelectionHandlingViewer.ts | Adds highlight managers to each visualization state so tree and scene selection can share the same state. |
Tree and TreeNodeshared/src/common/tree/ | Store hierarchy, selection, expansion, check state, traversal helpers, and batched tree events. |
ModelStructure and model nodesshared/src/features/model/structure/ | Represent model hierarchy and keep each node connected to the Three.js object built for it. |
DrawingStructure and drawing nodesshared/src/features/drawing/structure/ | Represent drawing sheets, views, and converted drawing elements. |