Revision: 56569
http://sourceforge.net/p/brlcad/code/56569
Author: brlcad
Date: 2013-08-05 07:08:34 +0000 (Mon, 05 Aug 2013)
Log Message:
-----------
re-enable tgc reporting of non-paired grazing hits, but only for the first 100
cases. intentionally making no attempt to be thread-safe in the book-keeping
here because it doesn't matter. just need some upper limit.
Modified Paths:
--------------
brlcad/trunk/src/librt/primitives/tgc/tgc.c
Modified: brlcad/trunk/src/librt/primitives/tgc/tgc.c
===================================================================
--- brlcad/trunk/src/librt/primitives/tgc/tgc.c 2013-08-05 07:07:20 UTC (rev
56568)
+++ brlcad/trunk/src/librt/primitives/tgc/tgc.c 2013-08-05 07:08:34 UTC (rev
56569)
@@ -913,14 +913,22 @@
}
if (npts != 0 && npts != 2 && npts != 4) {
+ static int tgc_msgs = 0;
/* these are printed in 'mm' regardless of local units */
-#if 0
- bu_log("tgc(%s): %d intersects != {0, 2, 4}\n", stp->st_name, npts);
- bu_log("\tray: pt = (%g %g %g), dir = (%g %g %g), units in mm\n",
V3ARGS(ap->a_ray.r_pt), V3ARGS(ap->a_ray.r_dir));
- for (i=0; i<npts; i++) {
- bu_log("\t%g", k[i]*t_scale);
+
+ if (tgc_msgs++ < 100) {
+ bu_log("tgc(%s): %d intersects != {0, 2, 4}\n", stp->st_name,
npts);
+ bu_log("\tray: pt = (%g %g %g), dir = (%g %g %g), units in mm\n",
V3ARGS(ap->a_ray.r_pt), V3ARGS(ap->a_ray.r_dir));
+ for (i=0; i<npts; i++) {
+ bu_log("\t%g", k[i]*t_scale);
+ }
+ bu_log("\n");
+ } else if (tgc_msgs == 100) {
+ bu_log("tgc(%s): too many grazing intersections encountered.
further reporting suppressed.\n");
+ tgc_msgs++;
}
- bu_log("\n");
+ }
+
#endif
return 0; /* No hit */
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Get your SQL database under version control now!
Version control is standard for application code, but databases havent
caught up. So what steps can you take to put your SQL databases under
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits