[brlcad-commits] SF.net SVN: brlcad:[41517] brlcad/trunk/include/bn.h
Open Source Solid Modeling CAD
Brought to you by:
brlcad
From: <r_...@us...> - 2010-12-06 21:16:46
|
Revision: 41517 http://brlcad.svn.sourceforge.net/brlcad/?rev=41517&view=rev Author: r_weiss Date: 2010-12-06 21:16:40 +0000 (Mon, 06 Dec 2010) Log Message: ----------- Updated macro BN_VECT_ARE_PARALLEL in file 'bn.h'. The macro now can identify parallel vectors pointing in the same direction and in opposite directions. This change should improve the results from the mged commands 'facetize' and 'ev'. Initial test results look good but still in process of full testing. Modified Paths: -------------- brlcad/trunk/include/bn.h Modified: brlcad/trunk/include/bn.h =================================================================== --- brlcad/trunk/include/bn.h 2010-12-06 20:54:40 UTC (rev 41516) +++ brlcad/trunk/include/bn.h 2010-12-06 21:16:40 UTC (rev 41517) @@ -112,7 +112,8 @@ #define BN_CK_TOL(_p) BU_CKMAG(_p, BN_TOL_MAGIC, "bn_tol") #define BN_VECT_ARE_PARALLEL(_dot, _tol) \ - (((_dot) < 0) ? ((-(_dot))>=(_tol)->para) : ((_dot) >= (_tol)->para)) + (((_dot) <= -SMALL_FASTF) ? (NEAR_ZERO((_dot) + 1.0, (_tol)->perp)) : (NEAR_ZERO((_dot) - 1.0, (_tol)->perp))) + #define BN_VECT_ARE_PERP(_dot, _tol) \ (((_dot) < 0) ? ((-(_dot))<=(_tol)->perp) : ((_dot) <= (_tol)->perp)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |