Commit Graph

99 Commits

Author SHA1 Message Date
Jeff Young d01b29ab37 Cleanup pad geometry handling.
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.

This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
2020-06-22 22:28:37 +01:00
Jeff Young c57c21f577 Pad bounding radius is from pad centre, NOT shape centre. 2020-06-22 20:36:54 +01:00
Jeff Young 7877e4083e Don't match to an unknown layer. 2020-06-20 14:34:53 +01:00
Seth Hillbrand 32738862b8 Fix build error in linux 2020-06-18 09:52:04 -07:00
Jeff Young 76d1b8bfa1 Make sure selectors match against user layer names.
Also allows for user specification of units in rule constraints.
2020-06-18 15:38:01 +01:00
Jeff Young a7703d1207 Cleanup Graphics to parallel Cleanup Tracks & Vias.
This also allows for easier migration to DRAWSEGMENT::S_RECTs by
auto-converting 4 rectilinear lines to a rectangle.
2020-06-17 18:44:39 +01:00
Jeff Young aeed8e6e2c Finish implementation of DRAWSEGMENT::C_RECT.
It's currently only supported in the Footprint Editor.  It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Jeff Young d7d877241a More explicit type conversion to attempt to fix GCC compile issue. 2020-06-10 13:41:45 +01:00
Jeff Young 4138c8554c Parse DRC rules when closing Board Setup dialog. 2020-06-10 12:03:37 +01:00
Jeff Young f4d8c30f9a Tighten DRC epsilon value until we decide what to do about it. 2020-06-04 18:28:48 +01:00
Jeff Young 36d197d8b6 Increase pad clearance test epsilon to polygonization max error.
Fixes https://gitlab.com/kicad/code/kicad/issues/4604
2020-06-03 18:47:19 +01:00
Jeff Young d2cd4de280 Allow rules to operate on hole when hole-to-track testing. 2020-06-03 12:11:50 +01:00
Jeff Young 6d5b6c8b81 A bit more refactoring to get code out of the DRC tool. 2020-05-29 22:06:48 +01:00
Jeff Young 39ec63c4e9 Fix some inconsistencies in clearance priorities.
Fixes https://gitlab.com/kicad/code/kicad/issues/4555
2020-05-29 13:41:45 +01:00
Jeff Young 9f2be3714f Add unresolved variable testing for worksheet items. 2020-05-28 17:36:22 +01:00
Jeff Young e61185775f Implement testCopperDrawItem() for POLYGON draw items.
Fixes https://gitlab.com/kicad/code/kicad/issues/4549
2020-05-26 23:48:21 +01:00
Jeff Young 1db799d841 Implement "disallow" rules and integrate with keepout settings. 2020-05-25 22:51:47 +01:00
Jeff Young c415130de9 Improve parse error messages. 2020-05-25 22:51:47 +01:00
Jeff Young 160981ee71 Better error reporting for DRC rule parsing. 2020-05-25 22:51:47 +01:00
Jeff Young 416d82727f Redo DRC rules to get ready for new system. 2020-05-25 22:51:47 +01:00
Jeff Young 9a08ee2778 Add a 1nm tolerance to prevent rotated pad roundoff errors.
Fixes https://gitlab.com/kicad/code/kicad/issues/4139
2020-05-22 18:04:29 +01:00
Jeff Young 0a9adaef73 Don't use bboxes for non-cartesian-rotated pad collision testing. 2020-05-22 14:12:56 +01:00
Jeff Young 69f121d907 Another attempt to get DRC and status bar to share message content. 2020-05-22 14:12:56 +01:00
Jeff Young 4f14769ce1 Use both pads when calculating pad-to-pad clearance. 2020-05-21 21:26:36 +01:00
Jeff Young a5b53a623d Update status bar with clearance & rule sources. 2020-05-21 21:26:30 +01:00
Jeff Young 98be50883d Fix bug in single-item layer matching. 2020-05-21 11:25:39 +01:00
Jeff Young 89c46e6834 Fix typo in DRC check of rule-based track-width. 2020-05-19 21:17:49 +01:00
Jon Evans f4d7c323f5 Coverity fixes 2020-05-18 22:58:28 -04:00
Jeff Young 7d537e83ea Match layers only if both items are on the given layer. 2020-05-18 22:37:37 +01:00
Jeff Young ae9662c5cd Fix some unitialized variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/4477

Fixes https://gitlab.com/kicad/code/kicad/issues/4473
2020-05-18 21:30:38 +01:00
Jeff Young d046f165de Fix board outline issues.
1) Don't try and do board-edge clearance checking against a
synthetic polygon constructed because we didn't find any edges.

2) Check pads against board edge.

3) Don't report vias as "Track too close to board edge".
2020-05-18 21:11:01 +01:00
Jeff Young cec857c0f4 Complete hookup of zone filler to new clearance engine. 2020-05-18 19:20:46 +01:00
Jeff Young 05855a5a1c Performance enhancements for DRC. 2020-05-18 13:38:17 +01:00
Jeff Young 8dc6f8e82b Allow empty rules files. 2020-05-17 15:49:02 +01:00
Jeff Young 75b139c7b4 Move hole testing to DRC client and improve performance. 2020-05-17 15:49:02 +01:00
Jeff Young 3656297f99 Add a simple editor for DRC rules. 2020-05-16 23:30:30 +01:00
Jeff Young 5b07889347 Better error messages for rule parsing. 2020-05-16 20:53:49 +01:00
Jeff Young d3f017d825 DRC rules parser and engine.
Fixes https://gitlab.com/kicad/code/kicad/issues/2182

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1965
2020-05-16 15:53:05 +01:00
Jeff Young 13493437d0 Add hole-inside-courtyard DRC checks.
One for NPTH and one for PTH; both default to "ignore".

Fixes https://gitlab.com/kicad/code/kicad/issues/3434
2020-05-14 22:02:47 +01:00
Jeff Young aedc624340 Add DRC checks for dangling vias and tracks.
Fixes https://gitlab.com/kicad/code/kicad/issues/1999
2020-05-14 22:02:47 +01:00
Jeff Young 74ee143d45 Add via annulus minimum. 2020-05-11 22:56:09 +01:00
Jeff Young 2568c168a2 Silence Coverity warning. 2020-05-09 14:14:38 +01:00
Jeff Young 8efa8af8cc Add persistence of DRC error severities. 2020-05-07 17:51:27 +01:00
Jeff Young 0f8c7ffd11 Add pad keepout and footprint keepout areas.
Fixes https://gitlab.com/kicad/code/kicad/issues/2365
2020-05-07 17:51:27 +01:00
Jeff Young e0da677d4d Add min clearance to DRC; rename Min Via Drill to Min Through Hole.
Also fixes a crash bug when ignoring a DRC violoation with multiple
markers.

Fixes https://gitlab.com/kicad/code/kicad/issues/2528
2020-05-04 22:08:36 +01:00
Jeff Young e39d145d72 Add DRC tests for minimum drill size (based on min via size). 2020-05-04 22:08:36 +01:00
Jeff Young fd991db0a9 Forgot last commit. 2020-05-01 21:10:36 +01:00
Jeff Young 9954484dfd Don't show source in violation "name". 2020-05-01 18:49:42 +01:00
Jeff Young 058108dd6d There are 3 courtyard DRC checks, not 2. 2020-05-01 18:49:42 +01:00
Jeff Young 4a60b8a776 Improve DRC error reporting and fix some bugs. 2020-05-01 18:49:42 +01:00