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

orb.Polygon intersection example #1

Open
missinglink opened this issue Sep 15, 2021 · 0 comments
Open

orb.Polygon intersection example #1

missinglink opened this issue Sep 15, 2021 · 0 comments

Comments

@missinglink
Copy link

missinglink commented Sep 15, 2021

Heya, your lib looks great but I'm struggling to figure out how to use it...

I have two orb.Polygon geometries which I'd like to generate the intersection of.
Do you possibly have an example of how I can achieve this using your lib?

From the code it looks like I can convert each orb.Loop to a martinez_rueda.Contour and then construct a martinez_rueda.Polygon which I can use with martinez_rueda.Compute() to generate the intersection and then reverse the process to convert back to an orb.Polygon?

Are there any gotchas I should be aware of such as whether the orb.Point values in the martinez_rueda.Contour should be closed (ie the first point should/should not be repeated as the last point) and whether winding order is important?

Thanks!

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

No branches or pull requests

1 participant