Thanks for reporting. Did you test the library itself? The demo is a bit complicated when using open paths (if I remember right, it doesn't support them or if supports you cannot change the order of operations boolean/offset). The JS libary itself supports open paths. You can try using as a base eg. http://jsclipper.sourceforge.net/6.4.2.2/index.html?p=open_closed.html (code: http://jsclipper.sourceforge.net/6.4.2.2/index.html?p=sources_as_text/open_closed.txt) or even simpler http://jsclipper.sourceforge.net/6.4.2.2/index.html?p=starter_offset.html...
The downside is that this integerisation lowers precision. If floats would be used throughout the library, this integerisation is not needed. I mentioned this a while ago to Angus: one cause for minor self intersections can be this integerisation.
Also float->integer and integer->float cause rounding errors. It is safe to make comparisons using floating point coordinates inside Clipper because bigger float is bigger float the same way bigger integer is bigger integer.
Performance increase is amazing! What is the main reason for the increase?
I found these about Martinez. The demo seems to work nice and there are also an animation about the process: https://rawgit.com/voidqk/polybooljs/master/dist/demo.html The project is on Github MIT licensed: https://github.com/voidqk/polybooljs There is a text "Based somewhat on the F. Martinez (2008) algorithm". More explanations about the algorithm: http://syntheti.cc/article/polygon-clipping-pt2/
https://rawgit.com/voidqk/polybooljs/master/dist/demo.html https://github.com/voidqk/polybooljs "Based somewhat on the F. Martinez (2008) algorithm" http://syntheti.cc/article/polygon-clipping-pt2/
Angus, any thoughts about this? http://www.cs.ucr.edu/~vbz/cs230papers/martinez_boolean.pdf