Revision: 42303
          http://brlcad.svn.sourceforge.net/brlcad/?rev=42303&view=rev
Author:   tbrowder2
Date:     2011-01-15 13:50:17 +0000 (Sat, 15 Jan 2011)

Log Message:
-----------
change main to standard form; add informative output about tesselation 
parameters

Modified Paths:
--------------
    brlcad/trunk/src/conv/g-xxx_facets.c

Modified: brlcad/trunk/src/conv/g-xxx_facets.c
===================================================================
--- brlcad/trunk/src/conv/g-xxx_facets.c        2011-01-15 13:04:06 UTC (rev 
42302)
+++ brlcad/trunk/src/conv/g-xxx_facets.c        2011-01-15 13:50:17 UTC (rev 
42303)
@@ -27,12 +27,10 @@
 
 #include "common.h"
 
-#include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <math.h>
 #include <string.h>
-#include "bio.h"
 
 #include "vmath.h"
 #include "nmg.h"
@@ -52,8 +50,9 @@
 extern double nmg_eue_dist;            /* from nmg_plot.c */
 
 static char    usage[] = "\
-Usage: %s [-v][-xX lvl][-a abs_tess_tol][-r rel_tess_tol][-n norm_tess_tol]\n\
-[-D dist_calc_tol] -o output_file_name brlcad_db.g object(s)\n";
+Usage: %s [-v][-xX lvl][-a abs_tess_tol (default: 0.0)][-r rel_tess_tol 
(default: 0.01)]\n\
+  [-n norm_tess_tol (default: 0.0)][-D dist_calc_tol (default: 0.005)]\n\
+   -o output_file_name brlcad_db.g object(s)\n";
 
 static int     NMG_debug;      /* saved arg of -X, for longjmp handling */
 static int     verbose;
@@ -70,14 +69,11 @@
 static int             regions_written = 0;
 static unsigned int    tot_polygons = 0;
 
-
 /*
  *                     M A I N
  */
 int
-main(argc, argv)
-    int        argc;
-    char       *argv[];
+main(int argc, char **argv)
 {
     int        c;
     double             percent;
@@ -183,12 +179,12 @@
 
     /* Walk indicated tree(s).  Each region will be output separately */
     (void) db_walk_tree(dbip, argc-1, (const char **)(argv+1),
-                       1,                      /* ncpu */
-                       &tree_state,
-                       0,                      /* take all regions */
-                       do_region_end,
-                       nmg_booltree_leaf_tess,
-                       (genptr_t)NULL);        /* in librt/nmg_bool.c */
+                        1,                     /* ncpu */
+                        &tree_state,
+                        0,                     /* take all regions */
+                        do_region_end,
+                        nmg_booltree_leaf_tess,
+                        (genptr_t)NULL);       /* in librt/nmg_bool.c */
 
     percent = 0;
     if (regions_tried>0) {
@@ -206,6 +202,12 @@
 
     bu_log( "%ld triangles written\n", tot_polygons );
 
+    bu_log( "Tesselation parameters used:\n");
+    bu_log( "  abs  [-a]    %g\n", ttol.abs );
+    bu_log( "  rel  [-r]    %g\n", ttol.rel );
+    bu_log( "  norm [-n]    %g\n", ttol.norm );
+    bu_log( "  dist [-D]    %g\n", tol.dist );
+
     /* Release dynamic storage */
     nmg_km(the_model);
     rt_vlist_cleanup();


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to