Polygon Boolean Operations Visualizer is a cross-platform desktop application for visualizing and experimenting with Boolean operations (union, intersection, difference, symmetric difference) on 2D polygons. It leverages CGAL for robust computational geometry and Qt for an interactive graphical interface.
- Multiple Boolean Operations: Union, intersection, difference, symmetric difference
- Interactive Visualization: Real-time, color-coded output
- Exact Calculations: Uses CGAL's exact geometric kernel
- Cross-Platform: Windows, macOS, Linux
- Export Capability: Save results as images or polygon data files
Video Demonstration:
- Core Logic:
src/Booleanoperations.cpp
,include/BooleanOperations.h
- GUI:
src/BooleanOperationsGUI.cpp
,include/BooleanOperationsGUI.h
- Entry Point:
src/main.cpp
- Documentation:
docs/index.md
- Resources:
resources/images/
,resources/demovideos/
- C++ compiler with C++17 support
- CMake 3.10 or higher
- Qt 5.12 or higher
- CGAL 5.0 or higher
- GMP and MPFR libraries (required by CGAL)
- Install MSYS2 from https://www.msys2.org/
- Open MSYS2 terminal and install required packages:
pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-qt5 mingw-w64-x86_64-cgal
- Clone the repository:
git clone https://github.com/yourusername/Polygon_Boolean_Operations_Visualizer.git cd Polygon_Boolean_Operations_Visualizer
- Build the project:
mkdir build cd build cmake .. make
- Install dependencies using your package manager (e.g.,
apt
,brew
). - Follow steps 3 and 4 above.
After building, run the application:
./build/boolean_operations_gui.exe # or ./boolean_operations_gui on Linux/macOS
Unit tests are located in the tests/
directory. To run tests (after building):
ctest --output-on-failure
or run the test binary directly if available.
- Launch the application.
- Use the GUI to draw or import polygons.
- Select the desired Boolean operation.
- View results interactively and export as needed.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch
- Commit your changes
- Open a pull request
This project is licensed under the MIT License. See LICENSE for details.
Main Files:
- src/Booleanoperations.cpp
- src/BooleanOperationsGUI.cpp
- src/main.cpp
- include/BooleanOperations.h
- include/BooleanOperationsGUI.h
- docs/index.md
- resources/images/
- resources/demovideos/
Contact:
For questions or support, please open an issue on GitHub.