yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #20221
Re: [Question #682414]: how to get vertex coordinate of polyhedra created by function polyhedra_utils.fillBox()
Question #682414 on Yade changed:
https://answers.launchpad.net/yade/+question/682414
Jan Stránský posted a new comment:
Hello,
sorry for late answer..
> what does the argument shape mean
b.shape
> get the volume of a polyhedra
b.shape.GetVolume() [1]
> can i achive that according to its id?
b = O.bodies[id]
> how to obtain the vertex coordinates of any polyhedron.
transform the polyedron's local coordinates to globals using b.state.pos and b.state.ori:
###
vsLocal = b.shape.v # [2], vertices in Polyhedron's coordinate system
vsGlobal = [b.state.pos + b.state.ori*v for v in vsLocal] # vertices in global coordinate system
###
cheers
Jan
[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Polyhedra.GetVolume
[2] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Polyhedra.v
--
You received this question notification because your team yade-users is
an answer contact for Yade.