Revision: 56001
          http://sourceforge.net/p/brlcad/code/56001
Author:   phoenixyjll
Date:     2013-07-11 08:56:04 +0000 (Thu, 11 Jul 2013)
Log Message:
-----------
Change the dimension of the result, and delete the unused curves.

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

Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp      2013-07-11 07:58:18 UTC (rev 
56000)
+++ brlcad/trunk/src/libbrep/intersect.cpp      2013-07-11 08:56:04 UTC (rev 
56001)
@@ -1921,16 +1921,22 @@
                ell.GetNurbForm(nurbscurve);
                // The params of the nurbscurve is between [0, 2*pi]
                ON_Curve *left = NULL, *right = NULL;
-               if (!ON_NearZero(t_min))
+               if (!ON_NearZero(t_min)) {
                    nurbscurve.Split(t_min, left, right);
+                   delete left;
+               }
                else
-                   right = &nurbscurve;
-               if (right && !ON_NearZero(t_max - 2*ON_PI))
+                   right = nurbscurve.Duplicate();
+               if (right && !ON_NearZero(t_max - 2*ON_PI)) {
                    right->Split(t_max, left, right);
+                   delete right;
+               }
                else
-                   left = right;
+                   left = right->Duplicate();
+               left->ChangeDimension(in->Dimension());
                if (delete_curve) delete in;
-               return left->Duplicate();
+               delete right;
+               return left;
            }
        }
     }

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


------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to