how to get the volume of polyhedra

Asked by lip on 2019-07-29

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:
2019-07-29
Last reply:
2019-07-29
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.