strange Behavior with MakeRotation on a box object
strange Behavior with MakeRotation on a box objectPosted by Bonaccorsi at November 17. 2006Hello,
I found MakeRotation have a strange behavior :
In GUI mode i build a box with 2 vertex and a vector with dx,dy and dz. Then i make a rotation of this box around this vector with an angle. It's Ok.
Now, i want to do the same operation in a PYTHON script. I build the box with MakeBoxTwoPnt, I build the vector with MakeVectorDXDYDZ and rotate with "box = MakeRotation(box,vector,angle)". Then I add box to the study and the result is not similar to GUI mode. I also tried with angle = 0, the box is rotate and I don't understand why.
Is it a bug ?
Re: strange Behavior with MakeRotation on a box objectPosted by Kloss Francis at November 17. 2006See next the python script write from your message,
this script run with no bug and a good behavior.
Is the next script conform with your pb. ?
Is not, send me your script ?
from geompy import *
point_1 = MakeVertex(10, 20, 30)
point_2 = MakeVertex(100, 200, 300)
box_1 = MakeBoxTwoPnt(point_1, point_2)
axis = MakeVectorDXDYDZ(1, 2, 4)
box_2 = MakeRotation(box_1, axis, 0.32)
Re: strange Behavior with MakeRotation on a box objectPosted by Christophe Bourcier at November 17. 2006Well, in the GUI, angles are expressed in degrees, while in python scripts, they have to be expressed in radians.
This can explain different results from GUI to TUI, but not when angle = 0.
Try to dump your study to compare the generated script and the one you wrote.
Re: strange Behavior with MakeRotation on a box objectPosted by Bonaccorsi at November 20. 2006It's ok,
I work with XDATA objects and in my script there was two calls to "box = MakeRotation(box,axis,angle)" ...
Powered by Ploneboard