Skip to content

Polygon Boolean Operations Visualizer is a cross-platform C++ app for interactively visualizing Boolean operations (union, intersection, difference, symmetric difference) on 2D polygons. Built with CGAL and Qt, it’s ideal for anyone needing clear, accurate polygon set operation demos.

Notifications You must be signed in to change notification settings

Abhishek-Atole/Polygon_Boolean_Operations_Visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polygon Boolean Operations Visualizer

Build Platform License

Table of Contents


Overview

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.

Features

  • 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

Demo

Union Operation Intersection Operation Difference Operation Symmetric Difference Operation

Video Demonstration:

▶️ Watch Demo Video

Architecture

Getting Started

Prerequisites

  • 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)

Building from Source

Windows (using MSYS2/MinGW)

  1. Install MSYS2 from https://www.msys2.org/
  2. 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
  3. Clone the repository:
    git clone https://github.com/yourusername/Polygon_Boolean_Operations_Visualizer.git
    cd Polygon_Boolean_Operations_Visualizer
  4. Build the project:
    mkdir build
    cd build
    cmake ..
    make

Linux / macOS

  1. Install dependencies using your package manager (e.g., apt, brew).
  2. Follow steps 3 and 4 above.

Running

After building, run the application:

./build/boolean_operations_gui.exe   # or ./boolean_operations_gui on Linux/macOS

Testing

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.

Usage

  • Launch the application.
  • Use the GUI to draw or import polygons.
  • Select the desired Boolean operation.
  • View results interactively and export as needed.

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  • Fork the repository
  • Create a feature branch
  • Commit your changes
  • Open a pull request

License

This project is licensed under the MIT License. See LICENSE for details.

References


Main Files:

Contact:
For questions or support, please open an issue on GitHub.

About

Polygon Boolean Operations Visualizer is a cross-platform C++ app for interactively visualizing Boolean operations (union, intersection, difference, symmetric difference) on 2D polygons. Built with CGAL and Qt, it’s ideal for anyone needing clear, accurate polygon set operation demos.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published