Commit Graph

711 Commits

Author SHA1 Message Date
Jeff Young 492e6548ff If item is on mask layer then we won't call it again on copper layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/13075
2022-12-10 13:51:00 +00:00
Jeff Young 295ef6588d Fix uninitialized variable. 2022-12-05 14:42:05 +00:00
Seth Hillbrand 92266635cc Add an advanced config value for the minimum sliver
The hard coded value was too small for certain calculations.  Better to
have a configurable value that is initially set to our error level to
allow for deviations that don't meet the visibility test for spikes.
These have become more apparent with Clipper2
2022-12-03 16:03:43 -08:00
Seth Hillbrand b5bd633625 Strict-order points in connection_width
The connection width checker uses morton codes to order elements.  The
sort should be primarily morton-based but needs to be stable in order to
ensure that nextZ/prevZ elements are properly placed as the actual
next/prev elements in the list.  Otherwise, hitting a fracture point
might make us skip in the wrong direction

Fixes https://gitlab.com/kicad/code/kicad/issues/12831
2022-12-03 16:03:43 -08:00
Jeff Young 3501ad1b4d Record layer for starved thermal exclusions. 2022-12-01 18:04:34 +00:00
Jeff Young 19eab62516 More safety around ratsnest state.
Fixes https://gitlab.com/kicad/code/kicad/issues/13011
2022-11-30 13:00:21 +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
Seth Hillbrand d232ade752 Remove cloned items from groups
When destroying, the group must be null and there's no group purpose in
the DRC checks
2022-11-28 09:11:20 -08:00
Jeff Young 1e3186b9cb Allow pad-to-copper-graphic collisions in net-ties.
This is done under the same conditions as track-to-copper-graphic --
the pad or track must also collide with a net-tie pad, and the pad or
track to copper-graphic collision must be within the boundary of said
pad.

Fixes https://gitlab.com/kicad/code/kicad/issues/13008
2022-11-26 15:04:33 +00:00
Jeff Young 4aff5c7618 Keep courtyard caches alive during move.
Fixes https://gitlab.com/kicad/code/kicad/issues/12999
2022-11-25 17:20:11 +00:00
Jeff Young 5de4bfde93 Move drilled NPTH holes to hole-clearance checking. Edge-clearance
checking is just for milled holes (slots).

Fixes https://gitlab.com/kicad/code/kicad/issues/12980
2022-11-23 13:31:51 +00:00
Jeff Young 97fd99ec99 Re-resolve netclasses after assigning netclass to pattern.
Fixes https://gitlab.com/kicad/code/kicad/issues/12965
2022-11-22 14:54:08 +00:00
Alex 5e7c4b734c Small optimizations in DRC and SHAPE_POLY_SET. 2022-11-17 02:10:22 +05:00
Jeff Young 619c340d92 Handle holes when building outlines for copper sliver checker.
Fixes https://gitlab.com/kicad/code/kicad/issues/12797
2022-11-01 23:33:44 +00:00
Wayne Stambaugh 6a0db3e7e2 Fix Coverity warnings. 2022-10-26 14:39:44 -04:00
Jeff Young 9380b9a451 Trim pad layers to current board before comparing.
Fixes https://gitlab.com/kicad/code/kicad/issues/12758
2022-10-25 23:53:10 +01:00
Jeff Young cef7cd8f7c Move default font to RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/12723
2022-10-22 21:32:42 +01:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Jeff Young de5980b92e Share more of the courtyard collision highlighting code. 2022-10-14 10:42:07 +01:00
Jeff Young 11dc5424cb Pull interactive courtyard checker out of move tool to share with router.
Fixes https://gitlab.com/kicad/code/kicad/issues/12594
2022-10-14 00:48:37 +01:00
Jeff Young 098e96f1c7 Use more precise formatting in DRC messages when less precise values are identical.
Fixes https://gitlab.com/kicad/code/kicad/issues/12587
2022-10-06 22:18:53 +01:00
Jeff Young 9119b5072a Respect DRCEpsilon in diff-pair coupling test.
Fixes https://gitlab.com/kicad/code/kicad/issues/12587
2022-10-06 22:18:53 +01:00
Jeff Young d6c7f46842 Formatting. 2022-10-06 22:18:53 +01:00
Jeff Young 6927e75eae Handle keepout areas with holes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12581
2022-10-06 15:08:56 +01:00
Seth Hillbrand b4f3390626 Drill size is absolute
Use hole plating size for visibility only, not zone filling, routing or
DRC
2022-10-04 09:52:40 -07:00
Jeff Young e49de68a59 Implement a more durable zone bounding box caching strategy.
Fixes https://gitlab.com/kicad/code/kicad/issues/10821
2022-10-01 22:10:43 +01:00
Jeff Young d67437a2aa Move ratsnest exclusion processing to a post-pass.
Also fixes a few cases where we were unnecessarily rebuilding
connectivity more than once for an operation.
2022-09-29 17:08:49 +01:00
Jeff Young 503385f52e Don't use FindNamedPad for net-tie logic. It only reutrns the *first*
pad of a given number.

Also improves other DRC logic to tighten up the net-tie rules now that
we know which pads are allowed to short with which other pads.

Also removes the "Overlapping pads" DRC violation now that we know
whether or not overlapping pads in a net-tie footprint constitute a
short.

Fixes https://gitlab.com/kicad/code/kicad/issues/12506
2022-09-25 17:38:31 +01:00
Seth Hillbrand 0150655ed3 Fix missing DRC check with via
When the via is first and not second in our ordering, the hole-copper
clearance was not checked as the track did not have a hole.

We also calculated the NPTH-via clearance incorrectly in the inspector
2022-09-20 13:43:01 -07:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Marek Roszko 3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko e6ed275c25 Repoint IU_PER_MILS 2022-09-16 21:09:26 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Seth Hillbrand 78acb4f07f Fix unintentional typo 2022-09-14 15:14:35 -07:00
Seth Hillbrand 26a1114e3c Avoid Yields when the results are ready
We always need to check for calculation results before yielding the
system otherwise we will delay outcomes

Fixes https://gitlab.com/kicad/code/kicad/issues/12228
2022-09-14 13:30:04 -07:00
Jeff Young 0df1786456 Improve adherecne to ignored tests. 2022-09-11 19:48:08 +01:00
Jeff Young 3534cfbba8 Allow a single net collision with a free pad. 2022-09-06 13:59:52 +01:00
Jeff Young c0ba1b35bf Remove SMD pad side sanity check. 2022-09-05 10:41:37 +01:00
Jeff Young d5cf7828fa ADDED footprint checks for SMD pad consistency.
Fixes https://gitlab.com/kicad/code/kicad/issues/11736
2022-09-04 10:34:32 +01:00
Jeff Young 854acd4c77 Null-ptr safety for diff-pair-coupling test.
Fixes https://gitlab.com/kicad/code/kicad/issues/12329
2022-09-02 00:49:33 +01:00
Jeff Young 9188838e50 RIP EDA_RECT. 2022-08-31 23:57:24 +01:00
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Jeff Young 2d68cdff94 Better reporting of hole-to-hole clearances and clearance resolutions. 2022-08-29 17:37:49 +01:00
Jeff Young e0f6a6e475 Run hole-to-hole checks on Edge_Cuts layer.
Also makes the flashing logic inside PAD::GetEffectiveShape() easier
to understand.

Fixes https://gitlab.com/kicad/code/kicad/issues/12296
2022-08-29 17:37:49 +01:00
Jeff Young 667a54ad86 Retire insideArea in favour of intersectsArea and enclosedByArea. 2022-08-28 18:02:41 +01:00
Seth Hillbrand 06786c34d7 Blacklist hashes for 2d integer elements
The hash table for integer hashes is extremely limited and places most
elements in the same buckets.  This leads to a linear search time for
structures built on this.

This blocks hashes, directing the coder to utilize std::set or std::map
structures instead of hash tables for implementing integer-based
lookups.
2022-08-26 08:43:37 -07:00