Skip to content

zeemarquez/3dcad

Repository files navigation

🧊 3dcad

Browser-based parametric 3D CAD in the vein of desktop modelers — parts, a feature tree, and a live Three.js viewport — powered by Open CASCADE via replicad and opencascade.js.

3dcad — part viewport with feature tree

🛠️ Features

  • Part workflow — Parametric feature tree (sketches, reference geometry, solids) with a Features / Geometry sidebar; hide/show body pieces; rename, enable/disable, and edit features from the tree.
  • 2D sketching — Lines, polylines, B-splines, circles, arcs, rectangles; constraints (coincident, horizontal/vertical, parallel, perpendicular, tangent, symmetry, and more); dimensions (length, distances, radius, angle); construction (“auxiliary”) curves; sketch undo/redo.
  • SolidsExtrude, cut, revolve, revolve cut, fillet, and chamfer with viewport picking for planes, edges, axes, and points where needed.
  • Reference geometry — User planes, points, and axes for sketches and operations.
  • Parameters — Global and dimension-driven values for driving the model.
  • 3D viewport — Shaded bodies with orbit controls, XYZ gizmo, optional grid, orthographic / perspective, and standard views (front, back, left, right, top, bottom, isometric).
  • Drawing sheetsA4 landscape 2D drawings: link a part; ortho and iso views (orientation, integer scale, preview, drag; secondaries align to the primary). H/V linear dimensions (points, edges, Shift + parallel edges); Delete / Backspace / Escape for dims. View sidebar: scale and delete view. Title block + field sidebar; grid, zoom, pan (scroll, middle-drag, Ctrl+scroll). PDF, DWG, SVG.
  • DocumentsHome: recent parts (thumbnails) and drawings; New Part / New Drawing; rename, Save As, .par / .drw, duplicate; parts: STEP & STL export.
  • Local historyCommit snapshots with messages and a History list to inspect and restore earlier states (browser-local, not a remote Git server).

✨ Stack

  • React 19 + TypeScript + Vite
  • @react-three/fiber / drei + Three.js for the viewport
  • replicad + replicad-opencascadejs for B-rep / solid modeling
  • Zustand for state · Tailwind CSS for UI

🚀 Quick start

npm install
npm run dev

Then open the URL Vite prints (usually http://localhost:5173).

Command Action
npm run dev Dev server + HMR
npm run build Typecheck + production build
npm run preview Serve dist locally
npm run lint ESLint

📚 Documentation

📁 Notes

  • assemble2d is pulled from GitHub (tab58/assemble2d); ensure network access on first install.
  • This is a private app ("private": true in package.json).

Screenshots

3dcad — part viewport with feature tree

3dcad — part viewport with feature tree

Built with ⚡ Vite

About

Modern open-source parametric browser based CAD program

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages