A comprehensive, cross-platform 2D CAD application. Built with modern technologies for performance, extensibility, and ease of use.
Open 2D Studio is a free, open-source 2D CAD (Computer-Aided Design) application that provides professional-grade drawing tools for technical drawings, floor plans, mechanical designs, and more. It aims to be a lightweight, fast alternative to commercial CAD software.
- Drawing Tools: Line, Rectangle, Circle, Arc, Polyline, Ellipse, Text
- Precision Tools: Snap to grid, object snaps (endpoint, midpoint, center, intersection)
- Layer Management: Multiple layers with visibility, lock, and color controls
- Pan & Zoom: Smooth navigation with mouse wheel zoom and middle-button pan
- Selection: Click, box selection, shift-click to add to selection
- Properties Panel: Edit stroke color, width, and line style
- Command Line: CAD-style command input
- File Support: Native JSON format, DXF import/export (via Rust backend)
- Cross-Platform: Runs on Windows, Linux, and macOS
| Technology | Purpose | Why We Chose It |
|---|---|---|
| Tauri 2.0 | Application framework | ~10MB app size, ~30MB RAM usage, native performance |
| React 18 | UI framework | Component-based architecture, huge ecosystem, TypeScript support |
| TypeScript | Language | Type safety, better tooling, catch bugs at compile time |
| Canvas 2D | Rendering | Fast 2D rendering, simple API, handles 10k+ elements smoothly |
| Zustand | State management | Lightweight, simple API, works great with React |
| TailwindCSS | Styling | Rapid UI development, consistent design system |
| Rust | Backend (Tauri) | Memory safety, native performance for file I/O and geometry |
| dxf-rs | DXF support | Native Rust library for reading/writing DXF files |
┌─────────────────────────────────────────────────────────┐
│ Tauri (Rust Shell) │
│ - Native window management │
│ - File system access │
│ - DXF import/export via dxf-rs │
├─────────────────────────────────────────────────────────┤
│ React + TypeScript │
│ - Component-based UI │
│ - Zustand state management │
│ - TailwindCSS styling │
├─────────────────────────────────────────────────────────┤
│ CAD Engine │
│ - Canvas 2D rendering │
│ - Shape primitives & geometry math │
│ - Selection & hit testing │
│ - Snap system │
└─────────────────────────────────────────────────────────┘
- Node.js 18+
- Rust 1.70+ (for Tauri backend)
- npm or pnpm
-
Clone the repository:
git clone https://github.com/your-username/open-2D-studio.git cd open-2D-studio -
Install dependencies:
npm install
-
Run in development mode:
# Frontend only (without Tauri) npm run dev # Full application with Tauri (requires Rust) npm run tauri dev
-
Build for production:
npm run tauri build
| Shortcut | Action |
|---|---|
V |
Select tool |
H |
Pan tool |
L |
Line tool |
R |
Rectangle tool |
C |
Circle tool |
Delete |
Delete selected |
Ctrl+A |
Select all |
Ctrl+D |
Deselect all |
Ctrl+Z |
Undo |
Ctrl+Y |
Redo |
G |
Toggle grid |
S |
Toggle snap |
+ / - |
Zoom in/out |
F |
Zoom to fit |
- Select a drawing tool from the toolbar or press its shortcut
- Click to start drawing
- Drag to define the shape
- Release to complete
- Zoom: Mouse wheel (zooms toward cursor)
- Pan: Middle mouse button drag, or select Pan tool (H)
open-2D-studio/
├── src/ # Frontend source code
│ ├── components/ # React components
│ │ ├── Canvas/ # Drawing canvas
│ │ ├── Toolbar/ # Top toolbar
│ │ ├── ToolPalette/ # Left tool palette
│ │ ├── Panels/ # Properties & Layers panels
│ │ ├── StatusBar/ # Bottom status bar
│ │ └── CommandLine/ # Command input
│ ├── engine/ # CAD engine
│ │ └── renderer/ # Canvas rendering
│ ├── hooks/ # React hooks
│ ├── state/ # Zustand store
│ ├── types/ # TypeScript types
│ └── styles/ # Global styles
├── src-tauri/ # Rust backend
│ └── src/
│ ├── main.rs # Tauri entry
│ └── commands/ # File I/O commands
├── public/ # Static assets
└── package.json
- Project setup (Tauri + React + TypeScript)
- Basic application layout
- Canvas rendering with pan/zoom
- Grid system
- Basic shapes (Line, Rectangle, Circle)
- Undo/Redo system
- More drawing tools (Arc, Polyline, Spline, Text)
- Object snaps (endpoint, midpoint, intersection)
- Box selection
- Dimensions and annotations
- Modify tools (Trim, Extend, Fillet, Offset)
- Blocks/Symbols
- DXF import/export
- Command line interface
- Customizable keyboard shortcuts
- Settings/Preferences
- PDF export
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this project useful, please consider:
- Starring the repository
- Reporting bugs or suggesting features
- Contributing code or documentation