Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-22 Thread Wayne Stambaugh
Jon, This fixed the issue so I merged your patch. Thanks. Wayne On 2/21/2018 8:46 PM, Jon Evans wrote: > Here's a patch that fixes the issues observed. > I have changed the algorithm to a simpler one that should be more > bulletproof. > I think the optimal approach for complicated footprints

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-22 Thread Andrzej Wolski
It works fine now, thanks. Andrzej W dniu 2018-02-22 o 02:46, Jon Evans pisze: Here's a patch that fixes the issues observed. I have changed the algorithm to a simpler one that should be more bulletproof. I think the optimal approach for complicated footprints is still not this way, but that

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Jon Evans
Here's a patch that fixes the issues observed. I have changed the algorithm to a simpler one that should be more bulletproof. I think the optimal approach for complicated footprints is still not this way, but that would require more time to tweak and optimize (i.e. generating some kind of bounding

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Jon Evans
I'll be able to look at it this evening. Can report then whether or not I will have a patch tonight. Up to you whether or not that is too long of a delay. -Jon On Wed, Feb 21, 2018 at 1:32 PM, Wayne Stambaugh wrote: > Jon, > > Would you please take a look at this as

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Wayne Stambaugh
Jon, Would you please take a look at this as soon as possible? If you cannot get to it in a reasonable amount of time, please let me know so I can back out your polygon hit test patch. We need to be able to select footprints. Thanks, Wayne On 2/21/2018 11:41 AM, Andrzej Wolski wrote: > After

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Wayne Stambaugh
If you could get it done by Friday before I roll out rc1, that's fine. Wayne On 2/21/2018 1:37 PM, Jon Evans wrote: > I'll be able to look at it this evening.  Can report then whether or not > I will have a patch tonight.  Up to you whether or not that is too long > of a delay. > > -Jon > > On

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Andrzej Wolski
Seems to happen when there is no closed outline drawn in the footprint. Another test cases in an attachment. Andrzej W dniu 2018-02-21 o 17:41, Andrzej Wolski pisze: After this patch, I can no longer select some footprints by clicking inside their area. Please see the board in an attachment.

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-21 Thread Andrzej Wolski
After this patch, I can no longer select some footprints by clicking inside their area. Please see the board in an attachment. Andrzej W dniu 2018-02-20 o 16:44, Wayne Stambaugh pisze: Jon, I merged your patch. Thanks, Wayne On 2/18/2018 7:01 PM, Jon Evans wrote: Hi Wayne, In my testing

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-20 Thread Wayne Stambaugh
Jon, I merged your patch. Thanks, Wayne On 2/18/2018 7:01 PM, Jon Evans wrote: > Hi Wayne, > > In my testing there is no performance impact, but more testing is > welcome.  It shouldn't be doing the calculation on too many objects in > general, since this is a "second pass" hit test that

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-19 Thread Wayne Stambaugh
Jon, This looks good to me and seems to work as advertised so unless anyone else can think of a reason not to merge I will try to get it merged in the next day or so. Wayne On 02/18/2018 07:01 PM, Jon Evans wrote: > Hi Wayne, > > In my testing there is no performance impact, but more testing

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-18 Thread Jon Evans
Hi Wayne, In my testing there is no performance impact, but more testing is welcome. It shouldn't be doing the calculation on too many objects in general, since this is a "second pass" hit test that applies to modules that have a bounding box overlapping the mouse cursor. However, I did some more

Re: [Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-18 Thread Wayne Stambaugh
Hey Jon, Did you notice an performance hit with your patch? Obviously there is going to be more overhead calculating a polygon versus a rectangle. I just want to be sure we are not causing any usability issues due to the polygon calculations. Thanks, Wayne On 02/18/2018 12:10 PM, Jon

[Kicad-developers] [PATCH] Use polygonal hit testing for module selection

2018-02-18 Thread Jon Evans
Hi all, The attached patch adds some plumbing to calculate and make use of a polygonal bounding area for modules. It fixes the below issue and in general improves the accuracy of selection in my testing. This mechanism could be extended to other objects besides modules if it's useful. I