yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #07959
Re: [Question #233241]: how to get the body numbers who is contact with a sphere
Question #233241 on Yade changed:
https://answers.launchpad.net/yade/+question/233241
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
@Christian, withBody "Return list of real interactions of given body"
[1]
@Liucheng, maybe the same reason, try to use also withBodyAll function
"Return list of all (real as well as non-real) interactions of given body"
[2]. Is now this number and the number from inspector same, or not?
cheers
Jan
[1]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.InteractionContainer.withBody
[2]
https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.InteractionContainer.withBodyAll
2013/7/30 Christian Jakob <question233241@xxxxxxxxxxxxxxxxxxxxx>
> Question #233241 on Yade changed:
> https://answers.launchpad.net/yade/+question/233241
>
> Christian Jakob posted a new comment:
> did you try this?
>
> count = 0
> for i in O.interactions.withBody(i):
> if i.isReal:
> count += 1
>
> print count
>
> --
> 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@xxxxxxxxxxxxxxxxxxx
> 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.