Hot Door CORE Forum
HitData has trouble recognizing in/out control points - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Bugs (http://hotdoorcore.com/forum/forumdisplay.php?fid=5)
+--- Thread: HitData has trouble recognizing in/out control points (/showthread.php?tid=159)



HitData has trouble recognizing in/out control points - Rick Johnson - 11-22-2017

It seems there's something strange regarding tools recognizing control points with either HitData or cursorHitData. I have better luck when the hit request asks only for control points (in and out) or when the tolerance is increased to 4 or more. A cursor is more likely to recognize a control point at 100% or smaller, while zoomed in to, say, 400% it usually can't detect a control point. When it does, it senses the control point several pixels below the actual control point. Recognizing anchor points and segment interiors works flawlessly. Is there a trick to get more reliable results?


RE: HitData has trouble recognizing in/out control points - Rick Johnson - 11-25-2017

After refusing to give up on this, I discovered that the control points HitData can find are the ones lying inside of the stroke bounds. Those between the control bounds and stroke bounds aren't recognized. I hope this helps make a fix a little easier.


RE: HitData has trouble recognizing in/out control points - Rick Johnson - 11-29-2017

As it stands now, CORE cannot be used to create a plugin for a tool that adjusts segment control handles until it's updated to recognize control points outside of the path bounds. Is this something that is likely to be addressed soon, or would you recommend I use SDK hit functions instead? The SDK route is not an attractive alternative for many reasons, but a plugin I now have in development needs reliable control point hit detection.


RE: HitData has trouble recognizing in/out control points - brendon - 12-02-2017

Thanks for pointing this out. We never had a reason for this and after talking with Garrett about it, I think it will need much more time than we have at the moment. It's now on the list for a future version, but you should use the SDK for now.


RE: HitData has trouble recognizing in/out control points - Rick Johnson - 12-02-2017

Thanks, Brendon. As a workaround, I added a function that does a HitTest for control points only using both CORE and SDK methods, then returns CORE HitData. If the SDK found a control point that CORE didn't, it returns HitData with the corresponding segPoint hit, and sets variables for the actual hit type and location. I'd rather return a correctly-structured CORE HitData, but this works well enough for now.