← Back to team overview

yade-users team mailing list archive

[Question #682417]: how to get the volume of polyhedra

 

New question #682417 on Yade:
https://answers.launchpad.net/yade/+question/682417

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


-- 
You received this question notification because your team yade-users is
an answer contact for Yade.