From: Diederik v. L. <ma...@di...> - 2014-07-28 19:41:51
|
Hi guys, Sorry for not responding earlier, but I've been a bit too busy lately. The snapping mechanism only relies on one nearest point being returned for every path in a pathvector. I believe that allNearestPoints() in pathVector.cpp is mine. Other than that, I believe that Krzysztof's proposal makes sense, but admittedly I've never looked at the other allNearestPoints() methods. Those are the ones that Krzysztof is reffering to. Diederik On Sat, Jul 19, 2014 at 4:42 PM, Johan Engelen <jbc...@sw...> wrote: > Hi Krzysz, Diederik, > Seems to make sense. > You may want to discuss this with someone who (I think) uses this method a > lot for snapping: Diederik. > > Any objections Diederik? > > -Johan > > > On 19-7-2014 2:40, Krzysztof Kosiński wrote: > >> This method is a little pointless, because it will return more than >> one point only if they are at exactly the same distance. Due to >> limited precision of doubles, this will only happen in very specific >> circumstances - basically only if someone deliberately constructs the >> object and the point with carefully chosen values. It's nearly >> impossible to get more than one result by manipulating shapes on the >> screen. Therefore arbitrarily picking one of the points doesn't change >> much. >> >> It would be more useful if the method accepted a tolerance parameter >> and returned the local minima of each subset of the shape not further >> than this tolerance from the true nearest time. The attached image >> explains this. >> >> Regards, Krzysztof >> > |