Commit Graph

80 Commits

Author SHA1 Message Date
Jon Evans cd7a2cd807 Fix shadowing fix that caused logic bug and different shadowing 2021-02-27 20:01:14 -05:00
Jon Evans 65531accf6 DRC: allow testing against particular diff pair membership 2021-02-27 19:54:55 -05:00
Jeff Young 3538c8a963 Thread safety for new caches (which are also used during zone fill).
Fixes https://gitlab.com/kicad/code/kicad/issues/7749
2021-02-27 21:33:30 +00:00
Wayne Stambaugh 5ca25a609e Pcbnew: fix shadow variable in expression evaluator. 2021-02-27 12:09:06 -05:00
Jeff Young 4ede4e061e More DRC performance work.
Push DRC zone RTrees into BOARD so that they can also be used by
insideArea.

All these caches are a bit of an encapsulation leak, but they make a
significant impact on performance.

Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-27 11:45:04 +00:00
Jeff Young f226373324 Add cache for insideArea() and insideCourtyard().
Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-26 19:22:25 +00:00
Jeff Young c7a71b44e5 Zones must be entirely inside for insideCourtyard.
This is a huge performance win as otherwise we're doing *lots* of
shape collisions with ground planes.

Fixes https://gitlab.com/kicad/code/kicad/issues/7720
2021-02-26 17:19:48 +00:00
Seth Hillbrand bac7b3e77a Protect against dynamic_cast
Items might not be FOOTPRINT, in which case the dynamic_cast will return
nullptr.  Check for this in the subfunction
2021-02-22 10:12:54 -08:00
Jeff Young ba2d0cdd62 Nullptr safety. 2021-02-22 01:14:06 +00:00
Jeff Young a1f09befe0 Vias are plated holes too.... 2021-02-20 14:13:36 +00:00
Jeff Young 199ef61cdc A footprint isn't "inside" itself.
Fixes https://gitlab.com/kicad/code/kicad/issues/7549
2021-02-15 22:52:12 +00:00
Jeff Young 7b9700d871 Convert insideArea test for zones to be "any copper inside".
The test used to be "entire zone inside", but that didn't work when
we use it to implement "copper pour" keepout areas.

Fixes https://gitlab.com/kicad/code/kicad/issues/7420
2021-02-04 13:43:50 +00:00
Jeff Young beab68db13 Fix bone-headed error in rules optimization. 2021-01-12 12:46:51 +00:00
Jeff Young 63e2046eb0 Performance improvements for DRC rules. 2021-01-11 22:09:36 +00:00
Jeff Young 81aa91ce2a Run insideCouryard on all matching footprints, not just the first.
Fixes https://gitlab.com/kicad/code/kicad/issues/6945
2021-01-05 22:22:25 +00:00
Jeff Young a9d4d9d7f0 Modify insideArea() to return true for zones only when fully inside.
Intersections is enough for other objects.
This is also a bit of a DRC performance improvement.

Fixes https://gitlab.com/kicad/code/kicad/issues/6934
2021-01-05 21:43:04 +00:00
Jeff Young f691828c8f Nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/6862
2021-01-02 22:26:12 +00:00
Jeff Young b123318cf6 Encourage use of full DRC for board & footprint malformed outlines.
It shows much more detail.  Removes some nag dialogs and places
hypertext links in others.

Also fixes the auto-layer-showing to correctly show Edge.Cuts or
F.CrtYd or B.CrtYd for errors relating to them.

Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-20 17:24:52 +00:00
Jeff Young 1ce1e493d6 A rule zone is not really a BOARD_CONNECTED_ITEM.
Or at least it shouldn't always be treated as one.

Fixes https://gitlab.com/kicad/code/kicad/issues/6382
2020-11-15 20:23:15 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 3451ac3088 PCB_MODULE_T -> PCB_FOOTPRINT_T 2020-11-13 15:16:24 +00:00
Jeff Young 522d64968e Yet more module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young 52a46341db More module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Werni a7d5d1f091 Add more consts all over the place 2020-10-27 11:03:35 +00:00
Ian McInerney 31e626f279 Cleanup creation of all our smart pointers 2020-10-26 23:52:44 +00:00
Jeff Young 8c93fc76ae Don't require keepout zones to be named.
insideArea() now takes A, B, a UUID or a zone name.  (Only the UUID
is new.)
2020-10-25 21:08:09 +00:00
Jeff Young 386cefbe84 Do footprint keepouts by courtyard.
Fixes https://gitlab.com/kicad/code/kicad/issues/6162
2020-10-25 18:17:58 +00:00
Wayne Stambaugh 8185a416b9 Fix broken build on Linux with gcc. 2020-10-22 08:36:28 -04:00
Jeff Young 9ff49277e1 Add implicit rule generation for keepout areas.
Also implements collision detection for SHAPE_POLY_SET.

Fixes https://gitlab.com/kicad/code/kicad/issues/6105
2020-10-22 10:41:21 +01:00
Jeff Young 948036372e Ban unitless numbers in DRC rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/6029
2020-10-17 10:58:08 +01:00
Jeff Young ebd5dc81cc Fix some more cases of malformed syntax crashing the compiler.
Fixes https://gitlab.com/kicad/code/kicad/issues/6016
2020-10-15 18:32:52 +01:00
Jeff Young 1703729269 Require explicit decl of maxError and errorLocations.
This should reduce both performance issues and clearance issues.
2020-10-13 13:49:07 +01:00
Jeff Young fdeb340d21 Defensive code against missing nets.
Also adds net re-parenting code to Repair Board.

Fixes https://gitlab.com/kicad/code/kicad/issues/5935
2020-10-10 16:54:19 +01:00
Tomasz Wlostowski b5fa523a11 PCB_EXPR_EVALUATOR: added isDiffPair() API method 2020-10-09 00:01:26 +02:00
Mikolaj Wielgus d14761bee6 Fix inches being sometimes used instead of mils 2020-10-03 20:06:56 +00:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Seth Hillbrand bf3cb0b1d0 Standardize pad type enums 2020-09-30 08:38:35 -07:00
Jeff Young 09ab269770 Support for 'L' in DRC expression language.
Also make layer testing work again against both canonical names and
user names.
2020-09-27 21:33:37 +01:00
Jeff Young a2d9acb647 Rename DRC rule function onLayer to existsOnLayer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-27 21:33:37 +01:00
Tomasz Wlostowski 7b7c3bde88 pcb_new: CONNECTIVITY_DATA now keeps a cache of DRC from-tos 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 8d206a9ef0 PCB_EXPR_EVALUATOR: added fromTo() method 2020-09-27 16:45:46 +02:00
Jeff Young 6fde9ea8a5 Don't leave stale pointers in groups when exchanging modules.
Also simplifies groups so that other areas of code that have to know
about them at least don't have to know as much. One of the simplifications
is to not worry so much about empty groups until save time; others are in
the access logic to parent groups.

Also simplifies user model slightly by removing Merge and Flatten
(which are just ungroup/group and ungroup/ungroup/.../group).

Also allows multiple groups to have the same name.  This is useful when
using groups for a classification system.

Fixes https://gitlab.com/kicad/code/kicad/issues/5788
2020-09-25 18:43:19 +01:00
Jeff Young 3e366a901f Expose pad type in property system.
Also corrects the spelling of some enum items so they match the
menus (otherwise folks will never be able to figure out what they
are).
2020-09-24 14:41:02 +01:00
Jeff Young dba42ebed0 ADDED Properties Dialog for groups.
ADDED memberOf() function for DRC rule expressions.

Also fixes a bug in several of the pickers where the event wasn't
being correctly passed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-24 14:41:02 +01:00
jean-pierre charras ff0a728753 Fix a few I18N issues. 2020-09-14 10:02:07 +02:00
Tomasz Wlostowski 91ce549e63 PCB_EXPR_EVALUATOR: added isMicroVia() and isBlindBuriedVia() built-in methods 2020-09-08 01:31:42 +02:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01:00