← Back to team overview

yade-users team mailing list archive

Re: [Question #226198]: question for the Clump with facet

 

Question #226198 on Yade changed:
https://answers.launchpad.net/yade/+question/226198

Bruno Chareyre posted a new comment:
>if(!(dynamic_cast<Sphere*>(Body::byId(I->getId1())->shape.get())))
continue;

Side remark:
ClassIndex is probably faster than dynamic casts. More importantly, it really check spheres (if desirable). Something inheriting from sphere, like GridNode, will dynamic_cast correctly but it will have a different index. 

if ( (*bi)->shape->getClassIndex() ==  Sph_Index )
https://github.com/yade/trunk/blob/master/pkg/dem/TesselationWrapper.cpp#L77

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.