Boolean operations on polygons
This is a fairly straightforward port of the polybooljs library to the C# programming language. As much of the design flavor of the original library has been kept as possible, and changes have been kept primarily to those that were necessary to get the library to compile in C#. All original source code comments have been retained, and the usage of the library's public API is nearly identical to the original.
- Performs all boolean operations on polygons (union, intersection, difference, xor)
- Explicit support for handling segments and points that are coincident
- Handles any number of subject polygons and any number of clip polygons
- Places no restrictions on input polygon type (can be strictly simple, weakly simple, self-intersecting, etc)
- Provides an API for constructing efficient sequences of operations
- Inspired by the F. Martinez (2008) algorithm:
- View the polybooljs GitHub repo and documentation
- View the polybooljs companion tutorial
Does not include any sort of visualization or demo, unlike polybooljs. It does include a few limited unit tests, but those are restricted to verifying that the output exactly matches the output of polybooljs when using the polybooljs demo data as input, and does not attempt to verify correctness any further than that. This port was done as an intellectual exercise rather than for actual production usage, and it is unlikely that there will be any further development or bugfixes other than perhaps incorporating future bug fixes from polybooljs as time permits (if any should be posted).