Revision: 74240
http://sourceforge.net/p/brlcad/code/74240
Author: starseeker
Date: 2019-10-25 15:28:25 +0000 (Fri, 25 Oct 2019)
Log Message:
-----------
Don't use >= when comparing floating point...
Modified Paths:
--------------
brlcad/trunk/src/libbrep/cdt_mesh.cpp
Modified: brlcad/trunk/src/libbrep/cdt_mesh.cpp
===================================================================
--- brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-10-25 14:23:41 UTC (rev
74239)
+++ brlcad/trunk/src/libbrep/cdt_mesh.cpp 2019-10-25 15:28:25 UTC (rev
74240)
@@ -1796,11 +1796,11 @@
VSET(v2, pnts[t.v[2]]->x, pnts[t.v[2]]->y, pnts[t.v[2]]->z);
double tdist = bg_tri_closest_pt(NULL, tp, v0, v1, v2);
- for (u_it = ue_s.begin(); u_it != ue_s.end(); u_it++) {
+ for (u_it = ue_s.begin(); u_it != ue_s.end(); u_it++) {
uedge_t ue = *u_it;
ON_Line l(*pnts[ue.v[0]], *pnts[ue.v[1]]);
double dline = p.DistanceTo(l.ClosestPointTo(p));
- if (dline < mdist && dline >= tdist) {
+ if (dline < mdist && (dline > tdist || NEAR_EQUAL(dline, tdist,
ON_ZERO_TOLERANCE))) {
mdist = dline;
result = ue;
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits