deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:LAU-MARS/dsh-cad
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
A CAD plugin for DeepSeek Harness (dsh): an embedded 3D/2D CAD viewer plus a native parametric modeling tool family (OCCT kernel) in the Web UI, letting the agent build and inspect CAD geometry step by step — "model while you watch".
An L-bracket modeled live in the chat — profile extrusion, through holes and all-edge fillet as exact OCCT BRep, rendered in the embedded viewer card:

| Capability | Description |
|---|---|
| 🔍 CAD viewing | STL / OBJ / STEP / IGES / BREP / DCPRT (3D), DXF / SVG (2D); interactive in-chat card (orbit / zoom / wireframe / pan) |
| 🏗️ Parametric modeling | Primitives (box/cylinder/sphere/cone/torus), profile extrusion, booleans (fuse/cut/common), all-edge fillet, transforms (translate/rotate/mirror) — exact OCCT BRep, not a mesh approximation |
| 📐 Geometry measurement | Exact volume (mm³), bounding box, triangle counts, DXF layers |
| 📤 On-demand export | STEP (parametric) / STL (mesh); files are written only when the user asks |
| 🖥️ Persistent 3D view panel | A permanent "3D" tab in the session tab bar: XYZ axes + grid (Z-up) when empty, tracks the latest model in real time while modeling |
| ⚡ Zero-copy render pipeline | worker mesh → in-memory binary → three.js typed arrays; zero base64 / zero intermediate files / zero per-step disk writes |
| 💾 Modeling document persistence | Operation log (JSON) + debounced disk mirror; automatically replayed to restore state after a process restart |
| 🖼️ Image → profile | PNG sketch/screenshot → Otsu binarization → contour tracing → extrusion-ready polygon (cad_image_profile) |
| 🔌 FreeCAD executor | Run the same op family on an external FreeCAD console (STEP in/out); requires a local FreeCAD install |
git clone https://github.com/LAU-MARS/dsh-cad.git
cd dsh-cad
npm install && npm run build && npm test
npm install -g @deepseek-ai/dsh pnpm # requires Node ≥ 22
dsh web # let the first launch init the profile, then Ctrl-C
dsh plugin --profile web add /path/to/dsh-cad
# append to ~/.dsh/profiles/web/cordis.patch.yml:
# - insert:
# - id: dsh-cad
# name: 'dsh-cad'
dsh web
Set DEEPSEEK_API_KEY and you are ready — for example:
cad_viewcad_create_prim + cad_boolean + cad_fillet + cad_export, with the 3D tab
updating live at every stepat/axis placement)| Tool | Description |
|---|---|
cad_view |
Open a CAD file and render an interactive viewer card |
cad_info |
Read-only geometry metadata (format / counts / bounding box / units / layers) |
cad_create_prim |
Primitives (mm, Z-up); at for placement, axis for orientation (exact axis-angle rotation) |
cad_extrude_profile |
Extrude a closed XY-plane polygon along +Z into a solid |
cad_boolean |
fuse / cut / common (classic hole punching: plate cut cylinder) |
cad_fillet |
Constant-radius fillet on all sharp edges |
cad_transform |
Translate / Euler rotate / mirror |
cad_volume |
Exact BRep volume (mm³) |
cad_export |
Export STEP / STL / DCPRT (the native replayable part document) to a workspace path |
cad_delete |
Delete a body |
cad_freecad |
Run an op program on an external FreeCAD executor (optional STEP input / export) |
cad_image_profile |
PNG → contours → extrusion-ready polygon points |
After every modeling step: the same viewer card refreshes in place (stable viewId + versioned URL), and the "3D" tab tracks the latest model in real time.
Modeling today runs on the built-in WebGL-class kernel (OCCT in the browser — zero install). The connectors below refer to external CAD engines acting as executors for the same tool family, planned for future support:
| Connector | Suite | Status |
|---|---|---|
| Built-in kernel | CAD modeling kernel based on OCCT + WebGL, runs in the browser — zero install | ✅ Built-in |
| FreeCAD | open-source parametric suite — natural local executor via its Python API | ✅ Available (needs local install) |
| SolidWorks | Dassault Systèmes industry-standard 3D CAD | 🚧 Planned |
| Fusion 360 | Autodesk cloud-connected CAD/CAM | 🚧 Planned |
| Onshape | cloud-native SaaS CAD, fully in the browser | 🚧 Planned |
| ZW3D(中望3D) | ZWSOFT all-in-one CAD/CAM | 🚧 Planned |
| GstarCAD 3D(浩辰3D) | Gstarsoft 3D CAD | 🚧 Planned |
cad_view(path) modeling tools (cad_create_prim, …)
→ import worker (occt-import-js) → modeling worker (opencascade.js WASM)
→ CadScene JSON (base64-f32) → exact BRep geometry + meshing
→ GET /dsh-cad/scene/<id> → in-memory binary scene (f32/u32 packed)
→ GET /dsh-cad/bin/<docId>
↓ session presentationMeta (viewId + versioned URL) ↓
browser card + persistent "3D" tab (three.js / SVG, Z-up, XYZ axes)
_N
suffix convention of embind overloaded constructors is wrapped in
src/modeling/occt-adapter.cjs (all verified at runtime)cad_export is the only explicit file export<workspace>/.dsh-cad/model.json operation log; all bodies
are restored by replay after a restartnpm test # 41 tests: converters / modeling worker (exact volume assertions) / DCPRT round-trip / FreeCAD executor / image profiles / binary pipeline
node test/m0-kernel-check.cjs # OCCT kernel API smoke test
node test/route-check.mjs # JSON scene routing layer
node test/visual/serve.mjs # browser card/tab visual verification page (http://127.0.0.1:3987)
Representative assertions covered: the boolean-punched volume exactly equals the
analytic value (28429.20 mm³), L-shaped profile extrusion 3000 mm³, volumes and
bounding-box flips of sphere/cone/torus placed with at/axis, 8-byte alignment
of the binary packing, an STL export round-trip (export → read back by the
phase-1 parser), and a DCPRT document round-trip (serialize → replay on the
OCCT worker → exact bounds).
cad_fillet is all-edge constant-radius (per-edge selection is unstable under
embind); chamfer is not implementedAuto-generated from the commit history — thanks to everyone who has contributed!
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。