Dynamic line line intersection


#1

Is it possible to create plugin which is listening two lines and every time lines are moved automatically finds new intersection point?


(Menno Deij - van Rijswijk) #2

Yes, that is possible. You would need to register which two line need to be monitored, and save their Guid unique ids.
Then, you can use events like RhinoDoc.ReplaceObject, .DeleteObject and .AddObject to get a notification about the lines being moved (a move is basically a replacement, i.e. delete followed by add). Then, you can show/update the intersection in a display conduit or add it to the document.


#3

Thxs for a hint.

I was trying to attach event listener to RhinoObject. there was .OnTransform, .OnPick.
RhinoDoc.ReplaceObject works well.