Commit Graph

16 Commits

Author SHA1 Message Date
Seth Hillbrand f3d65b5156 Revise method of selecting footprints in contrast
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.

The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints.  This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.

For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it.  IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox.  Instead, we
filter footprints based on the hittest of each element.  This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-01 10:43:13 -07:00
Jeff Young 493828cc6b Eradicate a bunch of calls to dyn_cast.
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2023-06-25 11:10:07 +01:00
Jeff Young 0fde88eefc Protect custom rule function caches from transient items. 2023-06-21 18:14:41 +01:00
Jeff Young 94a23971cc Performance improvements. 2023-06-21 17:00:32 +01:00
Mike Williams a859b25d2c PCB: convert footprints to use PCB_FIELDs for fields from schematics 2023-06-20 18:34:52 +00:00
Mike Williams 028f500cd9 Footprints: rename properties to fields for consistency with symbols 2023-06-20 18:34:52 +00:00
Jeff Young 4473ebb02d Clear arcs before deflating area outline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15007
2023-06-20 14:19:21 +01:00
Jeff Young ecb2fcd559 Don't trip over null strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14989
2023-06-18 20:28:11 +01:00
Jeff Young f5791f5dc6 Left some fixes out of previous commit. 2023-05-29 16:22:24 +01:00
Jeff Young e1c9e0e6fc ADDED memberOfFootprint() to DRC custom rules functions.
Also added memberOfGroup(), and deprecated memberOf().
2023-04-12 14:06:09 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
Jon Evans 459473ccc3 PNS: Safety for evaluating item nets for rules
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
2023-02-17 19:56:02 -05:00
Jeff Young 362d85ef50 Special selection mode when in high-contrast with courtyard layer active.
Fixes https://gitlab.com/kicad/code/kicad/issues/13521
2023-02-11 21:11:07 +00:00
Jeff Young 6ed90134c7 Check for collisions on common layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/13438
2023-01-08 20:53:15 +00:00
Jeff Young 8260f0ee13 Add support for unitless values to PCB_EXPR_EVALUATOR.
Fixes https://gitlab.com/kicad/code/kicad/issues/13016
2022-11-29 14:24:20 +00:00