yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #12651
[Branch ~yade-pkg/yade/git-trunk] Rev 3854: Fixed a bug in pack.inSphere, related to question #292846
------------------------------------------------------------
revno: 3854
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Sat 2016-04-30 22:53:40 +0200
message:
Fixed a bug in pack.inSphere, related to question #292846
modified:
py/pack/_packPredicates.cpp
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'py/pack/_packPredicates.cpp'
--- py/pack/_packPredicates.cpp 2015-05-04 16:59:30 +0000
+++ py/pack/_packPredicates.cpp 2016-04-30 20:53:40 +0000
@@ -108,7 +108,7 @@
Vector3r center; Real radius;
public:
inSphere(const Vector3r& _center, Real _radius){center=_center; radius=_radius;}
- virtual bool operator()(const Vector3r& pt, Real pad=0.) const { return ((pt-center).norm()-pad<=radius-pad); }
+ virtual bool operator()(const Vector3r& pt, Real pad=0.) const { return ((pt-center).norm()<=radius-pad); }
virtual py::tuple aabb() const {return vvec2tuple(Vector3r(center[0]-radius,center[1]-radius,center[2]-radius),Vector3r(center[0]+radius,center[1]+radius,center[2]+radius));}
};