Is there an easy way to detect if two paths intersect? I want to make a circular XY pad, but I want the outer perimeter of the draggable XY cursor (tiny circle) to stop at the pad's boundaries (larger circle). Ideally, the script would work for arbitrary path shapes.
I can check if the pad's boundaries contains my mouse cursor position while clicking or dragging, but that does not account for the shape of the draggable XY cursor. It also leads to a case where the draggable XY cursor stops in an odd position if I drag my mouse quickly outside of the pad's boundaries.
See the snippet for what I've done so far.
HiseSnippet 1359.3ocsW02SaaDF+LfaW7V2Vk1GfS8eVPxMDfR2jPSsk.LEsRaTSWEUHT0E6KNmv4NK6y.Vq7O6S19HsuAaOO2YmbYjzMgVQQDtmW+cOucOLHWEwKJT4DuVusJiS79J+gUR8jdSXBIo+gDuuz+nzTQVA+z2SNnJiUTviIddq+yn.ds1fX94Oe1ArTlLhOmDg7NkHh+RwTgdN0AO+WDooGyh4uUL0Q5m779QJYOUppD.y59cIYrnKXI7WwPwVym3cuihEZU9PMSyKHdabfJtZ3D0URq7uSTHFkxwCaSFBFxR9XUZLhXjJo2DQZ7flKcAArxf4gf0sgfuy+DQrXF84ghu0vfNWC23g2ZKBu0W.da6ButNvaIPxyARaXgzC8GFkKxzy4XSM8kZd9XFD1cghUVxZe8886o.Ij5NSYWvONGNLSi1Osa2PJ7qM2OHXqsnCXRdZ.jCJzzKY4zLY5oum9SzFKjv08TSyTR3P6GY39HP0OI6NEHUoNWk1iklNBxnsURCyZx0NuWNGhZTvgYrXJSFSiJygqoCd.8UWwiGvzSbPUjQQjXavTykNVoWoTf+NPjPiD4Qobvg5I21Mu.z.LvY6rWH7AhROdut0ec99ANXoCKNttAositV27RgVCtX4dBfXiW5F1MbW7CXafrqMqkpNNchprfSm.AnTgLIvDIwfrg9rP73RYjVnjs4WB29MC9sfVhwT6oNw4rD5G+H0dJJUDcAOdyfVfPsfOfSzSDETv9bZLWyizEzoF2loJDnYoWI.Qjfb7lvk4tERGUpoPEu0LwJZeJV2QEZ5Up7KnrB2rXGHTngVqh1LYEXbgTSExnzRncE9CL9rI8YfsP7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