Question #698980 on Yade changed:
https://answers.launchpad.net/yade/+question/698980
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 [1].
###
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:
O.bodies.erase(b.id)
###
Cheers
Jan
[1] https://yade-
dem.org/doc/yade.wrapper.html#yade.wrapper.BodyContainer.erase
--
You received this question notification because your team yade-users is
an answer contact for Yade.
_______________________________________________
Mailing list: https://launchpad.net/~yade-users
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yade-users
More help : https://help.launchpad.net/ListHelp