[brlcad-commits] SF.net SVN: brlcad:[45480] brlcad/trunk/src/librt/primitives/brep/brep.cpp
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <br...@us...> - 2011-07-14 04:36:17
|
Revision: 45480 http://brlcad.svn.sourceforge.net/brlcad/?rev=45480&view=rev Author: brlcad Date: 2011-07-14 04:36:10 +0000 (Thu, 14 Jul 2011) Log Message: ----------- call NEAR_EQUAL() instead of BN_APPROXEQUAL() since they do the same thing and the latter is unnecessary api. Modified Paths: -------------- brlcad/trunk/src/librt/primitives/brep/brep.cpp Modified: brlcad/trunk/src/librt/primitives/brep/brep.cpp =================================================================== --- brlcad/trunk/src/librt/primitives/brep/brep.cpp 2011-07-14 04:30:53 UTC (rev 45479) +++ brlcad/trunk/src/librt/primitives/brep/brep.cpp 2011-07-14 04:36:10 UTC (rev 45480) @@ -2312,20 +2312,14 @@ } } + /* a binary predicate for std:list implemented as a function */ bool near_equal(double first, double second) { - struct bn_tol tol; - struct bn_tol *ptr_tol; + /* FIXME: arbitrary nearness tolerance */ + return NEAR_EQUAL(first, second, 1e-6); +} - tol.magic = BN_TOL_MAGIC; - tol.dist = 1e-6; - tol.dist_sq = tol.dist * tol.dist; - tol.perp = 1e-6; - tol.para = 1 - tol.perp; - ptr_tol = &tol; - return BN_APPROXEQUAL(first, second, ptr_tol); -} void plot_sum_surface(struct bu_list *vhead, const ON_Surface *surf, int isocurveres, int gridres) { double pt1[3], pt2[3]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |