Question #355381 on Yade changed: https://answers.launchpad.net/yade/+question/355381
Status: Open => Answered Jan Stránský proposed the following answer: Hi Luis, geom.facetBox creates several facets, so it is not a single body and therefore you cannot plot its position.. you can sum the forces from all bodies and define position somehow based on position of individual facets (e.g. average or weighted average o positions of individual facets) ############ f = sum(O.forces.f(id)[2] for id in p2) z1 = sum(O.bodies[id].pos[2] for id in p2) / len(p2) ############ is that what you meant? cheers Jan 2016-08-21 4:32 GMT+02:00 Luis Barbosa <question355...@answers.launchpad.net >: > New question #355381 on Yade: > https://answers.launchpad.net/yade/+question/355381 > > Hi, > > I am defining a plane with name p2: > p2=O.bodies.append(utils.geom.facetBox((0,0,r),(0.01,-0.01, > r),wallMask=32)) > > I am using the id to plot, but it is not convenient to identify in each > simulation. > plot.addData(z1=O.bodies[id].state.pos[2],F=O.forces.f(id)[2]) > > Is there a way to plot the position and forces of this body p2 using a > ids=p2? > > Tks, > Luis > > -- > 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 > -- 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