Get Rotation of Columns and rotate views

Good evening Dynamo Community!

I have created front views and planviews of columns and now I want to rotate the planview to match the orientation of the front view.

I use a Vector from the front surface of the column and a new vector to get the rotation between the two vectors. Now I´m getting different angles depending on the vector direction respectively the location of the front surface, i think.

Here are the angles I get for these two columns. I think they are not correct because they should have a difference of 180°. Should be 205° and not 155°?!


I can only get it working for some views but some views get the wrong rotation as you can see here:

Is the Problem the direction of the vectors? Should i work with the coordinate systems instead? I already have the coordinate systems of each column.

Would be really happy about any advice!

Have a nice weekend!

Kind regards,

Gerhard

No succes after hours of trying :confused:

I`m now using the Element Coordinatesystems but i can´t get the right angles.

When i use 1/0/0 as reference vector i get both angles wrong:

When i use -1/0/0 as reference vector one angle is right:

So my method of getting the rotation of the coordinate system doesnt work :confused:

Edit:

Oh it seems the 2 Columns have the same coordinate system, only the vector is going in the other direction

I think i found the solution, i have to consider 3 cases and make 3 groups of columns:

  1. x vector = +
  2. x vector = -
  3. x vector = 0

It was a wild ride but i did it :slight_smile:

These are examples of the 3 cases of view directions that can happen:

First i filter the columns with x=0, that means all with vertical front surface.
Then i split the remaining columns in x = + and x = -
Maybe there would have been a cleaner way, but I´m good as long as it works.

The Structural plans are now all rotated right:

1 Like