I am working on sort of “self proximity node” I have various curves and I need to detect line vertices when they get too close to the same ID line segment, then add cut to this segment and set its position. I need this usage mainly for detecting the points where the distance is almost 0 or lets say below 1mm
as you see in some cases I am getting the value 0.01m = 1cm! where the real distance is 0.008cm
so when I want to detect points below 1mm this one is filtered out.
During the computations all lines medians are set to 0,0,0 so I am staying close to origin as much as possible.
I have done some tests with a node I have got by some useful misunderstanding accident from @Zebraheadhere , it uses matrices to get the vectors intersections, so I just set the line direction vector to the point position, rotate it 90 degrees and then subtract the intersection position from the point position, seems to me with the matrices it works ok… just performance wise its a bit slower…
Not sure if i get this right but you could use a double cross product to get the perpendicular vector and then use a dot product to get the distance to your red “length line” (basically the green 0.1m in your image):
nice, it looks similar to what I did with your intersection node, I should learn the vector nodes in detail first before working on projects, but I do not have time because I am working on projects;)