// lon = -112.012175; lat = 41.195944; // KOGD
// lon = -90.757128; lat = 46.790212; // WI32
// lon = -122.220717; lat = 37.721291; // KOAK
- lon = -111.721477; lat = 40.215641; // KPVU
+ // lon = -111.721477; lat = 40.215641; // KPVU
+ lon = -122.309313; lat = 47.448982; // KSEA
double min_x = lon - 1;
double min_y = lat - 1;
FGBucket b_max( lon + 1, lat + 1 );
FGBucket b_omit(550314L);
+ // FGBucket b(942698L);
// FGBucket b(-146.248360, 61.133950);
// construct_tile( work_base, output_base, b );
// exit(0);
// $Log$
+// Revision 1.17 1999/04/03 05:22:57 curt
+// Found a bug in dividing and adding unique verticle segments which could
+// cause the triangulator to end up in an infinite loop. Basically the code
+// was correct, but the verticle line test was a bit to selective.
+//
// Revision 1.16 1999/04/01 13:52:12 curt
// Version 0.6.0
// Shape name tweak.
vorout.normlist = (REAL *) NULL; // Needed only if -v switch used.
// TEMPORARY
- // write_out_data(&in);
+ write_out_data(&in);
// Triangulate the points. Switches are chosen to read and write
// a PSLG (p), preserve the convex hull (c), number everything
triangulate(tri_options.c_str(), &in, &out, &vorout);
// TEMPORARY
- write_out_data(&out);
+ // write_out_data(&out);
// now copy the results back into the corresponding FGTriangle
// structures
// $Log$
+// Revision 1.15 1999/04/03 05:22:58 curt
+// Found a bug in dividing and adding unique verticle segments which could
+// cause the triangulator to end up in an infinite loop. Basically the code
+// was correct, but the verticle line test was a bit to selective.
+//
// Revision 1.14 1999/03/31 23:47:09 curt
// Debugging output tweaks.
//
// temp = true;
// }
- if ( fabs(p0.x() - p1.x()) > FG_EPSILON ) {
+ if ( fabs(p0.x() - p1.x()) > 3 * FG_EPSILON ) {
// use y = mx + b
// sort these in a sensable order
} else {
// use x = constant
+ // cout << "FOUND VERTICLE SEGMENT" << endl;
+
// sort these in a sensable order
if ( p0.y() > p1.y() ) {
Point3D tmp = p0;
p1 = tmp;
}
+ // cout << " p0 = " << p0 << " p1 = " << p1 << endl;
+
current = nodes.begin();
last = nodes.end();
counter = 0;
for ( ; current != last; ++current ) {
// cout << counter << endl;
- if ( (current->y() > p0.y()) && (current->y() < p1.y()) ) {
+ if ( (current->y() > (p0.y() + FG_EPSILON))
+ && (current->y() < (p1.y() - FG_EPSILON)) ) {
x_err = fabs(current->x() - p0.x());
+ // cout << " found a potential point, x err = "
+ // << x_err << endl;
if ( x_err < 10*FG_EPSILON ) {
cout << "FOUND EXTRA SEGMENT NODE (X)" << endl;
+ cout << p0 << " < " << *current << " < "
+ << p1 << endl;
found_extra = true;
extra_index = counter;
break;
// $Log$
+// Revision 1.6 1999/04/03 05:22:59 curt
+// Found a bug in dividing and adding unique verticle segments which could
+// cause the triangulator to end up in an infinite loop. Basically the code
+// was correct, but the verticle line test was a bit to selective.
+//
// Revision 1.5 1999/03/29 13:11:13 curt
// Shuffled stl type names a bit.
// Began adding support for tri-fanning (or maybe other arrangments too.)