yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #20082
Re: [Question #681970]: How to distinguish sphere and polyhedra in a binary particle system
Question #681970 on Yade changed:
https://answers.launchpad.net/yade/+question/681970
Status: Open => Answered
Jérôme Duriez proposed the following answer:
Hi,
You can test the (class of) bodies' shape like with any other Python
object:
isinstance(b.shape,Sphere) # b is a body
or
isinstance(b.shape,Polyhedra)
isinstance is a general Python function that will return True or False
--
You received this question notification because your team yade-users is
an answer contact for Yade.