Polygon clipping library (clipper 6.4.2)
This project is a translation to typescript of the excellent polygon clipping library by Angus Johnson.
I used the C# code as a basis of the translation. I used version 6.4.2 from http://www.angusj.com. The original code was released under the boost V1 license, this port carries the same license. I claim copyright for the translation.
The input and output for the sample programs are .WLR files. I added a few sample files in the test folder. WLR file is ASCII test with the following format:
- Line 1 contains the number "1"
- Line 2 contains number of polygons
- For each polygon the next line contains number of point in the polygon, followed by each point on a single line X coordinate then comma, then the Y coordinate
The output would be written as WLR file as well as SVG file. I also wrote a tool to diff WLR files diffwlr.ts and a simple web page to load WLR files and compare them visually (html/polydiff.html and polydiff.ts).