I often need to combine multiple shapes, e.g. following a triangulation. With the current API it is only possible to combine two polygons in one go, and I'll end up writing something like
Reduce(function(a, b) {
polyclip(a, b, op = 'union')
}, polygons)
With many polygons to merge this loop will become a bottleneck and it would be nice if polyclip exposed this api more efficiently...
One idea would be to check if B is NULL and if that is the case then just perform the clipping operation successively on the elements of A
I often need to combine multiple shapes, e.g. following a triangulation. With the current API it is only possible to combine two polygons in one go, and I'll end up writing something like
With many polygons to merge this loop will become a bottleneck and it would be nice if polyclip exposed this api more efficiently...
One idea would be to check if
BisNULLand if that is the case then just perform the clipping operation successively on the elements ofA