Revision: 45533
          http://brlcad.svn.sourceforge.net/brlcad/?rev=45533&view=rev
Author:   brlcad
Date:     2011-07-18 21:40:25 +0000 (Mon, 18 Jul 2011)

Log Message:
-----------
add another subtle change in case the == case ever gets removed, swap the logic 
so that the <= case will cause the comparison to clamp correctly to the 
singular point (and further prevent the inf loop).

Modified Paths:
--------------
    brlcad/trunk/src/librt/opennurbs_ext.h

Modified: brlcad/trunk/src/librt/opennurbs_ext.h
===================================================================
--- brlcad/trunk/src/librt/opennurbs_ext.h      2011-07-18 21:37:07 UTC (rev 
45532)
+++ brlcad/trunk/src/librt/opennurbs_ext.h      2011-07-18 21:40:25 UTC (rev 
45533)
@@ -547,14 +547,16 @@
            return p[Y];
        }
 
-       if (p[X] < u) {
+       if (p[X] > u) {
+           /* v is behind us, back up the end */
+           Tb = guess;
+           VMOVE(B, p);
+           Tan_end = m_trim->TangentAt(Tb);
+       } else {
+           /* v is in front, move start forward */
            Ta = guess;
            VMOVE(A, p);
            Tan_start = m_trim->TangentAt(Ta);
-       } else {
-           Tb = guess;
-           VMOVE(B, p);
-           Tan_end = m_trim->TangentAt(Tb);
        }
        dT = Tb - Ta;
        du = fabs(Tan_end.x - Tan_start.x);


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

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to