← Back to team overview

yade-users team mailing list archive

Re: [Question #682883]: calculate mass content of a group of particles through something like label

 

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

gaoxuesong posted a new comment:
You are welcome. However, in the way as you said, 
###
-->>s1=O.bodies.append(sphere((x1,y1,z1),radius=radius1))
-->>list1=[]
-->>list1.append(s1)
### 
list1 also stores the id of a body. In this way, it stores the body. 
-->>s1=O.bodies.append(sphere((x1,y1,z1),radius=radius1))
-->>list1=[]
-->>list1.append(O.bodies[s1]) 
### 
one thing to be addressed is that the return value of the O.bodies.append() is the body's id not the body itself. 
 best,
Xuesong

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