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

Incorrect (unsupported?) triangulation for holes not completely inside polygon #17

Closed
GoogleCodeExporter opened this issue Oct 24, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Triangulate a simple triangle with a rectangle hole.
The triangle is defined as follows: (384, 640), (256, 512), (384, 512).
The hole: (280, 525), (400, 525), (400, 535), (280, 535).

What is the expected output? What do you see instead?
I expected 5 triangles with all edges (or the part that is inside the polyline) 
of the hole used as constraints. Instead I receive 5 triangles that ignore some 
of the hole edges. 
Is this simply not supported? Does poly2Tri require holes to be completely 
inside the polyline?

What version of the product are you using? On what operating system?
I'm sorry but I can't find the version number in the source code..

Please provide any additional information below.


Original issue reported on code.google.com by hisaoki....@gmail.com on 6 Jan 2011 at 9:20

@GoogleCodeExporter
Copy link
Author

Poly2Tri does not support intersection. If you have holes or self intersecting 
polygons you will need to need to perform some boolean operations on them first 
with a clipping library.

http://en.wikipedia.org/wiki/Boolean_operations_on_polygons

Original comment by thahlen@gmail.com on 6 Jan 2011 at 11:31

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

Correction: holes that intersect the polygon edge

Original comment by thahlen@gmail.com on 6 Jan 2011 at 11:33

@GoogleCodeExporter
Copy link
Author

Thanks for responding so quickly. I'll look into using boolean operations 
first..

Original comment by hisaoki....@gmail.com on 6 Jan 2011 at 11:39

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

1 participant