]> git.mxchange.org Git - flightgear.git/blobdiff - Tools/process-dem.pl
Makefile tweaks
[flightgear.git] / Tools / process-dem.pl
index c98be79a6184e7482924699290242809d3bff7f8..fe7cc3284489bd28185511255b48ec4bfcfba0c3 100755 (executable)
 
 $| = 1;                         # flush buffers after every write
 
-$do_dem2node =     1;
-$do_triangle_1 = 1;
-$do_fixnode =    1;
-$do_splittris =  1;
-$do_assemtris =  1;
-$do_triangle_2 = 1;
-
-$do_tri2obj =    1;
-$do_strips =     1;
+$do_dem2node =     0;
+$do_triangle_1 = 0;
+$do_fixnode =    0;
+$do_splittris =  0;
+$do_assemtris =  0;
+$do_triangle_2 = 0;
+
+$do_tri2obj =    0;
+$do_strips =     0;
 $do_fixobj =     1;
 
 
@@ -68,7 +68,7 @@ while ( $dem_file = shift(@ARGV) ) {
     if ( $do_dem2node ) {
        dem2node() ;
     } else {
-       $subdir = "../Scenery/w100n040/w093n045";
+       $subdir = "../Scenery/w120n030/w111n033";
        print "WARNING:  Hardcoding subdir = $subdir\n";
     }
 
@@ -255,7 +255,20 @@ sub triangle_2 {
        print $file;
        chop($file);
        if ( ($file =~ m/\.node$/) && ($file !~ m/\.\d\.node$/) ) {
-           $command = "Triangle/triangle $subdir/$file";
+           $base = $file;
+           $base =~ s/\.node$//;
+           print("Test for $subdir/$base.q\n");
+           if ( -r "$subdir/$base.q" ) {
+
+               # if triangle hangs, we can create a filebase.q for
+               # the file it hung on.  Then, we test for that file
+               # here which causes the incremental algorithm to run
+               # (which shouldn't ever hang.)
+
+               $command = "Triangle/triangle -i $subdir/$file";
+           } else {
+               $command = "Triangle/triangle $subdir/$file";
+           }
            $command = fix_command($command);
            print "Running '$command'\n";
            open(OUT, "$command |");
@@ -367,7 +380,7 @@ sub fixobj {
            }
            close(OUT);
 
-           unlink("$subdir/$file");
+           unlink("$subdir/$file");
        }
     }
 }
@@ -375,6 +388,14 @@ sub fixobj {
 
 #---------------------------------------------------------------------------
 # $Log$
+# Revision 1.18  1998/05/20 20:55:40  curt
+# Makefile tweaks
+#
+# Revision 1.17  1998/04/28 01:23:25  curt
+# Added a work around so that we can get past the "triangle" program
+# hanging, by aborting and rerunning with that tile marked to use the "-i"
+# option.
+#
 # Revision 1.16  1998/04/18 03:57:53  curt
 # Added zlib library support.
 #