← Back to team overview

yade-users team mailing list archive

[Question #229920]: regarding makeCloud and O.bodies.append

 

New question #229920 on Yade:
https://answers.launchpad.net/yade/+question/229920

I need to simulate sand mills (special type of bead mills). I have two sets of geometry  first the mill geometry which I'm importing from .STL file 'new sandmill.stl'.  Second pack of sheres, 
for the first geometry I'm using the following code 

from yade import ymport
sandmills_Ids=O.bodies.append(ymport.stl('new sandmill.stl', color=(1,1,1), wire=True))
result: I can see imported geometry in 3D VIEW

for second geometry I'm using 

from yade import pack
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(-0.85,-0.85,-0.85), rMean=0.005, rRelFuzz=0.2)
O.bodies.append([utils.sphere(s[0],s[1],color=(1,0,0)) for s in sp])

result : I can see cloud of spheres in 3D VIEW.

Both of the above codes are working when I'm using them separately. But when I'm combining then as shown here,

from yade import ymport
from yade import pack
sandmills_Ids=O.bodies.append(ymport.stl('new sandmill.stl', color=(1,1,1), wire=True))
sp=pack.SpherePack()
sp.makeCloud((0,0,0),(-0.85,-0.85,-0.85), rMean=0.005, rRelFuzz=0.2)
O.bodies.append([utils.sphere(s[0],s[1],color=(1,0,0)) for s in sp])


PROBLEM: I can see ONLY the first geometry , (i.e.the first one from the imported file)  in the 3D view but no spheres.

P.S: the len(O.bodies) give the total no. of bodies i.e. both the facets from 1st geometry and sphere from 2nd.


Can anyone tell me how to solve this problem ?   I'm using YADE in ubuntu 12.10
Thanks in advance. 

-- 
You received this question notification because you are a member of
yade-users, which is an answer contact for Yade.