Family rotation

Good morning to all,

I’m struggling to find the correct rotation for a family.

Basically in my workflow I’m placing automatically hanger along duct, piping and cable-tray. Everything is perfect but when I come to the rotation, I can’t find the correct angle. I tried to find the normal, to the axis line and calculate the angle between the normal and the x axis, then I tried to find the angle between the line and x axis, then the same between the Y axis but the result is that seems that dynamo is always calculating the minimum angle between two vectors.

Is there someone that can advise me how to find the correct rotation to be sure that my support is perpendicular to the axis?

You can see a small video about this on this screencast:

Thanks for the support :slight_smile:


1 Like

What version of Dynamo are you using. I had this problem a while ago but v0.9.1 solved it.

I thought was an issue of the version 0.8.1 but within this project I can’t use newset versions.

Finally I got with a little bit of vector geometry and little bit of “lucky”

This is the final version and now is perfect :slight_smile:


1 Like

Hello Cesare_Caoduro3.

I have some problem with the angle for family, when I try to rotate, in some cases it’s ok but when the vector direction is negative It doesn’t work.

can you share me your node please.

I don’t understand the flow with vectors and the angle

sorry, my english is very bad, I am learning

Sorry I was on vacation…tomorrow I’ll share the script


Thanks for your help, I’ll wait.