Commit Graph

630 Commits

Author SHA1 Message Date
Jeff Young c7746fa000 Fix copy pasta error.
Fixes https://gitlab.com/kicad/code/kicad/issues/11986
2022-07-08 17:44:36 -06:00
Jeff Young 521b231873 Don't zero out width of shapes on Margin, only Edge_Cuts.
Fixes https://gitlab.com/kicad/code/kicad/issues/11967
2022-07-08 17:27:05 -06:00
Jeff Young 8a9bf02b7e Smarten up silk clearance & tented item handling.
The inspection tool will report whether or not the item is tented
(indicating in that case that any clearance will only be applied
to any hole).

The DRC test ignores tented items without a hole, and runs the
clearance test against the hole for items with a hole.

Fixes https://gitlab.com/kicad/code/kicad/issues/11954

Fixes https://gitlab.com/kicad/code/kicad/issues/11951
2022-07-08 17:27:05 -06:00
Jeff Young f611f9f5d3 Allow zone connection rules to target footprints.
If the pad is set to inherit and a rule targets its parent footprint,
then that rule should fire.
2022-07-08 17:27:05 -06:00
Jeff Young fa2e43f696 Reduce noise in board <-> library footprint tests. 2022-07-08 17:27:04 -06:00
Seth Hillbrand 7f9f37e507 Avoid double-caching FP zones
Leads to crashes/invalid data when multi-threading hits both at same
time
2022-07-05 20:07:18 -07:00
luz paz af6ba1a16e Fix typos in pcbnew sub-directory
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-06-30 09:39:45 -04:00
Seth Hillbrand 03c279ffd4 ADDED: Threadpool
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs.  This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta.  It
also avoids the heuristics needed to determine the optimal number of
threads to spawn
2022-06-24 22:59:24 +00:00
Seth Hillbrand a852286eb5 Cleanup compile warnings 2022-06-21 17:04:56 -07:00
Jeff Young 82ebc247b8 More performance enhancements for DRC. 2022-06-18 19:47:11 +01:00
Jeff Young 97b0005780 More caching for DRC.
Also fixes a bug where some physical clearance tests would be run even
if the clearance was 0 (or if the rule was set to IGNORE).
2022-06-17 23:58:31 +01:00
Seth Hillbrand 4043dca613 Push wxString allocation to smaller context
Prevents creation of new wxString on stack for each clearance check
2022-06-16 08:26:28 -07:00
Seth Hillbrand 5327b10064 Remove shared wxString instance in DRC
Threaded DRC access will write to this string, re-allocating the memory
without any synchronization between threads using the string.  Comment
adding this listed performance as a reason for using shared strings.
Measured performance does not seem noticeably different in either case,
even with high-error count boards.  If there is a case where the
performance is limiting, we can replace these wxStrings with
std::wstring and utilize fmt

Fixes https://gitlab.com/kicad/code/kicad/issues/9888
2022-06-15 16:46:03 -07:00
Jeff Young 5e80e2a421 58f553a9ca requires that cache be layer-sensitive.
Fixes https://gitlab.com/kicad/code/kicad/issues/11814
2022-06-15 00:30:11 +01:00
Jeff Young d14fd5a9da Fix logic error with silk overlap test. 2022-06-04 19:34:24 +01:00
Jeff Young 8b75a32cfa We only want "actual" shapes, not anything derived from SHAPE.
Also fixes a bug where GetParentFootprint would get confused by
groups.

Fixes https://gitlab.com/kicad/code/kicad/issues/11741
2022-06-04 00:24:27 +01:00
Jeff Young d2a9cbe6e8 Use effective width for DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/11740
2022-06-03 23:27:10 +01:00
Jeff Young 37838dffb9 Make sure physical_clearance rules are run against courtyard layers. 2022-05-10 23:02:53 +01:00
Jeff Young ecf6773f74 Remove dead code. 2022-05-07 21:10:04 +01:00
Jeff Young 30ecca464d Rename mechanical_clearance -> physical_clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/11554
2022-05-06 15:54:46 +01:00
Jeff Young dfdedfa605 Fix some issue with NPTH pads with holes same size as pad. 2022-05-06 00:06:00 +01:00
Jeff Young f590dcf513 Fix a couple of typos. 2022-05-06 00:06:00 +01:00
Jeff Young 5d0d2201f3 Improve clearance report messages.
Removes some duplicated terms; puts in some more headers to make
visual parsing easier, and makes non-connected-pads report the correct
data.

Also fixes a bug where zone-connection overrides of none weren't getting
handled correctly.

Fixes https://gitlab.com/kicad/code/kicad/issues/11544
2022-05-03 16:30:04 +01:00
Jeff Young bf2566a44f Post-process board min clearance rather than building it in to netclasses.
The later makes the diagnostic messages harder to decipher.
2022-05-03 13:39:14 +01:00
Jeff Young d192d3c31d Better violation title for disabled layers check.
Fixes https://gitlab.com/kicad/code/kicad/issues/11451
2022-04-25 09:39:49 +01:00
Jeff Young f0dab2e07b Fix some layer handling issues. 2022-04-23 21:29:46 +01:00
Jeff Young e6684bf7c7 Add footprint checks to board-level DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/11437
2022-04-23 11:34:18 +01:00
Jeff Young 4525b1f085 More consistency in DRC error messages. 2022-04-23 09:39:34 +01:00
Jeff Young 9ff1ae5bdc Better inspection reporting for netclasses, custom rules and DRC. 2022-04-17 00:33:56 +01:00
Jeff Young 7f3a75bccd Add a bunch more inspections for rule resolution. 2022-04-15 22:10:13 +01:00
Seth Hillbrand 819276bd98 DP tolerance needs to be 1IU on each axis
ApproximatelyParallel will only check for parallel within 1 IU, so a 1x1
SEG will always be parallel and the projection is invalid

(cherry picked from commit d0796399a2)
2022-04-11 16:58:10 -07:00
Jeff Young 82820d4b1c Cleanup. 2022-04-09 20:39:35 +01:00
Jeff Young 722b2588f4 Better error reporting for DP uncoupled length.
Fixes https://gitlab.com/kicad/code/kicad/issues/10087
2022-04-08 11:40:53 +01:00
Jeff Young a118249093 NPTHs obey HOLE_CLEARANCE, not CLEARANCE.
Also, plating thickness appears on both walls, so diameter is drill
plus 2X plating thickness.
2022-04-04 20:43:08 +01:00
Jeff Young f7cdc7af75 Apply a more sophisticated test for ignoring isInCoupledDiffPair.
The basic problem is that the DRC engine does length testing and skew
testing by collecting all the diff pair constituent parts and pairing them
itself.  Since each part is collected on its own, we need to ignore the
'B' unit when evaluating any conditional expressions.  However, doing this
in general means that when evaluating "OwnClearance()" we also ignore the
'B' unit and return the diff pair CLEARANCE_CONSTRAINT when we shouldn't.

This implements a more discerning test which know what the current requested
constraint is when evaluating expressions.

See also https://forum.kicad.info/t/solved-custom-differencing-rule-not-working-drc/34034/6

Fixes https://gitlab.com/kicad/code/kicad/issues/11314
2022-04-02 15:12:42 +01:00
Wayne Stambaugh 150859c973 Try Coverity fixes that don't break unit tests. 2022-03-25 16:49:29 -04:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Jeff Young b679a21651 Zero out parent rule when overridden by local property.
Fixes https://gitlab.com/kicad/code/kicad/issues/11197
2022-03-21 20:49:35 +00:00
Jeff Young cf611f1742 Better safety around layersets. 2022-03-21 18:19:00 +00:00
Jeff Young 5aa561abe1 Add overlapping pad test and share some tests between board & fp editor DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/10086
2022-03-18 19:58:42 +00:00
Jeff Young 0f359c8a3b Careful of calculated fields when comparing board FPs with library.
Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-17 13:19:25 +00:00
Jeff Young 62f813fddc Better error reporting for PTH pads. 2022-03-16 14:56:32 +00:00
Jeff Young f596ae3487 Allow mechanical-clearance checks between edge_cuts and other layers. 2022-03-16 14:56:32 +00:00
Jeff Young 600dcd31ad Allow track board edge clearance violations inside the holes of castellated pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/10970
2022-03-15 00:05:23 +00:00
Jeff Young 8d682002c3 Fix previous breakage from shared_ptr going out of scope.
Fixes https://gitlab.com/kicad/code/kicad/issues/10970
2022-03-14 23:57:50 +00:00
Jeff Young e7bf4ab8fa Separate board-edge silk clearance from mask-edge silk clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/10970
2022-03-14 20:19:09 +00:00
Jeff Young 2ec21c7720 Don't check for board edge collision on castellated pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/10970
2022-03-14 20:19:09 +00:00
Jeff Young 65185f53a1 Rotate fp zones before comparing with library versions.
Also includes some performance fixes to not copy around triangulation
data when it's not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
Jeff Young ced1e68ea1 A bit of wxT(). 2022-03-13 16:09:06 +00:00
Jeff Young db0b733be5 Clear DRC caches before running soldermask tests again.
Fixes https://gitlab.com/kicad/code/kicad/issues/10922
2022-03-12 19:44:34 +00:00