Maybe a bit of a strange question, but I cant Find it.
Tree A: containing straight lines
Question: I would like to retrieve the vectors which run ‘perpendicular’ to the lines.
Of course, It is simple to get the vectors which run along a line. (see image below).
But what I don’t understand is how to get ‘perpendicular’ vectors.
In which direction the vector is pointing is not relevant for me, as long as it is perpendicular to the lines.
btw I found an formula which does the trick when the ‘original’ line is fully vertical. Unfortunately for all lines which are not vertical this does not work…
Eval doesn’t give you a vector but a point at the evaluated parameter on the curve.
I’d use PFrame (Perpendicular Frame), which works similar to Eval, but returns a plane that is perpendicular to the line. You can then deconstruct the plane and use its x- or y-axis vector as a perpendicular one. You could even rotate that vector in the same plane to vary it.
There is no such thing as a single perpendicular vector to a line. In other words, there is an infinite number of perpendicular vectors to a line. Hence we call it a perpendicular frame.
What I would like to get is the vector - perpendicular to the line - which runs in the ‘most vertical’ direction possible.
I tried to do this by retrieving the highest point of the circle, after which I can draw a line/vector. Unfortunately this ‘finding highest point’ is quite a slow component (example is only with 4 lines, but in the end it will be lots more…).
Besides this goes not correctly for horizontal lines.
Do you have an suggestion how you can draw a vector - perpendicular to the line - which runs in the most vertical direction possible?
Something like closest vector to vertical ?
Thanks for your quick reply :).
Unfortunately the cirkcle is not fully vertical so the extrusion will not ‘intersect’ with the curve?
Or maybe I am wrong
Would it be possible to use the GH file?
You can align a perp frame with a Z axis vector using the align plane component. Then deconstruct the plane and I think it will be the X vector you’re looking for. Not at the computer, so can’t provide more right now.
Thanks!
Definitely a big step in the right direction:
The only thing is that the horizontal line (in the back) is 90 degree of…
Any suggestion how I can overcome this. as the tool will be needed regardless of the original Line direction…