This project is read-only.

Index Out of Bounds Exception

Dec 4, 2013 at 6:37 PM
Hello,

When I try to create a quality mesh of the following .poly file, I get an Index Out of Bounds exception from Enqueue(BadTriangle badtri). Can you provide me with any guidance?

Thank you.

.poly
7 2 0 1
0 0 0 1
1 2 0 1
2 2 6 1
3 0.4 1.2 3
4 0.8 2.4 3
5 1.2 3.6 3
6 1.6 4.8 3
3 1
0 0 1 1
1 1 2 1
2 2 0 1
0
Dec 4, 2013 at 9:15 PM
Edited Dec 4, 2013 at 9:17 PM
See http://www.cs.cmu.edu/~quake/triangle.trouble.html:
Strange things can happen if you've taken liberties with your PSLG. Do you have a vertex lying in the middle of a segment? Triangle sometimes copes poorly with that sort of thing. Do you want to lay out a collinear row of evenly spaced, segment-connected vertices? Have you simply defined one long segment connecting the leftmost vertex to the rightmost vertex, and a bunch of vertices lying along it? This method occasionally works, especially with horizontal and vertical lines, but often it doesn't, and you'll have to connect each adjacent pair of vertices with a separate segment. If you don't like it, tough.