Get orthogonality of lines

Hi All

Came across this and thought I could use it for rebar. I want to see if a line is vertical or horizontal. Im almost there but the python is saying name error curve is not defined


@Alban_de_Chasteigner its your script I got from another post. Any idea how I can tweak it for rebar lines?

Hi @technitutors,

Add a sample Revit file and I will take a look.

layering.dyn (54.7 KB)
The bottom part is your script. Top part is mine.I am trying to determine if its facing vertically or horizontally. My idea is to deconstruct the point of the rebar and if I subtract two points and it returns zero then it will face y or x, eg if x2-x1=0 then its facing Y