← Back to team overview

yade-users team mailing list archive

Re: [Question #660590]: Loading and manipulating a saving file

 

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

amir posted a new comment:
I solved the problem :)

instead of erasing old (loaded) particles I could remove b.id of new
particles.  something like this:

##############################
O.load('05.yade')

sp=SpherePack(); sp.fromSimulation()


sp.makeCloud((0,0,0.011),(0.01,0.01,.03),rMean=r3,num=20)

sp.toSimulation()


for i in range(16046,16126):                                                
    if isinstance (b.shape,Sphere): O.bodies.erase(i)

for ii in range(16046,16126):                                                
    if isinstance (b.shape,Sphere): O.bodies.erase(ii)


for j in range(16126,31126):                                               
    if isinstance (b.shape,Sphere): O.bodies.erase(j)
for jj in range(16126,31126):                                               
    if isinstance (b.shape,Sphere): O.bodies.erase(jj)


###########################################################################################################################################

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