Question #689086 on Yade changed: https://answers.launchpad.net/yade/+question/689086
Status: Open => Answered Chareyre proposed the following answer: Hi, I confirm your self answer. You could put this in a function to be used in the condition. Bruno Le ven. 6 mars. 2020 14:17, Paolo <question689...@answers.launchpad.net> a écrit : > Question #689086 on Yade changed: > https://answers.launchpad.net/yade/+question/689086 > > Status: Answered => Open > > Paolo is still having a problem: > My box is a facetbox with its top open. Let's suppose that I'd like to > determine the averege coordination number of the spheres which are > inside: > > geom.facetBox((0,0,0),(d,l,s),wallMask=31) > > You suggested me to detect the relevant spheres whose center is inside > the facetbox > > sphs = [b for b in O.bodies if isInsideRelevantBox(b)] > > I can't understande how to code the isInsideRelevantBox condition. > > I think it could be something related to the x,y,z relative position > between a center and the box. Basically a sphere is inside it > > if -d/2<b.state.pos[0]<d/2 and -l/2<b.state.pos[1]<l/2 and > -h/2<b.state.pos[2]<h/2 > > -- > 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