The future of Clipper development is now here.
The bad news: As of now I’m retiring from Clipper2 development. While this Clipper2 repository will remain, it will not be updated. So please don't post new Issues or Pull Requests here.
The good news: I’m delighted to announce that Seth Hillibrand has agreed to take over Clipper maintenance and development, and this will continue at the link above.
The long version:
Software development has been a wonderful hobby of mine for almost 50 years. I started Clipper more than 15 years ago, and it has been 15 years of fun and challenge. But over the last few months I’ve come to realise that the challenge has gone, and it has just become a responsibility.
So I’m passing the baton. And I’m delighted to announce Seth Hillibrand has agreed to pick it up and will be taking over Clipper’s ongoing maintenance and development. Seth is the founder and lead developer of KiCad Services, and has used Clipper almost from the beginning. I’m extremely confident that he has the skills and temperament to see Clipper continue to improve. But Clipper will, however, become a C++ only library; it will be up to third parties to translate Clipper into other languages, or to use it as a dynamic linked library.
Transitioning to the new Clipper2 repository:
I suggest that those who have contributed Pull Requests do so again here.
And I suggest that those who have raised Issues also resubmit them here or, even better, consider converting them into Pull Requests if you are able to do the debugging.
Finally, as I said above, creating and developing Clipper has been a lot of fun. I have learned so much from you, the library’s users, and from your code contributions. And that has been enormously encouraging. Thank you.
A Polygon Clipping, Offsetting library (in C++, C# & Delphi)
The Clipper2 library performs intersection, union, difference and XOR boolean operations on both simple and complex polygons. It also performs polygon offsetting. This is a major update of my original Clipper library that was written about 15 years ago. That library I'm now calling Clipper1, and while it still works very well, Clipper2 is just better.
Clipper2 can be compiled using any one of three supported programming languages: C++, or C#, or Delphi Pascal. The library can also be accessed from other languages by dynamically linking to exported functions in the C++ compiled Clipper2 library. (The C++ compiled code is measurably faster so, where performance is critical, even C# and Delphi developers may prefer this approach in application development.)
| Lang. | Requirements |
|---|---|
| C++: | Requires C++17, or |
| C#: | The library uses Standard Library 2.0 but the sample code uses .NET6, or |
| Delphi: | Compiles with any version of Delphi from version 7 to current. |
Clipping
C++
Clipper2/CPP/Examples/SimpleClipping/SimpleClipping.cpp
Lines 29 to 34 in fa7add7
C#
Clipper2/CSharp/Clipper2Lib.Examples/ConsoleDemo/Main.cs
Lines 112 to 116 in fa7add7
Delphi
Clipper2/Delphi/Examples/Example1/Example1.dpr
Lines 21 to 26 in fa7add7
Inflating (aka Offsetting)
C++
Clipper2/CPP/Examples/Inflate/Inflate.cpp
Lines 36 to 47 in fa7add7
C#
Clipper2/CSharp/Clipper2Lib.Examples/InflateDemo/Main.cs
Lines 89 to 100 in fa7add7
Delphi
Clipper2/Delphi/Examples/Example2/Example2.dpr
Lines 20 to 31 in fa7add7