Commit Graph

78 Commits

Author SHA1 Message Date
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
Jeff Young 667a54ad86 Retire insideArea in favour of intersectsArea and enclosedByArea. 2022-08-28 18:02:41 +01:00
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
Jeff Young 0304ad4494 Move connection width testing to rule system.
Also copies connection width progress reporting architecture over to
the sliver checker.
2022-08-01 13:09:51 +01:00
jean-pierre charras 4d48376eae Fix some warnings detected by PVS-STUDIO (not used vars) 2022-07-26 16:00:14 +02: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 7cb7a68b0e Make sure Type regex doesn't match before Pad_Type or Pin_Type.
Fixes https://gitlab.com/kicad/code/kicad/issues/11423
2022-04-20 17:32:07 +01:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young 0036f44e37 Support (and save/recall) zoom in/out in Custom Rules editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/5796
2022-01-28 21:38:15 +00:00
Jeff Young 21790fcab7 Fix a pair of dereference-freed-pointers in DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/10335
2022-01-10 21:06:03 +00:00
Jeff Young b7e196b710 ADDED assertion constraints for user-defined DRC checks. 2021-12-24 16:13:18 +00:00
Jeff Young 5f37c2b247 Custom rule severities.
ADDED severity token to custom rule syntax.  Each rule can now define
its own severity.

Fixes https://gitlab.com/kicad/code/kicad/issues/6148
2021-12-24 15:42:22 +00:00
Jeff Young 3f64b69917 Mechanical clearance rules.
ADDED mechanical_clearance and mechanical_hole_clearance constraints.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:31:21 +00:00
Jeff Young a1e3f2b188 Starved thermals DRC checking.
ADDED min_resolved_spokes constraint.
ADDED "Thermal relief connection to zone incomplete" violation.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:30:42 +00:00
Jeff Young 32721755bf Hook up zone-pad connections to custom rules.
ADDED zone_connection constraint.
ADDED thermal_relief_gap and thermal_spoke_width constraints.

ADDED angle override for thermal relief spokes in Pad Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4067
2021-12-23 22:30:26 +00:00
Jeff Young 2001d08186 Add DRC tests for text height and text thickness.
Fixes https://gitlab.com/kicad/code/kicad/issues/8683
2021-12-23 19:18:45 +00:00
Ian McInerney 5817a8b5f4 Remove unused m_host variable
This variable isn't needed anymore after 5f53019290
pushed dark mode handling into the HTML window itself.
2021-10-18 00:29:40 +01:00
Jeff Young c38de1dcaf Pull back some 7.0 fixes to Custom Rules code completion. 2021-09-23 13:08:31 +01:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

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

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Jeff Young 436ad0ede7 Add missing token to DRC rule parser.
Fixes https://gitlab.com/kicad/code/kicad/issues/9041
2021-08-27 12:49:07 +01:00
Jeff Young 4c3954aea8 Clearer DRC rule token name for hole_size. 2021-08-13 16:18:56 +01:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young d296bec5b8 Differentiate aSingleLine mode for SCINTILLA_TRICKS
This allows us to avoid the monospaced font (along with the tab-stop
handling), and process a <return> as an OK rather than just <shift> +
<return>.

Fixes https://gitlab.com/kicad/code/kicad/issues/8425
2021-06-28 11:20:12 +01:00
Jeff Young 81fc710a5d Use consistent terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/8681
2021-06-26 10:11:41 +01:00
Jeff Young 27804e40e2 Go back to using space-width for tabs (instead of max-char-width).
The max-char-width impl was buggy and never applied to PCBNew anyway.
Plus the stroke font has a max-char-width of 2.8 time the space width,
so it made for really wide tab spacing.

Also fixes a bug where the Scintilla editors weren't getting a
monospace font on Mac.  (This bug may also exist on the other
platforms, but each would need its own fix.)

Also moves more of the Scintalla customizations to SCINTILLA_TRICKS
where they can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/8666
2021-06-24 23:53:27 +01:00
Wayne Stambaugh 7c14e4e967 Common widget header housekeeping. 2021-06-03 12:02:45 -04:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00
Marek Roszko 622baa6531 Silence more unused exception var warnings 2021-02-20 12:01:51 -05:00
Seth Hillbrand 9a51a75403 Confirm when cancelling a changed custom rule 2021-01-26 08:18:38 -08:00
Jeff Young d5d9372839 Don't cancel dialog when esc-ing out of autocomplete. 2021-01-23 22:55:03 +00:00
Jeff Young 78129aabeb Fix another case of 413ff4525b. 2020-12-07 14:25:55 +00:00
Jeff Young e09271ca0e Fixes for hole clearance and hole-to-hole tests.
1) Separate out CONSTRAINT types
2) Filter both source and dest pads/vias for drilled holes when doing
   hole-to-hole checks.  We were checking the items being put into the
   DRC RTree, but not the items we were scanning.
3) Add hole clearance to Board Setup Constraints panel.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/4683
2020-11-29 23:35:23 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Seth Hillbrand 238b3562d4 Don't translate HTML 2020-10-30 12:51:24 -07:00
Marek Roszko e49ac45b84 HTML_MESSAGE_BOX is a dialog 2020-10-25 20:01:12 -04:00
Jeff Young eea7957e16 Inform user of bad DRC rules when filling zones.
ADDED: facility for hypertext links in infobar.

Also made use of this for via constraint errors when routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/5800
2020-10-16 12:44:20 +01:00
Jeff Young 834c7bbe05 Report lexer issues through error reporter. 2020-10-16 12:44:20 +01:00
Marek Roszko 52a12c6ccd Remove kicad_string.h from footprint_info.h 2020-10-15 18:39:43 -04:00
Jeff Young 42eecdfd3a Collapse silk constraints down to one.
Also updates the rule syntax help and code-completion with a bunch
of diff-pair and other stuff that hadn't been updated yet.
2020-10-11 13:19:23 +01:00
Michael Kavanagh 42496a7d62 Convert DRC rules syntax help to markdown
Note, the original markdown spec specifies using 4 spaces to indent a
code block (https://daringfireball.net/projects/markdown/syntax)

Wrapping with three backticks doesn't work with this lib. Wrapping
with a single backtick for span elements works ok.
2020-10-06 17:18:35 +00:00
Jeff Young 85c6cebd77 Rework silk-to-pad checker to handle all solder mask clipping of silk.
Fixes https://gitlab.com/kicad/code/kicad/issues/5851
2020-10-04 13:21:01 +01:00
Jon Evans 4dda3a1715 Don't allow editing design rules without a project
Also fix a crash initializing DRC engine on an empty board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5835
2020-09-30 19:12:26 -04:00
Jon Evans 0783669633 CHANGED: Design rules files now use .kicad_dru extension
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5763
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5444
2020-09-24 21:26:23 -04:00
Jeff Young 7b2a111a1c Implicit rules go first so that other rules will take priority.
Fixes https://gitlab.com/kicad/code/kicad/issues/5687
2020-09-17 20:13:39 +01:00
Jeff Young 2b43ffd12d Better error reporting; better nullptr safety.
Also clears the marker lists before running a DRC, and sets
the drcRun flags afterwards so that the notebook tab counts
get updated.

Fixes https://gitlab.com/kicad/code/kicad/issues/5659
2020-09-16 22:14:41 +01:00
Jeff Young e2e229da96 Finish exorcising the old DRC system.
This moves the various BOARD_ITEM calls to the new system, and make
the DRC_ENGINE long-lived so that it can field those queries.
2020-09-15 20:15:46 +01:00
Jeff Young e782794f96 Flesh out object properties and DRC Rule syntax help. 2020-09-05 17:44:59 +01:00
Jeff Young 3573c8b967 ADDED hotkey for comment/uncomment line(s) in Scintilla.
Useful primarily for DRC Rules editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/5480
2020-09-03 20:37:05 +01:00
Jeff Young 70b74b1fcd Add comment syntax to Rule Syntax Help
Fixes https://gitlab.com/kicad/code/kicad/issues/5458
2020-09-02 15:21:51 +01:00