regarding makeCloud and O.bodies.append

Asked by Chandrashekhar Sirimala

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.

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#1

Do you have consistent sizes?
If the mill size is 10000 and the cloud size is 0.85, the cloud may be a
really small thing that you don't see.

Revision history for this message
Chandrashekhar Sirimala (chandrashekhar-siri) said :
#2

Yes, I've consistent sizes. mill diameter is 1.0 and cloud size is 0.85.

Revision history for this message
Chandrashekhar Sirimala (chandrashekhar-siri) said :
#3

sorry for my above comment. My dimensions were inconsistent.

Revision history for this message
Chandrashekhar Sirimala (chandrashekhar-siri) said :
#4

Thanks Bruno Chareyre, that solved my question.

Revision history for this message
Chandrashekhar Sirimala (chandrashekhar-siri) said :
#5

The initial problem is solved, now I'm able to view both the particles in 3d views but I need some clarification on few things like
1. I made my mill geometry in solidworks, and converted it into .STL file, units of dimensions are in meters, so when I import it into yade will it still remain in METERS ? ( I think so, just want to confirm)

2. After importing the origin of geometry is not the same as the origin in yade, i.e. the geometry is displaced, I want to know what that displacement is ?

3. how to view the dimension of any particular body instance ?
   for sphere I know, s.shape.radius returns the radius, but for facets ? for cyilnders ? etc..

4.(Imp doubt) What are the units of dimensions in yade ? s.shape.radius doesn't return any dimensions :)

thanks in advance

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#6

Dear Chandrashekar,
1/ Please don't reopen closed questions.
2/ Try to be as specific as possible for each new question.

A computer code as no units, only numbers.

Revision history for this message
Bruno Chareyre (bruno-chareyre) said :
#7

---> "2/ Try to be as specific as possible for each new question."
I meant: don't list many different questions in a single post if they are not related. The shift of the imported mesh and the units questions are clearly disconnected.

Lastly:
3. check if the same question has not been answered already. You are not the first one to ask about units.

Revision history for this message
Chandrashekhar Sirimala (chandrashekhar-siri) said :
#8

Ok. I'll repost this question in the main forum.

Can you help with this problem?

Provide an answer of your own, or ask Chandrashekhar Sirimala for more information if necessary.

To post a message you must log in.