← 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: Answered => Open

amir is still having a problem:
I don' t need the  history. As you said, I just need old particles at
the same position + some new smaller particles.  But, when I use the
following command lines, I see only new smaller particles and it removes
all particles and facets loaded at the beginning.

from yade import pack, plot,ymport,export,geom,bodiesHandling
O.load('pip0.yade')

sp = pack.SpherePack([(b.state.pos,b.shape.radius) for b in O.bodies if b.id<40]) #'Facet' object has no attribute 'radius'
print len(O.bodies)


sp = pack.SpherePack()
sp.makeCloud((0,0,0),(0.01,0.01,0.01),rMean=r2,num=100)

O.bodies.clear()

sp.toSimulation()
print len(O.bodies)

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