Revision: 56183
http://sourceforge.net/p/brlcad/code/56183
Author: phoenixyjll
Date: 2013-07-23 04:38:56 +0000 (Tue, 23 Jul 2013)
Log Message:
-----------
The return value should be number of events appended to the array, not the
number of elements in that array.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/intersect.cpp
Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp 2013-07-23 04:12:12 UTC (rev
56182)
+++ brlcad/trunk/src/libbrep/intersect.cpp 2013-07-23 04:38:56 UTC (rev
56183)
@@ -721,6 +721,8 @@
if (curveA == NULL || curveB == NULL)
return 0;
+ int original_count = x.Count();
+
if (intersection_tolerance <= 0.0)
intersection_tolerance = CCI_DEFAULT_TOLERANCE;
if (overlap_tolerance < intersection_tolerance)
@@ -1021,7 +1023,7 @@
x.Append(points[i]);
}
- return x.Count();
+ return x.Count() - original_count;
}
@@ -1187,6 +1189,8 @@
if (curveA == NULL || surfaceB == NULL)
return 0;
+ int original_count = x.Count();
+
if (intersection_tolerance <= 0.0)
intersection_tolerance = CSI_DEFAULT_TOLERANCE;
if (overlap_tolerance < intersection_tolerance)
@@ -1203,7 +1207,7 @@
// This is used in point-surface intersections, in case we build the
// tree again and again.
ON_Brep *brep = surfaceB->BrepForm();
- if (!brep) return false;
+ if (!brep) return 0;
brlcad::SurfaceTree *tree = new brlcad::SurfaceTree(brep->Face(0), false,
MAX_PSI_DEPTH);
Subcurve rootA;
@@ -1631,7 +1635,7 @@
overlap2d->Append(NULL);
}
}
- return x.Count();
+ return x.Count() - original_count;
}
@@ -2214,9 +2218,11 @@
const ON_Interval* surfaceB_vdomain)
{
if (surfA == NULL || surfB == NULL) {
- return -1;
+ return 0;
}
+ int original_count = x.Count();
+
if (intersection_tolerance <= 0.0)
intersection_tolerance = SSI_DEFAULT_TOLERANCE;
if (overlap_tolerance < intersection_tolerance)
@@ -3070,7 +3076,7 @@
}
}
- return x.Count();
+ return x.Count() - original_count;
}
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