CAD-Viewer is a high-performance, modern, web-based CAD editor inspired by AutoCAD. It enables users to view and edit DWG/DXF files entirely in the browser without requiring any backend server, providing exceptional rendering speed and smooth interactions. The project is modular and designed for seamless integration with other applications.
- High-performance viewing of large DWG/DXF files with smooth 60+ FPS rendering
- No backend required - Files are parsed and processed entirely in the browser
- Enhanced data security - Files never leave your device, ensuring complete privacy
- Easy integration - No server setup or backend infrastructure needed
- Modular architecture for seamless third-party integration
- Offline and online editing workflows
- THREE.js 3D rendering engines with advanced optimization techniques
- Designed for extensibility and integration with platforms like CMS, Notion, and WeChat
- Select: Left-click on entities
- Zoom in/out: Scroll mouse wheel up/down
- Pan: Hold middle mouse button and drag
- Select: Tap on entities
- Zoom: Pinch with two fingers
- Pan: Single-finger drag
CAD-Viewer is engineered for exceptional performance and can handle very large DXF/DWG files while maintaining high frame rates. It employs multiple advanced rendering technologies to optimize performance:
- Custom Shader Materials: Uses GPU-accelerated shader materials to render complex line types and hatch fill patterns efficiently
- Geometry Batching: Merges points, lines, and areas with the same material to dramatically reduce draw calls
- Instanced Rendering: Optimizes rendering of repeated geometries through instancing techniques
- Buffer Geometry Optimization: Efficient memory management and geometry merging for reduced GPU overhead
- Material Caching: Reuses materials across similar entities to minimize state changes
- WebGL Optimization: Leverages modern WebGL features for hardware-accelerated rendering
These optimizations enable CAD-Viewer to smoothly render complex CAD drawings with thousands of entities while maintaining responsive user interactions.
CAD-Viewer has some known limitations that users should be aware of:
- Unsupported Entities:
- Tables (DWG files only): Table entities are not currently supported in DWG files because LibreDWG is used to read DWG files and it doesn't support table entity yet. If one table is created by line and polyline entities, definitely it is supported.
- XRefs: External references (XRefs) are not supported and will not be displayed.
- DWG File Compatibility: Some DWG drawings may fail to open due to bugs in the underlying LibreDWG library. This is a known limitation of the current DWG parsing implementation. If you find those issues, please log one issue on CAD-Viewer issues page or LibreDWG issues page.
These issues are being tracked and will be addressed in future releases.
The goal of this project is to create a full-featured 2D AutoCAD-like system in the browser (viewer + editor), with modular architecture and framework-agnostic integration.
Legend:
- Completed
- Planned
- ⏳ In progress
- DXF loading
- DWG loading (via RealDWG / compatible backend)
- Large file streaming / incremental loading
- ⏳ File version compatibility (R12–Latest)
- Unified entity data model
- Layer table support
- Block / insert structure
- ⏳ Handle & object ID management: currently objectId is same as handle and represented as one string instead of bigint (int64).
- XData / extension dictionary support
- Proxy entity handling
- WebGL-based rendering (Three.js)
- 2D-only optimized pipeline
- Layer-based scene organization
- Layout / paper space rendering
- Viewport entity support
- Geometry merging & batching
- Spatial indexing (basic)
- Advanced spatial index (R-tree / BVH)
- Level-of-detail (LOD) rendering
- Multi-canvas / tiled rendering for very large drawings
- Pan
- Zoom (wheel / box zoom)
- Fit to view / extents
- Named views
- View history (undo / redo view changes)
- Layer visibility on/off
- Layer freeze / lock
- Lineweight display
- Linetype scaling
- ⏳ Background / theme switching
- Single entity selection
- Highlight selected entities
- Window selection
- Crossing selection
- Selection filters (by type / layer)
- Selection cycling
- ⏳ Endpoint: Now working for INSERT entity yet.
- Midpoint
- Center
- Intersection
- Perpendicular / tangent
- ⏳ Nearest
- Snap tracking
- Entity editing framework
- Move
- Copy
- Rotate
- Scale
- Delete
- Undo / redo
- Grip points
- Stretch
- Trim
- Extend
- Offset
- Explode
- Join / fillet / chamfer (2D)
- Line
- Polyline
- Circle
- Arc
- Ellipse
- Rectangle / polygon
- Hatch
- Text (single-line / multi-line)
- Dimensions (linear, aligned, angular)
- Blocks creation & insertion
- ⏳ Distance measurement & dimension
- Area measurement & dimension
- Angle measurement & dimension
- Coordinate readout
- Entity statistics (length, area, count)
- Selected entity properties
- Layer, color, linetype editing
- Live update on change
- Layer manager
- Block manager
- Command history / console
- ⏳ Status bar (snap, ortho, grid)
- Command registry
- Command aliases
- Keyboard-driven workflow
- Command prompts (AutoCAD-style)
- Framework-agnostic core
- React integration example
- Vue integration example
- OpenLayers / Map integration
- CMS / Notion embedding
- Plugin API
- Custom entity support
- Custom command injection
- Local editing in browser
- Save to DXF
- Save change set / diff
- IndexedDB persistence
- Backend API design
- User authentication
- File versioning
- Multi-user access control
- Real-time collaboration (future)
- ⏳ Google Drive Integration
- WeChat Mini Program viewer
- Mobile browser support (read-only)
- Architecture documentation
- API reference
- Contribution guide
- Example projects
- Roadmap & changelog maintenance
This roadmap is intentionally granular so contributors can clearly see what exists, what is missing, and where help is needed.
Contributions are welcome! Please open issues or pull requests for bug fixes, new features, or suggestions. For bug reports, providing a link to the problematic drawing will help in reproducing and fixing the issue.
