Extract rotation angle from box

Hi everyone,

First of all I created a cube with 9 sliders XYZ position, XYZ size and XYZ rotation in degrees around the center axis of the cube. The cube is saved in a box component. Is there a way the extract those rotation degrees, so I have the 3 original numbers again?


With grasshopper? Of course you can grab the originals?

With rhino? No.

With python, scripting most people create a rotation values and store it in the object.

Bongo saves this information too.

What are you looking to do?

You could also use grasshopper to save the rotation on the object. But that is not really a normal workflow.

Do you have an example of what you are doing?

This is how I create a cube with the 9 sliders. The box at the end saves the cube. Now my question how can I extract the rotation angles from this component, also when I don’t know the input values.

1 Like

You cannot. The input values need to be saved in a different path then store it retrieved. This is the preferred with freebody rotation. There are ways to calculate angles after the fact, but no way to determine the exact way they got there.

For instance Elefront plug-in can store data on the objects. Essentially you would store the history.

I expect another way to do this is create a rotation matrix applying the 3 different transforms to the matrix. The applying the matrix to the box just once.

Normally with grasshopper we would just continually apply the 3transforms over and over. Of course you could run a vector thru the same 3 transforms and then save that. Or you could deconstruct the box and measure the angle of an edge.

Ok thanks for the fast response, to bad there is no easy way to extract the angles. I will just store the numbers before the creation of the box.


debox.gh (20.2 KB)

1 Like

If you have a box and you want reset transformation you can use Pufferfish Rotate Quaternion;
this give you an axis and one angle of rotation (around the axis) with many solutions.

Rotate Quaternion.gh (19.3 KB)