yade-users team mailing list archive
-
yade-users team
-
Mailing list archive
-
Message #27560
Re: [Question #701413]: How to rotate the box
Question #701413 on Yade changed:
https://answers.launchpad.net/yade/+question/701413
Status: Open => Answered
Jan Stránský proposed the following answer:
Hello,
modify the box's orientation.
The proper usage depends on your actual needs, like if it is to 45° or by 45° etc.
E.g. something like:
###
box = utils.box((1,1,1),(1,1,1))
# note using utils.box to prevent name clash
# note using box as a result of utils.box, not O.bodies.append
boxID = O.bodies.append(box) # here the result is ID (number)
axis = (0,0,1) # parallel to the z axis
angle = 0.25 * pi # 45 degrees
box.state.ori = axis, angle
# or more verbose
box.state.ori = Quaternion(axis, angle)
###
Cheers
Jan
[1] https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.State.ori
--
You received this question notification because your team yade-users is
an answer contact for Yade.