Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Reduce-like interface to polyclip() #6

Open
thomasp85 opened this issue Mar 12, 2018 · 1 comment
Open

A Reduce-like interface to polyclip() #6

thomasp85 opened this issue Mar 12, 2018 · 1 comment
Assignees

Comments

@thomasp85
Copy link

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

@baddstats baddstats self-assigned this Apr 28, 2018
@baddstats
Copy link
Owner

I am now working on this. Sorry for delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants