Relative position of two vectors

Hello everyone,
I am working on tramway forces calculation in Dynamo. I need to find out if vector v2 is on the left or the right side of vector v1 (positive/negative forces). I can get the angle of the vector planes but in Revit/Dynamo it does not state which way the angle is measured. If it is positive or negative. I can not do angles over 180° either.
I have tried comparing the vector coordinates however I was not successful. Do you guys have any suggestions?
Thanks for your time

Hi @adam.ostroluckyDFFER ,

Without having an external measurement of both vectors there is no way to tell if an angle should be negative or positive.

So what about using the node Angle.AboutAxis twice?
You would have to compare your vectors against the X-axis, revolving around the Z-axis, to find an rotation value of 0 to 360. Now you can simply subtract one from the other to get the angle difference between the two, positive or negative.

Thank you Daan,
seems like a legit solution. I will try it and post the outcome here. Thanks

@adam.ostroluckyDFFER ,

just a draft…

Hi @Draxl_Andreas ,
that is the issue actually. The value is the same.

2022-06-20_11h03_42

@adam.ostroluckyDFFER

Here is the outcome that I needed

I have used Vector.AngleAboutAxis to compare the two vectors with each other. 0-180 is Left, and 180-360 is Right.
Thank you for your help @Daan

1 Like