dlannan / poly2tri

Automatically exported from code.google.com/p/poly2tri
Other
1 stars 0 forks source link

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

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
Correction: holes that intersect the polygon edge

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

GoogleCodeExporter commented 8 years ago
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