Question #702750 on Yade changed: https://answers.launchpad.net/yade/+question/702750
Status: Open => Answered Jan Stránský proposed the following answer: > ... coordinates of each particle? > ... the z-value of the uppermost particle? > ... the z-value of each particle in the uppermost layer. please be consistent. > in the uppermost layer. first, define rigorously "the uppermost layer", i.e. how mathematically determine if particle belongs to this layer or not. Then just: ### def isUpperMostLayer(body): ... # your definition return False # or True zValsUpperMostLayer = [b.state.pos[2] for b in O.bodies if isinstance(b.shape, Sphere) and isUpperMostLayer(b)] print(zValsUpperMostLayer) # or whatever else with the values ### Cheers Jan -- You received this question notification because your team yade-users is an answer contact for Yade. _______________________________________________ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp