# Setting Rotation along a path

**URL:** <https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495>\
**Category:** Packages\
**Created:** [November 3, 2015, 2:19pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495 "2015-11-03T14:19:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [November 3, 2015, 2:19pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/1 "2015-11-03T14:19:09Z")

</div>

I’ve been trying to follow the below attached Archi-Lab link to what I am trying to do. I’ve had to change tactics slightly because some nodes seem to have changed in the short time since the post was written. I’ve had partial success so far but am having trouble after getting the different angles between vectors. Please excuse the extra geo lines. They were there to help understand if my script was behaving as expected.

> **[rotate family with dynamo](https://archi-lab.net/rotate-family-with-dynamo/)**
>
> Below is a quick overview of a method to create an array of family instances on a curve and rotate them to always be perpendicular to host curve. You will need to download a few packages to get it …

&nbsp;

![15-11-03 rotation on curve problem](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/2/2998e16d415d10eca7c5dffa694fc78c12fbb318.png)

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [November 3, 2015, 4:47pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/2 "2015-11-03T16:47:59Z")

</div>

Hi Blair,

Have you tried “Instance.paremeter.cross sectionRotation” custom node. Read this post [http://dynamobim.com/forums/topic/structural-beams-rotation-around-own-axis/](http://dynamobim.com/forums/topic/structural-beams-rotation-around-own-axis/)

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [November 5, 2015, 10:22am UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/3 "2015-11-05T10:22:28Z")

</div>

Sorry the forums were down yesterday but I did have a chance to try your suggestion and sadly I must report it was even less effective than how I had the script originally set up. Columns don’t appear to have a cross-section rotation parameter and to redo the script with vertical beams… while I rather try some other approuches before return to this option. Interestingly. in total I’ve found 3 ways of rotating families but still the process to align columns to the curve eludes me. I’ll keep trying.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [November 5, 2015, 11:52am UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/4 "2015-11-05T11:52:37Z")

</div>

Are you looking for this.

 ![33](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/3/372ead56d643c1ef189c78f25be5b0c1e6ad6faa.png)

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [November 5, 2015, 1:03pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/5 "2015-11-05T13:03:14Z")

</div>

Looks promising. A whole other way to rotate elements to align with a path I haven’t seen before. Might have some trouble with the large code block but I will try this approuch soon.

---

<div class="post-metadata">

**Author:** ![Kulkul](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/kulkul/32/49801_2.png) [@Kulkul](https://forum.dynamobim.com/u/Kulkul)\
**Post date:** [November 5, 2015, 1:17pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/6 "2015-11-05T13:17:50Z")

</div>

To save your time here is the dyn file Click on Rotate on your left. [Rotate](http://dynamobim.com/wp-content/uploads/forum-assets/kulkul7536gmail-com/11/05/Rotate.dyn)

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [November 6, 2015, 5:22pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/7 "2015-11-06T17:22:58Z")

</div>

I finally had time to take apart the small family and and study the family.

gs=(am.X-as.X)_(ae.Y-as.Y)-(am.Y-as.Y)_(ae.X-as.X); dr=gs\>0?-1:(gs\<0?1:0);

The above code seems to be were the actual angle calculation takes place but I can’t make heads or tails of it. Even when trying to break it on purpose the code string appears far too delicate - any change breaks it - pointing to it’s importance and complexity. How the above variables feed into it makes sense but how does the “.” in “am.X” or “ae.X” function? Or, for example, “ar.SweepAngle”, “cr.Length” or “ar.PointbyParameter”?

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [November 11, 2015, 3:36pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/8 "2015-11-11T15:36:02Z")

</div>

^bump^

I’m still curious to learn how to do this but perhaps I’ve stepped too far into unknown territory?

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [November 12, 2015, 1:21am UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/9 "2015-11-12T01:21:43Z")

</div>

gs = graham scan

Dimitar had brought this out in a discussion (that I’m unable to trace right now) some time ago.

> **[Graham scan](https://en.wikipedia.org/wiki/Graham_scan)**
>
> Graham's scan is a method of finding the convex hull of a finite set of points in the plane with time complexity O(n log n). It is named after Ronald Graham, who published the original algorithm in 1972. The algorithm finds all vertices of the convex hull ordered along its boundary. It uses a stack to detect and remove concavities in the boundary efficiently.
> The first step in this algorithm is to find the point with the lowest y-coordinate. If the lowest y-coordinate exists in more than one poi...

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [November 12, 2015, 10:03am UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/10 "2015-11-12T10:03:02Z")

</div>

EPIC. More than enough to get someone like me going. Thanks!

---

<div class="post-metadata">

**Author:** ![Organon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/organon/32/161404_2.png) [@Organon](https://forum.dynamobim.com/u/Organon)\
**Post date:** [November 12, 2015, 8:16pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/11 "2015-11-12T20:16:41Z")

</div>

The discussion:

[http://dynamobim.com/forums/topic/rebuild-list-from-boolean-value/](http://dynamobim.com/forums/topic/rebuild-list-from-boolean-value/)

---

<div class="post-metadata">

**Author:** ![jostein\_olsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jostein_olsen/32/8570_2.png) [@jostein\_olsen](https://forum.dynamobim.com/u/jostein_olsen)\
**Post date:** [December 8, 2015, 7:52am UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/12 "2015-12-08T07:52:07Z")

</div>

I have used the above graham scan algorithm for placing generic sheet piles and rotating them right to multiple model lines from revit and setting a length parameter to a rock surface. I’ll upload a pic of it here for future reference and if anyone sees possibilities for improvement. 750 sheet piles in less than 15 seconds compared to former 8 minutes using adaptive components with a 3pt rig in dynamo. Math is awesome, thanks Kulkul!

 ![pic1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/c/c13f15bab6962574667b6cd0d8447649ced8d03d.png)

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [December 9, 2015, 3:16pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/13 "2015-12-09T15:16:17Z")

</div>

Glad to hear your sheet piling placement went smoothly. Don’t use many of them in Calgary. Had to ask the office what they were. 😉

---

<div class="post-metadata">

**Author:** ![Alfredo\_Medina](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alfredo_medina/32/86467_2.png) [@Alfredo\_Medina](https://forum.dynamobim.com/u/Alfredo_Medina)\
**Post date:** [December 9, 2015, 4:10pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/14 "2015-12-09T16:10:30Z")

</div>

I see the great potential of Dynamo for doing those things that are not possible with the default Revit tool, but what is the advantage of doing a routine in Dynamo for something that the software already does? I would appreciate an explanation of this. I see some tendency to model in Dynamo things that can be done with the default tools. What’s the point? What I am missing to understand? Thanks for your help.

---

<div class="post-metadata">

**Author:** ![jostein\_olsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jostein_olsen/32/8570_2.png) [@jostein\_olsen](https://forum.dynamobim.com/u/jostein_olsen)\
**Post date:** [December 9, 2015, 4:28pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/15 "2015-12-09T16:28:15Z")

</div>

Speaking for myself, I see no upside to doing something in dynamo if the exact same is possible in native Revit. Maybe I’m far out here, but as far as my understanding goes, none of the above can be done natively in Revit? Please be free to add any native Revit solution as well, we’re all here to learn! 🙂

---

<div class="post-metadata">

**Author:** ![PerfectArchCo](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/perfectarchco/32/28515_2.png) [@PerfectArchCo](https://forum.dynamobim.com/u/PerfectArchCo)\
**Post date:** [December 9, 2015, 6:04pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/16 "2015-12-09T18:04:18Z")

</div>

A bit off topic but there is a very important point in your question to be understood. For myself - and the reasons which motivated me to accept Dynamo as an important industry tool - lies in sophisticated and recondite arguments about the nature of knowledge and complex systems. My position is probably better summarized in a blog post so please excuse the brevity and necessary abstraction of my answer.

Complex systems have many attributes, of importance to building design is 1) comprehension of the system and 2) the manipulation of said system. Graphical and computational approaches address each of these points individually. Basically, graphical representation tends to be much stronger at structuring complex data for human consumption. At the end of the day however, alpha-numeric input is much better suited for the manipulation of complex systems, especially as 1) the precision required increases and 2) the number of variables increase. There is no reason to believe a random post on the internet and I would encourage readers to look into software development project management where many of the behaviors described above are studied in detail and, indeed, leveraged daily to manage the software which runs the internet.

Returning to your question, the same analogy applies to REVIT and Dynamo. REVIT has become a powerful tool to graphically represent a complex system to a host of multi-disciplinary actors. But to efficiently manipulate such a complex system, which I do submit a modern building project is, a computational approach can be very valuable at certain points in a project. I harbor no ill will toward anyone wishing to model in REVIT but, for myself, I have every intention of building _a lot_ in my life and to that end - I think it can be reasonably established - Dynamo has many advantages. As a side note, Dynamo is considered a visual programming language and I’m very grateful for this fact. Dynamo, for me, has reduced the intimidation of learning to program, as now I find it much easier to visually understand a complex program.

**Computational Architecture = Rock n’ Roll.**

&nbsp;

(edit:spelling!!)

---

<div class="post-metadata">

**Author:** ![Alfredo\_Medina](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alfredo_medina/32/86467_2.png) [@Alfredo\_Medina](https://forum.dynamobim.com/u/Alfredo_Medina)\
**Post date:** [December 10, 2015, 1:39pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/17 "2015-12-10T13:39:52Z")

</div>

Thank you for the replies. The rotation of the section of the column along the path can be done by making the column repeat along a divided path created on a curve. If the rotation is constant, that is all it takes. If the rotation is progressive, it requires a couple of adaptive points in the repeater and a formula to determine the pattern. This could probably be done in less time than the Dynamo workflow. Having said that, don’t get me wrong, I do see the great benefit of Dynamo when it is used to overcome the limitations of Revit. I asked the question in hope that there was something else that I was missing.

&nbsp;

![2015-12-10_12-13-22](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/4/417e56b30dc6f1110552376218dcdc8e1ec0882b.jpg)

---

<div class="post-metadata">

**Author:** ![Organon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/organon/32/161404_2.png) [@Organon](https://forum.dynamobim.com/u/Organon)\
**Post date:** [December 11, 2015, 12:24pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/18 "2015-12-11T12:24:43Z")

</div>

Alfredo,

I understand what you mean, that confusion happens to beginners in Dynamo. Probably you can do it in less time with just one curve, but if you have twenty or thirty curves?.. **Dynamo it’s all about optimizing workflows.** You can create a definition once and use it many times, instead of doing the same task over and over again. That´s the power of programming.

Regards.

&nbsp;

---

<div class="post-metadata">

**Author:** ![Alfredo\_Medina](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alfredo_medina/32/86467_2.png) [@Alfredo\_Medina](https://forum.dynamobim.com/u/Alfredo_Medina)\
**Post date:** [December 11, 2015, 1:47pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/19 "2015-12-11T13:47:58Z")

</div>

There you go, that is a good reason for using Dynamo for something like this. Thank you very much.

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [November 19, 2018, 2:19pm UTC](https://forum.dynamobim.com/t/setting-rotation-along-a-path/2495/20 "2018-11-19T14:19:08Z")

</div>

Hello! Sorry to come back to this topic but for me the above isnt working and I dont know why. Im pretty new to Dynamo.  
My family isnt rotating with the path (X/Y). Can somebody help you?  
Thank you in advance!

 ![1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/e/de6a3a437eb5a7b06259ea8ee204df9f6f554386.jpeg)
