Hello everyone, i need help about rotating family instance based on line direction angle.
I am trying to make a safety line to rounding a pile cap through dynamo
So, i did the following. but, the results is not what i expected. I know theres something that im missing cause this maybe a very common use.
so steps i already did is:
- make a rectangle with curves arounding the pile cap
- get the start point of the 4 sides lines and places the safety line at those point ( the point is located all the edges)
- from the rectangle curves, get all the Line.direction, and connect it with Vector.AngleWithVector and get the degree value.
- FamilyInstance.SetRotation connected with the safety lines family and the degree value
heres the nodes and the results is:
what i expect to happen is, the last safety cables should have close the rectangle and , rounding the pile cap
How do i to achieve that?
Thankyou very much!