Re: [Yade-users] [Question #262000]: determine whether particle lies within predicate
Question #262000 on Yade changed: https://answers.launchpad.net/yade/+question/262000 Status: Answered => Solved velimier confirmed that the question is solved: Thanks Jan Stránský, that solved my question. -- You received this question notification because you are a member of yade-users, which 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
Re: [Yade-users] [Question #262000]: determine whether particle lies within predicate
Question #262000 on Yade changed: https://answers.launchpad.net/yade/+question/262000 Status: Open => Answered Jan Stránský proposed the following answer: Hi Veljko, you can call predicate for testing. It will test if Vector3 is inside predicate or not. You can optionally use second parameter to specify "pad" = sphere radius. pred = pack.inAlignedBox((0,0,0),(10,10,10)) s = sphere((0,0,0),1) for pos in ((.9,.9,.9),(1.1,1.1,1.1)): # whatever else.. s.state.pos = pos print pred(s.state.pos,s.shape.radius) cheers Jan 2015-02-12 15:01 GMT+01:00 velimier : > New question #262000 on Yade: > https://answers.launchpad.net/yade/+question/262000 > > Hi, > is there method to determine whether sphere lies within given predicate? > > Thanks, > Veljko > > -- > You received this question notification because you are a member of > yade-users, which 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 you are a member of yade-users, which 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
Re: [Yade-users] [Question #262000]: determine whether particle lies within predicate
Hi Veljko, you can call predicate for testing. It will test if Vector3 is inside predicate or not. You can optionally use second parameter to specify "pad" = sphere radius. pred = pack.inAlignedBox((0,0,0),(10,10,10)) s = sphere((0,0,0),1) for pos in ((.9,.9,.9),(1.1,1.1,1.1)): # whatever else.. s.state.pos = pos print pred(s.state.pos,s.shape.radius) cheers Jan 2015-02-12 15:01 GMT+01:00 velimier : > New question #262000 on Yade: > https://answers.launchpad.net/yade/+question/262000 > > Hi, > is there method to determine whether sphere lies within given predicate? > > Thanks, > Veljko > > -- > You received this question notification because you are a member of > yade-users, which 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 > ___ 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
[Yade-users] [Question #262000]: determine whether particle lies within predicate
New question #262000 on Yade: https://answers.launchpad.net/yade/+question/262000 Hi, is there method to determine whether sphere lies within given predicate? Thanks, Veljko -- You received this question notification because you are a member of yade-users, which 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