Commit Graph

866 Commits

Author SHA1 Message Date
Seth Hillbrand 65fd8d22ed Mask aperture pads can have multiple layers
But as long as they don't have copper, we should treat them as mask
apertures

(cherry picked from commit 02cdb0c6b9)
2024-04-16 15:54:36 -07:00
Seth Hillbrand ae11213622 Handle small holes in DRC Connection width test
If there is a small hole (smaller than the conn width), we can loop
around in a circle checking all points and not move past the mimimum
distance.

To avoid this, if we detect a loop, we exit the substantial checker.
This should return with true because a large hole will return true and
we are only checking to see if there is a minimum amount of copper
between two open areas

(cherry picked from commit c841d0df6d)
2024-04-01 17:55:29 -07:00
Jeff Young ccd052cc99 Attempt to prevent KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560

(cherry picked from commit a53bc9e026)
2024-03-29 17:46:04 +00:00
Jeff Young 4c78652690 Ignore graphic shapes that implement netties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17223


(cherry picked from commit 88c1fa3e26)
2024-03-23 13:19:37 +00:00
Jon Evans b9d3b571bc Allow specifying a minimum for a via_count constraint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17234


(cherry picked from commit 3a3ceb8ffc)
2024-03-14 21:01:30 +00:00
Jeff Young 4dca966c5d Don't test non-overlapping non-through-hole vias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17426

(cherry picked from commit a091767551)
2024-03-14 18:07:28 +00:00
Jeff Young 6ced4f72d0 Further improvements to cache locking.
In particular, don't hold cache lock while doing computations.
2024-03-07 13:02:16 +00:00
Armin Schoisswohl 0f8dac81cb add include <mutex> to fix compilation under linux 2024-03-07 12:13:42 +00:00
Armin Schoisswohl 1f1b97212b change m_CachesMutex to shared_mutex and do shared locking for read access in zone BBox calculations 2024-03-07 12:13:42 +00:00
Jeff Young 04440d8506 Check env vars when testing for unresolved variables.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17174
2024-02-28 17:16:20 +00:00
Ian McInerney d3befd8bb8 Remove dummy items from group before they are deleted
Board items should not be in a group when they are deleted, but these
are dummy ones, so their group membership doesn't matter.

Fixes KICAD-7P0
Fixes KICAD-6VX
Fixes KICAD-7KK
Fixes KICAD-6VH
2024-02-16 12:20:00 +00:00
Marek Roszko f73d45b0cf Add $schema prop to drc/erc 2024-02-13 19:08:55 -05:00
jean-pierre charras 7e4e80a2e5 DRC library parity attribute tests: disable DNP and EXCLUDE from BOM.
They are related to a design, not to a footprint, and are tested in
schematic parity tests.
2024-02-12 10:55:56 +01:00
Marek Roszko d694bb5960 Use file name rather than path for erc/drc json and text reports 2024-02-11 20:16:22 -05:00
Marek Roszko e51ddc52b7 Fix crash writing json drc report 2024-02-11 17:36:56 -05:00
Jeff Young 1e6986d2f5 Don't report starved thermals when connected only to isolated islands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16866
2024-02-07 14:09:03 +00:00
Jeff Young 1ff36f23b8 Clean up stale TODOs. 2024-02-05 15:49:57 +00:00
Jeff Young ee5e2e56c0 Naming conventions; no functional changes. 2024-01-29 16:00:06 +00:00
Jan Wichmann b6ddef7162 pcbnew: Added missing DRC checks for value and library-link between symbol and footprint 2024-01-24 12:35:51 +00:00
Jon Evans c143be6279 Pads need to be included in collection for length checks
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16724
2024-01-23 22:08:08 -05:00
Jeff Young 13935399a5 Second part of d854de9d68
This one for symbol <-> footprint.  (Original was for
lib footprint <-> board footprint.)

Also fixes a major bug in DRC where we bail out of parity
checking if DRCE_MISSING_FOOTPRINT is set to ignore (or
overflows).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16671
2024-01-20 18:41:35 +00:00
Jeff Young d854de9d68 Add missing DRC checks for footprint attributes.
Requires string change, but it's a bug, and worse, a DRC
bug.  I did minimize the changes by using a single error
message string that then has the various settings (which
are already translated) put into it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16671
2024-01-20 17:22:19 +00:00
Seth Hillbrand 121271bd0a Allow users to specify no minimum text width in DRC
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16596
2024-01-16 16:24:18 -08:00
Jeff Young 91d144c720 Do NOT return false from a visitor unless you want to stop visiting!
This fixes a bug where DRC would bail out early if any of
the colliding objects was a free pad.
2024-01-04 14:35:08 +00:00
Jeff Young aa4107ce2d Code cleanup (and Coverity quieting). 2024-01-04 14:35:08 +00:00
Jeff Young 1e71899611 Thread pad & graphic clearance testing.
This allows us to poll the event loop & update the progress
on a time interval rather than on an items-completed
interval (the later of which can't easily take host machine
performance into account).

Also fixes a bug where we'd bail out of QueryColliding if
we ever found !testClearance && !testShorting && !testHoles.
2024-01-03 13:49:29 +00:00
Jeff Young 8993cd12a6 Thread cache generator.
This allows us to poll the event loop & update the progress
on a time interval rather than on an items-completed
interval (the later of which can't easily take host machine
performance into account).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16506
2024-01-03 12:45:05 +00:00
jean-pierre charras c8c0685ff2 drc/drc_test_provider_library_parity: fix issues when testing graphic items:
- fix tests for zones: they were rotated/moved twice before comparing
- fix tests for some graphics (RECT and POLYGONS): they were not always compared
using the right order.
Fixes #16501
https://gitlab.com/kicad/code/kicad/-/issues/16501
2024-01-03 12:43:24 +01:00
Jeff Young 15a2d65a0c More explicit pad-missing message when net involved.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16489
2024-01-01 10:51:34 +00:00
jean-pierre charras 2051ad8123 Fix a DRC issue about thermal reliefs.
They can be not fully counted when a rect pad has the same (or a smaller) size
as the thermal spoke width, due to a bad bounding box used in calculations.
Fixes #16265
https://gitlab.com/kicad/code/kicad/-/issues/16265
2023-12-23 19:50:11 +01:00
Jeff Young 8251fca66a performance efficiencies 2023-12-18 17:39:29 +00:00
Jeff Young d8d71a8a6e Honour "report all errors" for track/edge collisions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16268
2023-12-10 23:04:57 +00:00
jean-pierre charras e3bbe32793 drc_test_provider_library_parity: Better algo to compare footprint graphics
Instead of changing the footprint in test to have a non flipped, non rotated
fp, change the footprint template from library to have the same transform.
It reduce problems like rounding and graphic shape convert for rectangles.
Fixes #16075
https://gitlab.com/kicad/code/kicad/-/issues/16075
2023-11-13 18:38:30 +01:00
jean-pierre charras d5a5d25623 rework on commit b564d0713c50e50282a0545ee23bb3ec51906cfd: better fix 2023-11-13 11:16:21 +01:00
jean-pierre charras b564d0713c DRC: fix one of some things that can create false positive.
in bool shapeNeedsUpdate(), if a shape is a rectangle and the other is a polygon,
we need to try to convert the polygon to a rectangle for comparison, because some
transforms ( and especially PCB_SHAPE::Normalize() ) can convert a polygon to a rectangle
So a poly and a rectangle can be in fact the same shape

Partial fix of bug 16075.
2023-11-12 20:19:09 +01:00
Jeff Young e6081cf31a Use position of isolotaed spoke when reporting it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16058
2023-11-10 12:49:19 +00:00
Jeff Young 7f8e397dfb Behave (or assert) when source or target are null or dirty. 2023-11-01 17:11:42 +00:00
Jeff Young fc0017fc95 Normalize rects higher up.
We don't want to normalize footprint children to their board-relative
coordinates.
2023-10-29 11:45:16 +00:00
Jeff Young c1f01877a8 Improve length calculation for vias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10690
2023-10-28 13:14:21 +01:00
Jeff Young 791aa64950 Functionally it's a "reference image".
The implementation happens to be a "bitmap".

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15932
2023-10-24 15:44:21 +01:00
Jeff Young 09e92fc3fc Cap self-intersecting outline violations. 2023-10-22 20:35:14 +01:00
Jeff Young 8f96009fe5 Hints and fixes for separate checking of milling cutter size and drill size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15886
2023-10-20 12:13:09 +01:00
Jeff Young d51e058e24 Move diff-pair netname resolution to BOARD.
Also adds reporting of dp gap constaints and max uncoupled to track
selections, and max uncoupled during routing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13748
2023-10-15 22:46:23 +01:00
jean-pierre charras 57efde1bbb Pcbnew: rename ZONE* m_SolderMask to m_SolderMaskBridges
(It is a container to build bridges on solder mask layers by DRC, not real zone)
Disable also this special zone selection by adding it in
PCB_SELECTION_TOOL::itemPassesFilter
2023-10-13 09:57:21 +02:00
Jeff Young d04641c868 ADDED: support for editing target length in Meander Properties dialog.
Also supports overriding the custom rules.
2023-10-12 17:54:34 +01:00
jean-pierre charras a7d540ce94 TestBoardOutlinesGraphicItems(): add missing case.
DRC_TEST_PROVIDER_MISC::testOutline(): use a smaller size to dectedt small items.
2023-10-12 15:53:21 +02:00
jean-pierre charras 499f3ca95b DRC_TEST_PROVIDER_MISC::testOutline(): add test to detect questionable items.
Graphic items (segments, rects, circles) on Edge.Cuts can create issues when
building board outlines, when they are very small (a few nm in size), because
they are not easily handled when trying to search connected graphics.
Also protect RC_ITEM::SetItems() against null pointer.
Fixes #15865
https://gitlab.com/kicad/code/kicad/-/issues/15865
2023-10-12 14:48:24 +02:00
Jeff Young 83d896951a Apply epsilon more uniformly to footprint checks.
Rotation can cause round-off errors even in ints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15838
2023-10-06 21:04:23 +01:00
Alex Shvartzkop d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03:00
Jeff Young 8760bd8c80 Reconcile "apply defaults to new footprints" with DRC lib checks.
Moves apply defaults settings to Board Setup (where they were
duplicated anyway due to an earlier botched merge).

Modifies the apply-to-graphics algorithm to skip copper shapes.

Modifies DRC library check to skip STROKE_PARAMS for non-copper
shapes.
2023-10-02 22:10:13 +01:00