← 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,
why exactly do you need existing particles? Particles form SpherePack are
created at exactly the same positions and with same radius..

A solution would be not to use sp.toSimulation, but something like
for c,r in sp:
   if cInOBodies(): # some function to determine if the position "c" is new
or is already in existing particles
      continue
   O.bodies.append(sphere(c,r))

​cheers
Jan

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