Skip to content
CHMOSE023Public

About

MiniCAD: An open-source 2D/3D CAD for Windows and WebAssembly, powered by NVIDIA SMLib.

Topics

Resources

Stars

135 stars

Watchers

0 watching

Forks

Repository files navigation

English | 简体中文

MiniCAD

MiniCAD

An open-source 2D/3D CAD application written in C++20.
Runs on Windows, Linux, Android and in the browser. Built on the SMLib solid kernel, with node-based 3D modeling, compatible with DWG and TCH drawings.

Web app · Desktop downloads · Android

CI Latest release Downloads Licence QQ Group Stars

MiniCAD

The interface is available in English and Simplified Chinese: choose it under Settings (the gear at the top right) > Language, or start with --lang en. By default it follows the system language.

Building on Windows

Requires CMake 3.20+, Ninja and Visual Studio (MSVC, C++20).

cmake --preset debug
cmake --build --preset debug
out\debug\MiniCADWin\MiniCADWin.exe

Run the commands above in any of these environments:

  • "Developer Command Prompt for VS"

  • PowerShell with the VS developer environment: cmd /k """C:\Program Files\Microsoft Visual Studio\18\Community\Common7\Tools\VsDevCmd.bat"" -arch=x64 -host_arch=x64"

  • PowerShell with the x64 build environment: cmd /k """C:\Program Files\Microsoft Visual Studio\18\Community\VC\Auxiliary\Build\vcvars64.bat"""

Use the release preset for release builds.

Building the web version

Requires the Emscripten SDK (expected at D:\dev\emsdk). The build script is build_wasm.bat:

build_wasm.bat serve

Output goes to out/build/wasm/MiniCADWeb/. With serve, a local server starts automatically at http://localhost:8080/MiniCADWeb.

The web version uses the browser's WebGPU by default and falls back to WebGL2 when WebGPU is not available; add ?webgl to the URL to force WebGL2. On the first build Emscripten downloads the WebGPU bindings (the emdawnwebgpu port) from GitHub, so an internet connection is required.

Building on Linux

The releases page has a prebuilt MiniCAD-<version>-linux-x64.tar.gz (built on Ubuntu 24.04): extract it and run ./MiniCADLinux. It needs Mesa's EGL / OpenGL ES and the Vulkan loader (libegl1, libgles2, libvulkan1 on Ubuntu); the X11, Wayland, xkbcommon and D-Bus runtime libraries come with every desktop system. To build it yourself:

Requires CMake 3.20+, Ninja, GCC 13+ or Clang (C++20), the OpenGL ES 3 / EGL development packages and the X11 and/or Wayland development packages. On Ubuntu / Debian:

sudo apt install build-essential cmake ninja-build pkg-config libegl-dev libgles-dev \
    libx11-dev libxcursor-dev libxext-dev libxkbcommon-dev libwayland-dev wayland-protocols libdbus-1-dev

The Vulkan backend (optional; preferred by default, with automatic fallback to OpenGL ES 3) also needs the headers and the shader compiler:

sudo apt install libvulkan-dev glslang-tools mesa-vulkan-drivers

Build MiniCAD:

cmake -S . -B out/linux -G Ninja -DCMAKE_BUILD_TYPE=Release
cmake --build out/linux
out/linux/MiniCADLinux/MiniCADLinux [drawing ...]

Without OpenGL ES 3 / EGL, or with neither the X11 nor the Wayland development packages, only the core libraries and tests are built (ctest --test-dir out/linux); with only one of them only that window system is supported; without the Vulkan development files or glslangValidator only OpenGL ES 3 is used. At run time Wayland is used when WAYLAND_DISPLAY is set, X11 otherwise; MINICAD_WINDOWING=x11 / wayland forces one. --gpu vulkan / --gpu gl (or the MINICAD_GPU environment variable) selects the graphics backend. The title bar is drawn by MiniCAD (on X11, and on Wayland compositors that do not provide decorations, such as GNOME); set MINICAD_X11_DECORATIONS=system to get the window manager's title bar on X11. The open / save dialogs use xdg-desktop-portal, or zenity without it; without either, drag drawings into the window or pass them on the command line.

Android

The releases page has a prebuilt MiniCAD-<version>-android-arm64.apk for arm64 devices running Android 10 (API 29) or later; download and install it (allow "Install unknown apps"). Phones get a simplified view-only interface: open DWG / DXF drawings (from Files or another app), drag to pan, zoom, and view full screen; annotations will come later. Tablets and devices with a mouse and keyboard get the full interface.

To build it yourself you need JDK 17+ (21 recommended) and these Android SDK packages (install them with Android Studio's SDK Manager or the command-line tools' sdkmanager): Platform API 36, Build-Tools 36.1.0, NDK 29.0.14206865, CMake 3.31.6. Set the ANDROID_HOME environment variable (or write sdk.dir=<SDK path> in apps/Android/local.properties), then:

cd apps\Android
gradlew assembleDebug

The APK is written to out/android/app/outputs/apk/debug/ (debug builds also include x86_64 for the emulator). gradlew installDebug builds and installs it on a connected device (enable USB debugging on the phone); view the log with adb logcat -s MiniCAD. For a release build run gradlew assembleRelease (arm64 only); point the MINICAD_KEYSTORE, MINICAD_KEYSTORE_PASSWORD, MINICAD_KEY_ALIAS and MINICAD_KEY_PASSWORD environment variables at your keystore, otherwise the local debug key is used.

Tests

run_tests.bat

Third-party components

Tutorial

LearnMiniCAD: learn how to build a CAD application (in Chinese).

Acknowledgements

3D features are under active development and releases come quickly; we hope to reach a stable state soon, and may also add rendering and animation. Contributions are welcome.

Thanks to everyone who has contributed to MiniCAD.

@七只蜗牛 @wkslgjx

License

MIT © 2026 CHMOSE023

About

MiniCAD: An open-source 2D/3D CAD for Windows and WebAssembly, powered by NVIDIA SMLib.

Topics

Resources

Stars

135 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages