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

Triangulate_EC can't get correct result when two polygon has one common node #3

Open
GoogleCodeExporter opened this issue May 3, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Hi Ivan Fratric,

I use Triangulate_EC to triangulate polygons with hole. When the hole and outer 
polygon have common node, the result is wrong. Could you please help me to take 
a look at it?
Thanks,

Tang Laoya

PS:
data example 1:
2
4
1
 -1.191966510797976E-003  0.202231151541577     
  8.150796829630741E-003  0.186049010752862     
  2.980143192424173E-002  0.198549010752862     
  2.045866858381302E-002  0.214731151541577 
8
0      
  3.525591640424161E-002  0.213001949189431     
  4.514750408646251E-002  0.211126769678226     
  4.301140661905761E-002  0.181202914852858     
 -1.683630303167994E-002  0.185475109787668     
 -1.470020556427498E-002  0.215398964613036     
 -4.642556696250064E-003  0.215850079145971     
  1.537278144042436E-002  0.215352008559904     
  2.045866858381302E-002  0.214731151541577     


data example 2:
2
4
1
  2.980143192424157E-002 -0.198549010752862     
  8.150796829630581E-003 -0.186049010752862     
 -1.191966510798143E-003 -0.202231151541577     
  2.045866858381282E-002 -0.204731151461601
8
0       
 -4.642556696250190E-003 -0.215850079145971     
 -1.470020556427507E-002 -0.215398964613036     
 -1.683630303168007E-002 -0.185475109787668     
  4.301140661905749E-002 -0.181202914852858     
  4.514750408646243E-002 -0.211126769678226     
  3.525591640424149E-002 -0.213001949189431     
  2.045866858381282E-002 -0.204731151461601     
  1.537278144042421E-002 -0.215352008559904     


Original issue reported on code.google.com by [email protected] on 10 Nov 2012 at 7:04

@GoogleCodeExporter
Copy link
Author

Hi and sorry for the late reply. The library indeed doesn't handle such cases 
as in the context of PolyPartition, a polygon where a hole is touching the 
outer edge is considered self-intersecting. This is something that might be 
improved in the future, however I don't have any specific timeline at the 
moment.

Original comment by [email protected] on 24 Feb 2013 at 4:26

  • Added labels: Priority-Low, Type-Enhancement
  • Removed labels: Priority-Medium, Type-Defect

@GoogleCodeExporter
Copy link
Author

This feature would be very useful to me.  Not sure if this is something that 
you have an idea on how to implement (and I could potentially help with) or if 
this is simply too difficult a problem to solve.

Original comment by [email protected] on 24 Feb 2015 at 2:55

@aaronfranke
Copy link
Contributor

This is still reproducible in the latest master. Here are some updated test cases:

Test case 1: issue-3-ex1.txt, output: issue-3-ex1.zip

Test case 2: issue-3-ex2.txt, output: issue-3-ex2.zip

@ivanfratric
Copy link
Owner

FWIW I believe that polygons like this could be supported by adding a preprocessing step that would merge two polygons if they have a common node, but I never got around to implement that.

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

3 participants