Family not coming in facing the same orientation

hello I am trying to copy hangers linearly on a pipe but they are not coming in oriented as the same direction as the first hanger that I have selected. So my question is two fold. First, how do I orient each consectutive hanger so that it is oriented properly according to the first hanger. The second part is if I can orient it properly, can I somehow do it with out needing a first hanger on there and set the orientation via the pipe orientation? BTW I can use or download any packages only Springs, thanks!

Try getting the rotation of the initial family instance with Springs.FamilyInstance.Rotation or a similar node. Then you can use FamilyInstance.SetRotation to rotate your newly created families.

You can use the pipe to set your family orientation by using a similar method to get the direction of the pipe curve.

1 Like

Nick,
That sounds great but I dont see the node you speak of anywhere. Is there a way I can do it in OOTB dynamo. I found this orientation node, but I dont know how to use it and it doesnt seem to want to work on the pipe.

This would be ideal but I dont know how to harvest the information from the pipe yet. Can you be a little more specific please? Thanks!

Facing Orientation will probably work for the hanger. It gives you a vector which you need to convert to a rotation in degrees. Try finding the angle between your facing orientation vector and a 0 degree vector (probably the X-axis).

As for your pipe direction, you need to get its center line curve. There area a few custom nodes that will do this or you can try getting geometry from the pipe itself. Then you can get points along the curve to place your hangers.

1 Like