This project is a modern C++ library and application designed to generate complex, clipped 2D geometry patterns (such as honeycombs, spirals, and grids) and translate them into production-ready CNC G-code.
It utilizes the Clipper2 library for robust polygon clipping and boolean operations.
This project was done as part of the interview process for a software engineering position at Makby.
To build and run this project, you will need the following installed on your system:
- C++23 Compatible Compiler: (e.g., GCC 13+, Clang 16+, or MSVC 19.36+)
- CMake: Version 4.1 or higher.
- Clipper2 Source: The project expects the Clipper2 library source code to be located locally at
libs/Clipper2_2.0.1/CPP. Ensure this directory is present before building.
This project uses CMake for cross-platform building. It is recommended to use an out-of-source build to keep the project directory clean from generated artifacts.
- Open your terminal and navigate to the root directory of this project.
- Create a build directory and navigate into it:
mkdir build cd build - Generate the build files using CMake:
cmake ..
- Compile the project:
cmake --build .
Once compiled, the executable named ClipperPractice will be located in the build directory (or build/Debug / build/Release depending on your OS and generator).
Run the executable from the terminal:
./ClipperPractice # On Linux/Mac/PowerShell
# OR
.\Debug\ClipperPractice.exe # On Windows Command LineUpon successful execution, the program will generate the hardcoded demonstration geometry and output the resulting G-code file to:
../output/instructions.nc