kareemaismail / poly2tri

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

Incorrect triangulation of complex union #78

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
    Run "p2t base.dat 2500 2000 0.15
    (base.dat is attached)

What is the expected output? What do you see instead?
    I expected a correct triangulation of the provided contour.  Instead, I see a triangulation
    with extra points and triangles extending out of the model outline (see attached image).

What version of the product are you using? On what operating system?
    changeset:   199:26242d0aa7b8
    Mac OS X 10.6

Please provide any additional information below.
    I don't think this is a precision issue -- none of the point deltas are below a part in 1e-12.
    The polygon is produced from a Clipper union operation.

Original issue reported on code.google.com by matt.j.k...@gmail.com on 2 Jul 2013 at 3:45

Attachments:

GoogleCodeExporter commented 9 years ago
You can get that result when the triangulation fails before the mesh clean that 
removes triangles outside the polygon.

You point set is invalid since it contains duplicate points. Eg. the point 2174 
1026 exist twice so your polygon in probably self touching and not simple. I 
guess these things can happen when you play around with low resolution points.

One way to test your points can be to paste in here: 
http://javascript.poly2tri.googlecode.com/hg/index.html

Might give a clue to why it failes.

Original comment by thahlen@gmail.com on 4 Jul 2013 at 2:08

GoogleCodeExporter commented 9 years ago

Original comment by thahlen@gmail.com on 4 Jul 2013 at 6:03