how to get the volume of polyhedra

Asked by lip

hello
i want to know how to get the volume of polyhedra created by function polyhedra_utils.polyhedra(),i have tried t=a.getVolume(),but an error appear:AttributeError: 'Body' object has no attribute 'getVolume'
below is my code:
from yade import pack, qt, polyhedra_utils

m=PolyhedraMat()

a=polyhedra_utils.polyhedra(material=m,size=(0.4,0.4,0.8),seed=1)
O.bodies.append(a)
t=a.getVolume()
print t

Question information

Language:
English Edit question
Status:
Answered
For:
Yade Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Robert Caulk (rcaulk) said :
#1
Revision history for this message
Robert Caulk (rcaulk) said :
#2

In fact, most probably b.GetVolume() would do the trick ;-)

Can you help with this problem?

Provide an answer of your own, or ask lip for more information if necessary.

To post a message you must log in.