determine whether particle lies within predicate

Asked by velimier

Hi,
is there method to determine whether sphere lies within given predicate?

Thanks,
Veljko

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Stránský
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Stránský (honzik) said :
#1

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 <email address hidden>:

> 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 : <email address hidden>
> Unsubscribe : https://launchpad.net/~yade-users
> More help : https://help.launchpad.net/ListHelp
>

Revision history for this message
velimier (velimier) said :
#2

Thanks Jan Stránský, that solved my question.