← Back to team overview

yade-users team mailing list archive

Re: [Question #683384]: After deletion of particles, why the output of particle number remains unchanged

 

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

    Status: Open => Answered

Robert Caulk proposed the following answer:
Yikes, that is the longest way to show:

O.bodies.append(sphere(Vector3(0,0,0),1))
O.run(1,1)
len(O.bodies)
O.bodies.erase(0)
O.run(1,1)
len(O.bodies)

That I have ever seen.

It is because the body id can be reused if the particle is reinserted.

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