Revision: 56660
          http://sourceforge.net/p/brlcad/code/56660
Author:   phoenixyjll
Date:     2013-08-07 12:11:23 +0000 (Wed, 07 Aug 2013)
Log Message:
-----------
Split() might fail if t is on the domain borders, causing curve_on_loop == 
NULL, and we don't need to append it.

Modified Paths:
--------------
    brlcad/trunk/src/libbrep/boolean.cpp

Modified: brlcad/trunk/src/libbrep/boolean.cpp
===================================================================
--- brlcad/trunk/src/libbrep/boolean.cpp        2013-08-07 12:10:47 UTC (rev 
56659)
+++ brlcad/trunk/src/libbrep/boolean.cpp        2013-08-07 12:11:23 UTC (rev 
56660)
@@ -199,17 +199,21 @@
        for (; isect_iter < sorted_pointers.Count() && 
sorted_pointers[isect_iter]->m_seg == i; isect_iter++) {
            const IntersectPoint* isect_pt = sorted_pointers[isect_iter];
            ON_Curve* left = NULL;
-           curve_on_loop->Split(isect_pt->m_t, left, curve_on_loop);
+           if (curve_on_loop)
+               curve_on_loop->Split(isect_pt->m_t, left, curve_on_loop);
            if (left != NULL)
                outerloop.Append(left);
            else {
                bu_log("Split failed.\n");
-               bu_log("Domain: [%lf, %lf]\n", curve_on_loop->Domain().Min(), 
curve_on_loop->Domain().Max());
-               bu_log("m_t: %lf\n", isect_pt->m_t);
+               if (curve_on_loop) {
+                   bu_log("Domain: [%lf, %lf]\n", 
curve_on_loop->Domain().Min(), curve_on_loop->Domain().Max());
+                   bu_log("m_t: %lf\n", isect_pt->m_t);
+               }
            }
            sorted_pointers[isect_iter]->m_pos = outerloop.Count() - 1;
        }
-       outerloop.Append(curve_on_loop);
+       if (curve_on_loop)
+           outerloop.Append(curve_on_loop);
     }
 
     // Append the first element at the last to handle some special cases.

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


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to