The Clipper library performs clipping and offsetting for both lines and polygons. All four boolean clipping operations are supported - intersection, union, difference and exclusive-or. Polygons can be of any shape including self-intersecting polygons.
- Line and polygon clipping - intersection, union, difference & xor
- Line and polygon offsetting with 3 types of joining - miter, square and round
- Polygons can be of any shape, including self-intersecting polygons
- Minkowski Addition and Minkowski Difference functions included
- The library is written in Delphi, C++, C# and Python
- Comprehensive documentation
- Demos use AGG, Cairo, OpenGL, GDI+ & Graphics32 graphics libraries
- The library is significantly faster than commercial alternatives
- Third-party modules for Perl, Ruby and Python languages
Great, it works great and is very fast !!!
Very nice. After playing with CGAL and boost geometry for my application (a 3D print screw generator github hzeller/gcode-multi-shell-extrude ) that needs polygon offsetting, I settled with Clipper. Clipper is simple to use and does the job very nicely. The aforementioned libraries are very complicated (they over-use the C++ templating system; it is hard to figure out how to get back your data), add significant dependencies, and had trouble in corner-cases (negative offsets). With Clipper, the implementation was as simple as it gets (copy my Polygon content into ClipperLib::Path, offset, copy Path back to Polygon), and corner-cases (negative offsets!) work just fine.
We are using this library in our internal C# program and it's working very nicely. Relatively straightforward. decent, if not copious documentation. Pretty much everything I could ask for.
there is a bug on union adjacent polygon.
Exellent Clipper. It will be perfect if the "touching " polygon can be clipped to strictly simplepolygon