EzyCad (Easy CAD) is a CAD application for hobbyist machinists to design and edit 2D and 3D models for machining projects. It supports creating precise parts with tools for sketching, extruding, and applying geometric operations, using OpenGL, ImGui, and Open CASCADE Technology (OCCT). Export models to formats like STEP or STL for CNC machines or 3D printers, and try it in your browser with the WebAssembly version.
Try EzyCad in your browser! (WebAssembly version)
- 2D and 3D modeling capabilities.
- Integration with Open CASCADE for geometric operations.
- Cross-platform support with Emscripten for WebAssembly builds.
- Interactive GUI built with ImGui.
See usage.md in the repository for a detailed guide on using EzyCad. It covers the user interface, modeling tools (e.g., sketching, extrusions, Boolean operations), keyboard shortcuts, and view controls. Example workflows, such as creating 2D sketches and 3D shapes, are included to help you get started.
Ensure the following dependencies are installed:
- CMake (minimum version 3.14.0)
- Nuget command line utility
- A C++ 20 compatible compiler (e.g., MSVC, GCC, or Clang)
- OpenGL development libraries
- Open CASCADE Technology (OCCT 7.9.1) https://github.com/Open-Cascade-SAS/OCCT
- See: https://dev.opencascade.org/doc/overview/html/build_upgrade__building_occt.html
- OCCT 3rd-party binaries: https://github.com/Open-Cascade-SAS/OCCT/releases/download/V7_9_1/3rdparty-vc14-64.zip
- Currently building EzyCad has only been tested with the Release build of OCCT.
- Or download pre-built binaries: https://github.com/Open-Cascade-SAS/OCCT/releases/tag/V7_9_1
- Clone the repository.
- Create a build directory, e.g.,
C:\src\EzyCad_build. - Configure the project in the build directory using CMake:
- E.g.,
cmake C:\src\EzyCad -DOpenCASCADE_DIR=C:\bin\OCCT-7_9_1_install\cmake -DOCCT_3RD_PARTY_DIR=C:\bin\3rdparty-vc14-64 OCCT_3RD_PARTY_DIRshould point to the OCCT 3rd-party distribution.- CMake will use
nugetto download additional dependencies.
- E.g.,
- Build the project.
- Ensure
nugetis installed for fetching dependencies like GLFW, GLEW, and Boost. - Use Visual Studio as the IDE for debugging and building.
- Install Emscripten and activate its environment.
- Build FreeType (2.10.1) for Emscripten using the instructions: https://stackoverflow.com/questions/61049517/build-latest-freetype-with-emscripten
- Add exception support:
emcmake cmake .. -DCMAKE_CXX_FLAGS="-fexceptions" -DCMAKE_EXE_LINKER_FLAGS="-fexceptions" -DCMAKE_INSTALL_PREFIX=c:/src/freetype-2.10.1_em_install -DCMAKE_POLICY_VERSION_MINIMUM=3.5
- Add exception support:
- Build OCCT (7.9.0) for Emscripten using the instructions: https://github.com/mathysyon/wasm-occ-demo
- Add exception support:
- CMAKE_CXX_FLAGS -fexceptions
- CMAKE_EXE_LINKER_FLAGS -fexceptions
- Add exception support:
- Configure the EzyCad project with Emscripten:
mkdir build_ememcmake cmake .. -DOpenCASCADE_DIR=C:\src\OCCT-7_9_0_em_install\lib\cmake\opencascade- If you have Ninja:
- Debug:
emcmake cmake .. -G Ninja -DOpenCASCADE_DIR=C:\src\OCCT-7_9_0_em_install\lib\cmake\opencascade -DCMAKE_BUILD_TYPE=Debugninja- Approximately 50MB
EzyCad.wasmfile.
- Release:
emcmake cmake .. -G Ninja -DOpenCASCADE_DIR=C:\src\OCCT-7_9_0_em_install\lib\cmake\opencascade -DCMAKE_BUILD_TYPE=Releaseninja- Approximately 19MB
EzyCad.wasmfile.
- Debug:
- Build the project.
- Serve the WebAssembly:
python.exe -m http.server 8000 - Or build and serve:
ninja && python.exe -m http.server 8000 - ImGui in
third_partyhas been modified as explained in: ocornut/imgui#7519 (comment) to improve font rendering.
- Icons from: https://wiki.freecad.org/Artwork
- Report issues or suggest features on the GitHub repository.
- Contribute by developing features and fixing bugs. Pull requests are welcome!
- Additional resources, including video tutorials and online documentation, are linked in usage.md.