← Back to team overview

yade-users team mailing list archive

Re: [Question #404417]: Generate a specific number of spheres in the empty spaces of a created loose pack

 

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

    Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Amir,

Thanks for explanation, but I still don't understand why you need the
existing instances of particles, if particles with same radii and at same
positions are created right after the deletion.. therefore the situation is
exactly the same as before + some new smaller particles are added. Could
you please try to explain the reason (you need some history or state
variables to be preserved)?


the cInBodies function should be written by you :-) a veeeery inefficient
way could be:

def cInBodies(c):
   for b in O.bodies:
      if b.state.pos == c:
         return True
   return False

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.