How to get vector perpendicular to curve?

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?

May be try Curve.NormalAtParameter node.

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

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

Edit:

Maybe this works for you?

1 Like

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?

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?

2 Likes

Rotated Line.Direction works fine :slight_smile: Thank You!

1 Like