Revision: 56459
http://sourceforge.net/p/brlcad/code/56459
Author: phoenixyjll
Date: 2013-08-02 06:37:17 +0000 (Fri, 02 Aug 2013)
Log Message:
-----------
Make sure the results after iterations are inside the domains.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/intersect.cpp
Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp 2013-08-02 04:56:11 UTC (rev
56458)
+++ brlcad/trunk/src/libbrep/intersect.cpp 2013-08-02 06:37:17 UTC (rev
56459)
@@ -610,9 +610,11 @@
dis = closest_point.DistanceTo(pointA);
}
+ t = std::min(curveB.Domain().Max(), t);
+ t = std::max(curveB.Domain().Min(), t);
closest_point = curveB.PointAt(t);
dis = closest_point.DistanceTo(pointA);
- return dis <= tolerance;
+ return dis <= tolerance && !isnan(t);
}
@@ -779,9 +781,14 @@
v -= Delta[1][0];
dis = closest_point.DistanceTo(pointA);
}
+
+ u = std::min(u, surfB.Domain(0).Max());
+ u = std::max(u, surfB.Domain(0).Min());
+ v = std::min(v, surfB.Domain(1).Max());
+ v = std::max(v, surfB.Domain(1).Min());
closest_point = surfB.PointAt(u, v);
dis = closest_point.DistanceTo(pointA);
- return dis <= tolerance;
+ return dis <= tolerance && !isnan(u) && !isnan(v);
}
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