yade-users team mailing list archive
Mailing list archive
Re: [Question #698980]: How to remove particles from a packing?
Question #698980 on Yade changed:
Status: Open => Answered
Jan Stránský proposed the following answer:
Thanks for clarification.
To remove particles / use only some particles, you have several options.
One is to extract particles and use only those you need in reset
simulation or a new simulation.
Another option is to use O.bodies.erase .
circleCenter = Vector3(1,2,3)
circleRadius = 123
for b in O.bodies:
d = (b.state.pos - circleCenter).norm() # distance of circleCenter and center of "b"
if d < circleRadius:
You received this question notification because your team yade-users is
an answer contact for Yade.