Hi! Just refreshing this old post ☺
My case is pretty similar, but I really can’t edit the code so it works. I have two shapes: SHAPE1 and SHAPE2. One is a straight line, second is bend line. Both of those line have two point, at the beginning and at the end. There is also a layer called OBJECT. What I want to achieve is to make the object follow the intersection of those two shapes. So whenever I move one of the shapes, the object follow cross point of those shapes. Here’s how it should look (now I just moved the object manually).

Is there a way to edit this code so it fits my need? Thanks!