Introduction¶
In the DeepSeek Harness (DSH) ecosystem, dsh-better-sidebar manages file browsing. When opening .stl or .3mf files, developers typically need to download them locally or open them in a new tab. The dsh-3d-preview plugin integrates a WebGL-based 3D rendering engine into the sidebar, allowing users to view models, switch slicer trays, and read filament colors without leaving the current context.
Plugin Overview¶
Maintained by kmyqchy and licensed under MIT. Built on Three.js, it has no runtime module dependencies. It is specifically designed to work with dsh-better-sidebar as a file viewer.
Core Features¶
- File Formats & Specifications: Supports
.stland.3mf. It parses the 3MF core specification, Production Extensions (External Model parts), basematerials, colorgroups, and facet paint data from Bambu Studio and OrcaSlicer. - Slicer Integration: Detects slicer trays and allows switching between them during preview. It extracts per-object filament colors from project metadata to render colors correctly (e.g., Bambu Studio projects).
- Interaction & View: Supports mouse interactions (drag to rotate, scroll to zoom, right-click drag to pan). Provides fit-to-view, snapshot (PNG), and fullscreen modes.
- Statistics: Displays triangle count, object count, instance count, bounding box dimensions, material confidence, and tray chips at the bottom of the viewer.
Installation & Activation¶
This plugin requires Node 20+ and a DSH configuration file with dsh-better-sidebar installed.
Install the pre-built Tgz package:
dsh plugin --profile web add https://github.com/kmyqchy/dsh-3d-preview/releases/latest/download/dsh-3d-preview.tgz
After installation, dsh web must be restarted. Configuration files are composed during bootstrap, so the new plugin will not load until a restart.
Typical Usage¶
- Click a
.stlor.3mffile in the sidebar file browser to load the preview in the sidebar. - Interact using the mouse: drag to rotate, scroll to zoom, right-click drag to pan.
- If within a slicer project, use the provided controls to switch slicer trays.
- Check the statistics and slicer-assigned filament colors at the bottom.
Limitations & Notes¶
- File Size: File size is limited to 20 MB. This limit is controlled by
dsh-better-sidebar.mediaLimit. - Format Support: Currently only supports STL and 3MF. glTF, STEP, OBJ, and PLY are not supported.
- Feature Scope: No wireframes, section planes, or measurement tools.
- No Hot Reload: As files are fetched via HTTP, changes are not automatically reloaded. You must reopen the tab after re-exporting the file.
- Visuals: Slicer thumbnails (e.g.,
Metadata/plate_N.png) are not displayed; only geometry is shown. - Language: The interface language is determined by
navigator.language. If the language code starts withzh(e.g.,zh-CN), Chinese is displayed; otherwise, English is displayed.
Conclusion¶
This plugin provides a way to inspect 3D model geometry and material colors directly within the conversation context of the DSH sidebar.