I’m trying to make use of Collide 2D to solve geometric constraints.
A line segment must either have it’s end on a polyline, or be tangent to that polyline, depending on it’s initial location.
The idea is to used Collide 2D by considering a polyline which goes around my line at a very short distance as the second polyline.
After much trial and failure, I checked the “Collide2D_Shapes” sample file and realized that the whole “Collide 2D” concept was some kind of hack in the way the 2D polylines were made to keep their shape.
I tried to replicate the ideas such as using the “Angle” component to maintain the shapes, but it fails miserably.
Maybe there’s a more straightforward approach, but I have yet to find it.
Line tangent to polyline.gh (18.5 KB)