# How to get vector perpendicular to curve?

**URL:** https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419
**Category:** Revit
**Created:** [January 30, 2019, 10:55am UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419 "2019-01-30T10:55:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![TomaszGorecki](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@TomaszGorecki](https://forum.dynamobim.com/u/TomaszGorecki)
#### Post date: [January 30, 2019, 10:55am UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419/1 "2019-01-30T10:55:34Z")

</div>

I’m working hard on my script for rebar detailing. I managed to get textnotes with lengths of segment and align them to appropriate segment. It works perfectly fine when the rebar segments are horizontal or vertical, but I can’t get correct rotation angles for inclined parts. I need vectors perpendicular to each line. I’m using Curve.Normal node. What am I doing wrong?

 ![vector](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/2/321358b044f519106cad08f001e8fe1f82389308.png)

---

<div class="post-metadata">

### Author: ![maltheshkathare](https://avatars.discourse-cdn.com/v4/letter/m/77aa72/32.png) [@maltheshkathare](https://forum.dynamobim.com/u/maltheshkathare)
#### Post date: [January 30, 2019, 11:11am UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419/2 "2019-01-30T11:11:18Z")

</div>

May be try Curve.NormalAtParameter node.

---

<div class="post-metadata">

### Author: ![TomaszGorecki](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@TomaszGorecki](https://forum.dynamobim.com/u/TomaszGorecki)
#### Post date: [January 30, 2019, 11:41am UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419/3 "2019-01-30T11:41:17Z")

</div>

I’ve tried that already. I get even worse results 😕 All vectors are now y=-1

 ![vector%202](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/3/4316b595858ca0347301d50e460161bac44bd2b7.png)

---

<div class="post-metadata">

### Author: ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)
#### Post date: [January 30, 2019, 12:02pm UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419/4 "2019-01-30T12:02:17Z")

</div>

See if this helps, credit to @Marcello_Sgambelluri, visualising vector direction…

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/4/d4d8a8e7e5249690645d30b671be27fe5f890610.png)

Edit:

Maybe this works for you?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/a/ba41fe655a545fc11f1310723ae5fa0a07be5845.png)

---

<div class="post-metadata">

### Author: ![TomaszGorecki](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@TomaszGorecki](https://forum.dynamobim.com/u/TomaszGorecki)
#### Post date: [January 30, 2019, 12:31pm UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419/5 "2019-01-30T12:31:34Z")

</div>

In second chain the tangent vector messes to much with parts of the curve that were alright. Can you please show me the list of the results from node Curve.NormalAtParameter from the first chain?

---

<div class="post-metadata">

### Author: ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)
#### Post date: [January 30, 2019, 12:35pm UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419/6 "2019-01-30T12:35:11Z")

</div>

Not sure what you mean by messes with parts that were all right… I presume you will need to recreate the ‘normal’ that you want…? Something about the detail line is messing with the actual normal?

How about Line.Direction?

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/d/bd984780622c7724f101090d7f97f34a3792bc53.png)

---

<div class="post-metadata">

### Author: ![TomaszGorecki](https://avatars.discourse-cdn.com/v4/letter/t/edb3f5/32.png) [@TomaszGorecki](https://forum.dynamobim.com/u/TomaszGorecki)
#### Post date: [January 30, 2019, 1:37pm UTC](https://forum.dynamobim.com/t/how-to-get-vector-perpendicular-to-curve/31419/7 "2019-01-30T13:37:14Z")

</div>

Rotated Line.Direction works fine 🙂 Thank You!
