Commit Graph

856 Commits

Author SHA1 Message Date
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
Jeff Young 2d3a8ee4c9 Readability and comments. 2023-10-02 20:56:16 +01:00
Jeff Young 9805aca5a0 Handle backslash-escaped quotes in libeval.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15786
2023-09-30 17:38:44 +01:00
Jeff Young e1c51ed192 A few performance improvements from profiling.
Most of them are very small; the removal of the Fracture() in
DRC_TEST_PROVIDER_COPPER_CLEARANCE::testZonesToZones() is the only
significant one.
2023-09-29 21:54:59 +01:00
Marek Roszko 6b12a12b3e On second thought rename PROJECT_PCBNEW to PROJECT_PCB 2023-09-27 23:15:54 -04:00
Marek Roszko 7e8b18035f Eliminate the conditional pcbnew/cvpcb definition of PROJECT 2023-09-27 20:53:46 -04:00
Jeff Young d428b0e20e Improve SameLogicalPadAs() shorting nets test.
This is required to support 4cd26ab6bc.
2023-09-24 16:19:26 +01:00
Seth Hillbrand f4afd7e363 Thread testTrackClearances
We are frequently testing thousands of track segments.  They can each be
uniquely tested in parallel with reporting and marking guarded by
mutexes.  This speeds up the DRC tests substantially

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15466
2023-09-20 19:51:33 -07:00
jean-pierre charras f2f572c370 drc_test_provider_text_dims.cpp: ensure glyphs to test are OUTLINE_GLYPH.
For non Kicad font texts with a overbar, the overbar is not a OUTLINE_GLYPH.
Fixes #15604
https://gitlab.com/kicad/code/kicad/-/issues/15604
2023-09-09 10:28:28 +02:00
Marek Roszko 4d77fd48ef Shove thread_pool to core 2023-09-06 17:50:12 -04:00
Jeff Young 55a7b9e6bf More consistent naming.
(Also better differentiates the PCBEXPR_ classes from PCB_
objects.)
2023-08-21 15:26:33 +01:00