Commit Graph

15493 Commits

Author SHA1 Message Date
jean-pierre charras 91b3b296fe Update python footprints wizards to be compatible with last changes in code.
(PCB_TEXT Ctor has changed).
2023-08-11 09:57:45 +02:00
Jon Evans e9c51f1d12 Preserve logic that assumes footprint shapes can't have nets 2023-08-11 00:01:39 -04:00
Jon Evans f70b9920cb Fix some warnings 2023-08-10 22:01:55 -04:00
Jon Evans a77e630901 ADDED: Connectivity for graphic shapes on copper layers
Graphic shapes (excluding text) can now have nets when on
copper layers. Shapes behave like tracks in that they will
pick up nets from connected pads, and follow track opacity
settings.
2023-08-10 21:47:43 -04:00
Marek Roszko 812143ac69 ADDED: Run PCB DRC via cli 2023-08-10 20:20:40 -04:00
Roberto Fernandez Bautista e2cc35db65 Update preview board to latest version in PCB color settings panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15386
2023-08-10 17:25:35 +02:00
Mark Roszko 214c74b89b Update file zone.cpp 2023-08-10 15:15:37 +00:00
jean-pierre charras cff2583f15 Minor fixes to help translations:
- do not translate a debug message.
- remove useless spaces at end of lines (always annoying for translators).
2023-08-10 10:16:24 +02:00
Mark Roszko f88148e4e8 Fix printf assert in ZONE::GetMsgPanelInfo 2023-08-10 02:49:09 +00:00
Alex Shvartzkop 9a4ee3f40f gEDA import: better to auto-position fields instead of reading. 2023-08-10 03:21:15 +03:00
Alex Shvartzkop dbd3895104 gEDA footprint import: fix arcs/circles. 2023-08-10 03:21:12 +03:00
Roberto Fernandez Bautista 6ba250a4e6 PNS Log Viewer: Refactor loading/saving functions 2023-08-09 22:21:14 +00:00
Alex Shvartzkop e498f1b9a0 FOOTPRINT: add a method to auto-position Reference and Value. 2023-08-10 00:30:05 +03:00
Jeff Young da86593625 ADDED: Implement sorting for search panes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12614
2023-08-09 18:31:33 +01:00
Ian McInerney 1dd92b1bb1 Assign focus to the notebook in the ERC/DRC window after running
After running the ERC/DRC, the window would not get focus returned to it
on GTK naturally unless the user pressed the arrow key. This prevented
the ESC key from closing the window after the run was complete and
nothing else was clicked/pressed.

Instead of pulling focus to the dataview with the errors in it (which
would cause problems in GTK, such as moving the viewport to the first
marker (https://gitlab.com/kicad/code/kicad/-/issues/11925), give focus
to the notebook container instead. This will not select the marker, but
still allow the ESC to propagate into the dialog immediately.
2023-08-08 14:02:54 +01:00
Jeff Young 8bb895373a Allow GetLayer() to be used with single-layer zones.
Also fixes a bug in GetFirstLayer() where we were checking
m_layerSet.size() (which is always 60) rather than
m_layerSet.count() (which is the number of set layers).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15233
2023-08-08 12:43:22 +01:00
Ian McInerney a3a701a95e Move preferences to an action instead of a wx event 2023-08-08 00:51:22 +01:00
Jon Evans 8776437f29 PNS: Placement is not valid if via can't be placed 2023-08-07 18:42:44 -04:00
Jon Evans bb13e8e754 PNS: Use a via to resolve via sizes 2023-08-07 18:31:05 -04:00
Roberto Fernandez Bautista feb887fe8f PNS: Prevent re-entry events when saving log to file 2023-08-07 23:48:58 +02:00
Roberto Fernandez Bautista 79a6b0d129 PNS: Re-add debugging of via dragging 2023-08-07 23:48:24 +02:00
Roberto Fernandez Bautista 6ebc2fca15 PNS: Only log events when EnableRouterDump is true 2023-08-07 23:48:24 +02:00
Roberto Fernandez Bautista 3bf9797620 PNS: add new "EnableRouterDump" kicad_advanced setting 2023-08-07 23:43:54 +02:00
Mike Williams 30eae5d896 Fields: preserve field order across sch<->pcb 2023-08-07 09:29:13 -04:00
Jeff Young f43b90b15f Lazy context handling for SVG plotting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15325
2023-08-07 14:01:58 +01:00
Jon Evans 103eb556f7 PNS: Make sure log viewer uses the actual design settings 2023-08-06 16:05:37 -04:00
Jeff Young b401c214f5 Fix missing variable initialization. 2023-08-06 20:57:42 +01:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Jon Evans 5cbe3c5d42 PNS: Fix a few issues with debug logging
Hide non-copper layers for clarity

Fix saving of router settings
2023-08-06 15:30:58 -04:00
jean-pierre charras c594c88492 remove a very old fully outdated debug code that did nothing. 2023-08-06 15:32:41 +02:00
jean-pierre charras 5e04e90fb3 LENGTH_TUNER_TOOL: fix a bug (missing initialization) creating a serious isse.
m_inLengthTuner was not initialized, preventing the tool to be started (sometimes)
Fix also a few not initialized members.
2023-08-06 13:20:43 +02:00
Jon Evans 4c4bbdc8f3 Stricter API for LIB_TABLE
Prevent nickname map or row parent getting out of sync

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15315
2023-08-06 00:56:51 -04:00
Jon Evans 6f2574d0d2 Manual cherry-pick of 2075a99c 2023-08-05 20:13:15 -04:00
jean-pierre charras f18feb2a46 kicad-cli, export plot PDF and SVG: add missing option --drill-shape-opt.
It allows pad/via holes to ber plotted at actual size, small size, or not.
This option exists in GUI, but was missing in kicad-cli.
2023-08-05 18:18:18 +02:00
Jeff Young 0413270012 ADDED: Move Corner To... and Move Midpoint To...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5012
2023-08-05 16:43:55 +01:00
Roberto Fernandez Bautista ab614ef99f Fix IO_MGR formatting (no functional changes) 2023-08-05 15:57:29 +02:00
Roberto Fernandez Bautista 78ad3b54c3 Fix SOLIDWORKS_PCB / ALTIUM_CIRCUIT_MAKER registration into IO_MGR 2023-08-05 15:57:29 +02:00
jean-pierre charras 86eaa3de35 Pcbnew plot: do not plot via hole on layers where the via does not exist:
buried vias are not on all copper layers. their hole is also not on all
copper layer
Fixes #15355
https://gitlab.com/kicad/code/kicad/-/issues/15355
2023-08-05 10:40:35 +02:00
Seth Hillbrand c38ed7044a ADDED: DNP flag for position file export
Adds ability to exclude footprints with DNP flag from position files in
dialog and cli

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15353
2023-08-04 11:02:54 -07:00
Jeff Young 620b6b7169 Re-entrancy guard for length tuner tool.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15268
2023-08-04 17:37:09 +01:00
jean-pierre charras 9a336eeb87 Pcbnew: Plot tented/not tented vias: fox some issues:
Fix mistake in 2 accessors
Fix a checkbox name that was the opposite of its purpose
Add tool-tips ans comments.
Fixes #15352
https://gitlab.com/kicad/code/kicad/-/issues/15352
2023-08-04 18:29:06 +02:00
Jeff Young 1cbef0157d Avoid edge cases on very wide thermal spokes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15280
2023-08-04 15:38:06 +01:00
Jeff Young c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
Jeff Young 29f2afedbd Fix hidden text painting. 2023-08-04 11:37:46 +01:00
Jan Mrázek 2d010278ad Fix failure on multiple DRC runs via scripting 2023-08-04 02:32:08 +00:00
Jeff Young 9456fab435 Fix QA gold DRC counts.
Also improves the error message when some spokes are ignored because
they're connected to an isolated island.
2023-08-04 00:35:19 +01:00
Seth Hillbrand 7fac72a914 Only deselect existing footprint if currently selected
If we have a footprint currently selected and we click on its empty
space again, we deselect the footprint.  However, if we click on the
empty space of a different footprint, we will select that footprint
instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-03 11:17:31 -07:00
Jeff Young a9b7b73f10 Make sure pad primitives get normalized before diff'ing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15208
2023-08-03 18:08:33 +01:00
Jeff Young 297bbca0ea Finer-grained messages for diff pads. 2023-08-03 18:08:33 +01:00
Seth Hillbrand a90c9d7c93 Refine the footprint selection logic
- Footprints cannot be selected if they do not have items visible on the
  screen
- Clicking on empty space in a footprint will select it if the space is
  contained in the visible bounding box
- Clicking on a selected footprint a second time will deselect it
- Clicking on a footprint that has pads selected will still select the
  footprint

This avoids having the full footprint bounding box considered when
selecting footprints (useful b/c footprint bbox is often much larger and
unexpected).  Also allows non-standard footprints (e.g. silk or fab only
footprints) to be logically selected if the layers on which they have
elements are visible.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-03 10:03:15 -07:00
jean-pierre charras 8762859c6d Fix a display issue in wxStyledTextCtrl widgets in dialogs (Windows specific).
It happens when a text is using some esoteric unicode chars.
Fixes #15314
https://gitlab.com/kicad/code/kicad/-/issues/15314
2023-08-03 18:35:49 +02:00
Jeff Young 9e019a1ad1 Don't conclude we're unconnected if only connected to isolated island.
Also adds the layer name to the "thermal connection incomplete" DRC
error message.

Also improves zone layer description to not say "X and 1 more" (which
takes as much room as saying "X and Y").

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15279
2023-08-03 16:30:52 +01:00
Roberto Fernandez Bautista 573d2f94de Fix loading of via drill default sizes and other settings from *.brd kicad files 2023-08-03 15:36:20 +02:00
Roberto Fernandez Bautista 30a63b7b32 Fix loading of legacy zone fills in .brd files + Don't refill after board import 2023-08-03 15:36:19 +02:00
Jeff Young e2aa3aae8a Don't delete items out from under undo lists.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15253
2023-08-03 10:48:44 +01:00
Jeff Young 686dfba77a ADDED autocomplete for value field in Symbol Properties dialog. 2023-08-02 20:45:52 +01:00
Jon Evans af58281a08 ADDED: Expand selection for graphics in PCB
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12032
2023-08-01 21:14:58 -04:00
Jon Evans ca4d6e8d1d Fix msvc being unhappy 2023-08-01 19:59:58 -04:00
Jon Evans cc7d470f8b PNS: Improve behavior of dragging vias
- Fall back to walkaround when drag fails
- Properly check collisions with holes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15117
2023-08-01 19:03:04 -04:00
Jon Evans 9741d57447 Remove duplicate path for extracting project text variables
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15283
2023-08-01 17:25:34 -04:00
Jon Evans 2459949d0d A BOARD may not always have a project
For example, if it's the footprint editor model

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15283
2023-08-01 17:19:21 -04:00
Seth Hillbrand f3d65b5156 Revise method of selecting footprints in contrast
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.

The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints.  This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.

For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it.  IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox.  Instead, we
filter footprints based on the hittest of each element.  This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-01 10:43:13 -07:00
Mike Williams 65450d9b5d Fields: don't unchanged fields as changed 2023-07-31 15:10:30 -04:00
jean-pierre charras e188b5f8f4 APPEARANCE_CONTROLS, preset layers: re-allow storing object visibility in
a User preset, and use the last defined object visibility when switching to
a builtin preset
Fixes #15282
https://gitlab.com/kicad/code/kicad/-/issues/15282
2023-07-31 18:40:23 +02:00
Mike Williams 744452d092 Sch/PCB: allow back-updating schematic fields from PCB
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15285
2023-07-31 10:38:43 -04:00
Roberto Fernandez Bautista 54f401c72c Fix import of legacy stroked zone fill + add parsing of segments fills 2023-07-30 20:56:28 +02:00
John Beard 478df24f36 Fix fillets and chamfers when the original lines become zero-length
This needs the ITEM_MODIFICATION_ROUTINE to learn to delete items.
Condense the item change handlers into a single injected object
(ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER) and provide the basic
implementation that just takes some callables.

This simplifies the construction of the routines and also would make
a CHANGE_HANDLER object possible that can be reused between different
tools.
2023-07-30 15:12:28 +01:00
John Beard da0daffa89 Remove more special-casing for fp-edit commit handling
In the EDIT_TOOL::ModifyLines method, there was some
remaining special-casing for FP childen commits.

One bit was put back by mistake (in
0b32ae3f4b) because I thought I'd
left it out of the refactor. In fact it was removed slightly later in
1218f61d0a.

THe other bit is omitting Modify commits in the FP-editor (what the
reinstatement of the above code was trying to cause). This shouldn't
be needed any more.

However, something is still incomplete here as the tools still don't
work correctly in the footprint editor. However, I don't think it's
substantially _more_ broken with the special casing removed and at
least it's less confusing.

Related to: https://gitlab.com/kicad/code/kicad/-/issues/15253
2023-07-30 15:10:30 +01:00
jean-pierre charras abcd753bd3 PANEL_SETUP_BOARD_STACKUP: do not try to init params managed by PANEL_SETUP_BOARD_FINISH
Fixes #15288
https://gitlab.com/kicad/code/kicad/-/issues/15288
2023-07-29 09:43:32 +02:00
jean-pierre charras 60806edac0 Gerber export X3: fix an incorrect keyword ("route" must be "rout") 2023-07-27 20:11:04 +02:00
Seth Hillbrand 96a34e5b57 Consolidate Maximum clearance calculation
We were calculating the same thing in three locations and we missed
adding the clearance from the footprints in, resulting in bad fills and
missed drc errors (see QA addition)
2023-07-26 12:55:48 -07:00
Seth Hillbrand 812c56bdc7 Clarify NeighboringSegmentFilter
This doesn't affect behavior but makes the code more readable
2023-07-25 11:05:56 -07:00
jean-pierre charras a16ab0aae1 Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344 about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
Seth Hillbrand 000998ccae When routing, check for board-level clearances
If the board-level clearance exceeds the max pad/track clearance, we end
up missing collisions in the router.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15162
2023-07-24 15:19:21 -07:00
Seth Hillbrand 32ad42a435 Add 3dconnexion driver version check
Re-enable 3dconnexion driver by default as we are able to gate the
driver versions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13362
2023-07-24 18:09:52 +00:00
John Beard 0b32ae3f4b Reinstate fp-editor-specific commit handling in fillet/chamfer tools
This check was omitted in the refactor of the fillet tool, and
resulted in a bug when undoing the action: the modified lines would
not be un-modified.
2023-07-23 14:48:31 +01:00
jean-pierre charras dda9d6c86c BOARD_NETLIST_UPDATER: Minor fix 2023-07-23 13:06:31 +02:00
Alex Shvartzkop 430da67222 Altium PCB import: support dashed outlines (Region kind 2) 2023-07-22 22:38:05 +05:00
jean-pierre charras 8425e5a0b7 footprint.cpp::GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ):
Do not include invisible fields when aIncludeInvisibleText is false.
2023-07-22 11:48:17 +02:00
jean-pierre charras 878a67ca65 BOARD_NETLIST_UPDATER: fix incorrect handling of new fields added to a Fp
- the new field position/rotation is now the same as its footprint parent.
- it is added to the view.
2023-07-22 10:52:49 +02:00
Alex Shvartzkop 24452f41ad Improvements to Altium PCB/footprint importer:
- Support unicode footprint names
- Set default footprint text size and thickness to match KLC
- Position Reference at the top, Value at the bottom of fp bounding box
2023-07-22 08:55:53 +05:00
John Beard a61b9f4459 Pad dialog: respect IPC maximum pad radius
The IPC-7351C rule (which may be IPC 7352 now), is 25%, or
0.25mm, whichever is smaller. Currently the default ratio is 25%, which
is incorrect for pads with shortest edges over 1mm.

This also means that the "25%" default is applied in one place:
previously sometimes the value came from the default set in PAD,
rather than the value set by this dialog. While the PAD default isn't
changed here, this dialog no longer relies on that value for its
behaviour.
2023-07-22 00:45:36 +01:00
Josue 7f9742791a Re-word `tent vias` value setting in board_setup and plot
Fix: https://gitlab.com/kicad/code/kicad/-/issues/15210
2023-07-21 17:56:46 -05:00
Seth Hillbrand 7fe83993cf Be smarter about releasing lockfiles
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.

This should catch 99% of the cases where the message is shown
incorrectly.  There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice
2023-07-21 15:40:19 -07:00
Alex Shvartzkop e7af4b86b8 Altium PCB: support solder/paste mask expansion rules.
- Writes expansion values to board design settings
- Imports footprint regions on Cu layers as pads
- Adds support for holes in non-Cu polygons in footprints
2023-07-21 20:03:03 +05:00
Alex Shvartzkop 448de72823 Fix reading legacy zone fills which were based on stroked polygons. 2023-07-21 17:11:09 +05:00
Alex Shvartzkop ef66fe88ac Altium PCB import: import holes in non-Cu polygons. 2023-07-21 08:03:03 +05:00
Alex Shvartzkop eb6cd4cc5d Altium PCB import: remove more invalid polygons. 2023-07-21 08:03:03 +05:00
Alex Shvartzkop f29bacbccd Altium PCB import: some tweaks for font sizes. 2023-07-21 05:08:11 +05:00
Alex Shvartzkop 02652437bf Altium PCB import: fix garbage symbols in font names. 2023-07-21 05:08:11 +05:00
Seth Hillbrand 6a09cf3551 Refill legacy zone fills on open
Previous check only looked for the existence of a new (as of v6) flag
that controlled which strategy we took.  Previous versions did not write
this flag and so will not hit the check. This works around a missing
version bump from when the feature was introduced.
2023-07-19 14:29:12 -07:00
jean-pierre charras f8fcf3852f revert a change committed my mistake (in commit aa3e2988) 2023-07-18 17:14:51 +02:00
jean-pierre charras aa3e298890 Kicad manager: build the PLUGIN_CONTENT_MANAGER only un request, not in
KICAD_MANAGER_FRAME Ctor. Two advantages:
- it is built after the splash screen is dismissed.
- if there are issues when creating the PLUGIN_CONTENT_MANAGER, this is more
easy to debug
2023-07-18 11:19:52 +02:00
Jeff Young 29bb51560c Fix control enablement in global edit dialogs. 2023-07-17 18:30:07 +01:00
Jeff Young a1de7a77f4 Improve informational hierarchy of PNS Router Settings dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15182
2023-07-17 16:01:15 +01:00
Jeff Young 5e18287ff9 Re-implement some commented-out hole clearance checking in router. 2023-07-17 16:01:15 +01:00
Jeff Young c3c7f731df Fix usage of AUI SetAuiPaneSize() hack in FOOTPRINT_EDIT_FRAME.
This brings it in line with PCB_EDIT_FRAME, which seems to work
reasonably well.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14297
2023-07-16 22:29:21 +01:00
Jeff Young c2e7827774 Override FOOTPRINT::GetCenter() to ignore text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209
2023-07-16 18:01:45 +01:00
John Beard ab55684f0b ADDED: Add step parameter to footprint pad renumbering
Also includes persisting settings for next dialog invocation
and use the TransferDataFromWindow function rather than per-field
accessor methods.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10651
2023-07-16 15:37:12 +01:00
Jeff Young a09a5cb641 More undo cleanup.
The symbol editor has few enough items that it will still be performant
if we always send a selected-item-modifed event.  (As it turns out we
were doing that anyway as the check for child-modified flags didn't
also check for selected.)
2023-07-16 14:43:29 +01:00