QCAD is a professional-grade, open-source 2D computer-aided design (CAD) application designed for engineers, architects, and hobbyists who need precise technical drawing capabilities without proprietary software constraints. Built in C++ using the Qt framework, it provides a stable and extensible platform for creating detailed 2D drawings with support for industry-standard DXF formats and optional DWG compatibility via a proprietary plugin. First released in 1999, QCAD has evolved into a mature tool trusted for its accuracy and cross-platform reliability on Windows, macOS, and Linux.
Its modular architecture allows users to extend functionality through C++ plugins or ECMAScript/JavaScript scripting, making it suitable for both end-users and developers looking to automate workflows or integrate CAD capabilities into custom applications. QCAD is released under the GPLv3 license, ensuring freedom to use, modify, and distribute the software while encouraging community contributions.
What You Get
- DXF format support - Full read/write capability for AutoCAD DXF files (R12 to 2018), enabling seamless interoperability with other CAD tools and workflows.
- Optional DWG support - Read and write DWG files via a proprietary plugin (not included by default), allowing users to work with AutoCAD-native files without switching platforms.
- Scripting extension via ECMAScript/JavaScript - Automate tasks, create custom tools, or build plugins using a full-featured scripting interface with access to the entire QCAD API.
- Cross-platform compatibility - Native applications for Windows, macOS, and Linux with consistent UI and functionality across all operating systems.
- Extensible plugin system - Develop C++ plugins to add new tools, modify behaviors, or integrate with external systems using the documented plugin interface.
Common Use Cases
- Building technical blueprints for manufacturing - Engineers creating precise mechanical part diagrams with dimensioning, layers, and annotations exported as DXF for CNC machining.
- Architectural floor plans with layer management - Designers drafting residential or commercial layouts using layers for walls, electrical, plumbing, and annotations, exported to DXF for client review.
- Problem: Need to automate repetitive drawing tasks → Solution: Use JavaScript scripting - A user writes a script to auto-generate 100 identical component layouts by looping through coordinates and applying standard dimensions via the QCAD scripting API.
- DevOps teams managing CAD asset pipelines - Teams using QCAD in containerized environments to validate or convert DXF files as part of automated design validation workflows.
Under The Hood
QCAD is a desktop CAD application that combines native C++ performance with JavaScript-based extensibility, offering a flexible and modular approach to computer-aided design. The system is built with a layered architecture that separates core logic from UI and scripting layers, enabling a high degree of customization and component-based development.
Architecture
QCAD adopts a layered and modular architecture to support its CAD functionality and extensibility.
- The system uses a layered design where core logic, geometry handling, and rendering are distinctly separated from UI and scripting components.
- Modules are organized by functionality such as drawing tools, file handling, and preferences, with reusable components that encapsulate specific behaviors.
- Design patterns like strategy and factory are applied to manage dynamic drawing tools and geometric operations based on user input.
- Components interact through well-defined interfaces to support modular extensions without tight coupling between subsystems.
Tech Stack
The project is built primarily in C++ with JavaScript support for scripting and customization.
- The core is implemented in C++, leveraging a rich ecosystem of libraries for geometric and graphical processing.
- JavaScript integration enables dynamic tool creation and automation without requiring recompilation of the main application.
- Build systems rely on CMake and QMake, indicating a traditional desktop application development workflow.
- Testing includes JavaScript-based validation mechanisms for script execution and entity handling.
Code Quality
The codebase reflects a mixed quality profile with strengths in structure but gaps in testing and consistency.
- The code organization shows some structured practices, particularly in component-based development and API design.
- Error handling is present but not consistently applied across all modules, leading to potential maintainability challenges.
- Type annotations and documentation are evident, contributing to code clarity and developer understanding.
- Test coverage is limited, which impacts confidence in code changes and long-term maintainability.
What Makes It Unique
QCAD stands out in the CAD space through its hybrid architecture and extensibility features.
- The application provides a modular scripting framework that allows developers to extend functionality dynamically via JavaScript without recompilation.
- It supports cross-language entity handling, integrating multiple CAD formats with a JavaScript-based drawing engine for flexible workflows.
- Default libraries and templates are structured using metadata-driven approaches, enabling rich, extensible symbol and component systems.
- Preference and UI components are built with modularity in mind, allowing granular customization of user interfaces without deep code modifications.