Commit Graph

16270 Commits

Author SHA1 Message Date
jean-pierre charras 408c90d3ae Python stuff: fix an issue to build pcbnew_wrap.cxx (at least on msys2)
- Reorder two include in pcbnew.i
- rename PLUGIN to PCB_IO (missing rename) in footprint.i
2023-12-24 10:41:16 +01:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Jeff Young 687389224e Do a more complete search for a coupled net.
In particular, don't bail out if the starting seg is part
of a tuning pattern meander or a user-authored non-coupled
segment to get to a via or something).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16380
2023-12-23 23:43:12 +00:00
Jon Evans 4288c8dcaf Avoid repeated selection notifications when importing netlist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16356
2023-12-23 17:41:23 -05: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 3f73bbcc4f Don't run keepUpright when not rotating.
For that matter, don't do anything at all for a rotation
of 0 (or a move vector of {0,0}).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16402
2023-12-22 21:22:36 +00:00
Jeff Young 8b344b13e5 Reenable m_useAuxOriginCheckBox when appropriate.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16424
2023-12-22 14:22:02 +00:00
Jeff Young 1f627a3a75 Fix two unrelated bugs in ungroup.
1) Don't double-remove the members from the group.
2) Don't auto-recurse BOARD_COMMIT::Stage for non-modify
changes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16419
2023-12-21 22:47:23 +00:00
Jeff Young ee0fff97f9 Cleanup formatting and remove dead code. 2023-12-21 22:06:59 +00:00
Mike Williams 1700cad83b Symbol/Footprint Chooser: remember open libraries
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16383
2023-12-21 09:57:54 -05:00
Jon Evans c1eef79119 Fix off-by-one error in setting depth
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16421
2023-12-21 08:31:47 -05:00
Jeff Young d155870275 Sometimes use grid (instead of clearance) for slop radius.
This is particularly important both when very large grids
are in use, and when the router hasn't been initialized
with a net yet (ie: in hover mode) and the board clearance
is set to 0.

https://forum.kicad.info/t/new-track-start-position-problem-on-kicad-7-0-10-rc1/47006
2023-12-21 12:58:58 +00:00
Jeff Young fc85112a72 Create dummyPattern at centre of pickerItem, not end.
This keeps TOPOLOGY::AssembleDiffPair() from picking an
arc the segment might be connect to.  Since it can't handle
arcs at all, that's bad.
2023-12-20 15:27:29 +00:00
Jon Evans 76d1cc8150 Cleanup 2023-12-19 22:43:15 -05:00
Jon Evans b1695add9e Fix warnings 2023-12-19 22:38:34 -05:00
Jon Evans 1c895fe18c Improve rendering of tuning status popup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16304

Add dedicated UI rendering layers

Switch to screen-space rendering to avoid blurriness

Fix a bug in OpenGL GAL that causes layer
ordering to be broken when using Scale

Fix some issues with VIEW_GROUP layer ordering
2023-12-19 22:38:21 -05:00
Jeff Young 24846d3f44 Repair earlier fix for VVIAs. 2023-12-19 16:48:01 +00:00
Ian McInerney c7592758cc Ensure some variables are initialized to known values 2023-12-19 14:32:31 +00:00
Wayne Stambaugh ffbb7fde74 Improve footprint editor import graphics dialog layout. 2023-12-19 07:39:57 -05:00
Wayne Stambaugh a4b38fbb80 Coverity warning fixes. 2023-12-18 16:09:13 -05:00
Jeff Young c7facfd4d4 remove unused variables 2023-12-18 18:54:47 +00:00
Jeff Young cfa55d958a performance efficiencies 2023-12-18 18:45:02 +00:00
Jeff Young 1c73d3d967 nullptr safety 2023-12-18 18:36:14 +00:00
Jeff Young e4baf877c8 performance efficiencies 2023-12-18 18:36:02 +00:00
Jeff Young 8251fca66a performance efficiencies 2023-12-18 17:39:29 +00:00
Jeff Young 68cbb820a7 performance efficiencies 2023-12-18 17:20:34 +00:00
Mike Williams 3aa20e2008 Create Array: fix mismatched tooltips
Partially addresses https://gitlab.com/kicad/code/kicad/-/issues/16391
2023-12-18 12:02:11 -05:00
Jeff Young 11805d6696 performance efficiencies 2023-12-18 17:01:55 +00:00
Jeff Young 3b36307425 Remove shadowed variable.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16363
2023-12-18 14:24:04 +00:00
Wayne Stambaugh 25c03da5a5 Coding policy and Doxygen comment fixes. 2023-12-18 08:32:41 -05:00
Jeff Young 16c8050f3d Fix event/flag race condition. 2023-12-17 21:55:29 +00:00
Jeff Young 08a00633b1 Make sure child items get edit flags cleared in commit.
In the footprint editor, in particular, we often just
add the parent footprint to the commit rather than the
actual modified item(s).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16389
2023-12-17 21:55:29 +00:00
Wayne Stambaugh eb3fd10af8 Fix obscured object selection issue in board and footprint editors.
This selection improvement feature is hidden behind the advanced
configuration key "PcbSelectionVisibilityRatio".  It is turned off (1.0)
by default.  Value values are from 0.0 to less that 1.0.  From testing,
using a value between 0.1 and 0.3 produces the best results.

This fix uses normal alpha blending described in the link below.  The
current design only uses the alpha of the object's color.  It could be
improved by doing a full color alpha blending but using the color alpha
alone seems to result in satisfactory results.

https://en.wikipedia.org/wiki/Alpha_compositing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16126
2023-12-17 16:43:56 -05:00
Jeff Young 1b0cc82c56 Move a couple of stragglers to BOARD_COMMIT. 2023-12-17 21:01:31 +00:00
Jeff Young a96b7116d0 Make sure de-selected items get redrawn.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16385
2023-12-17 17:59:43 +00:00
Jeff Young b29a56530c Remove undo-of-ungroup hack.
The hack assumed that the parent group would be the first
deleted item of type group in the undo list.  While this
will be true when undoing a user ungroup command, it will
not be when undoing an ungroup side-effect, such as when a
member of a group is deleted during UpdateFromPCB.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16384
2023-12-17 15:35:35 +00:00
Alex Shvartzkop c5ac2337e4 PNS mitering: construct arcs from start, end, angle.
Previously, arc endpoint and expected miter endpoint could differ,
causing very small loops later on.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16360
2023-12-17 05:47:07 +03:00
Alex Shvartzkop 3b26f96fe4 Tuning Patterns: read/write min_amplitude. 2023-12-17 05:32:02 +03:00
Jeff Young 9fb06f95a0 Fix msys2 build. 2023-12-16 16:17:24 +00:00
Jeff Young 66a15f6acf Re-factor frame pointer out of generator API. 2023-12-16 16:11:45 +00:00
Jeff Young ea3c87f243 Move group/ungroup to COMMIT infrastructure. 2023-12-16 14:17:25 +00:00
Jeff Young 1df84f4d92 Move some PCB_GENERATOR special-cases to propMgr listeners. 2023-12-15 21:04:33 +00:00
Jeff Young 0ab474e596 Comments. 2023-12-15 18:02:52 +00:00
Jeff Young 4844cffc00 Make sure PCB_GENERATOR's lock status follows their members.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16372
2023-12-15 17:37:36 +00:00
John Beard 9b2cde9571 Use FormatBool for PCB_GENERATOR serialisation 2023-12-14 21:22:59 +00:00
John Beard e41f5efb03 Use modern bool style for footprint locking (locked yes)
Add some simple tests for specific footprint load/save checks
(including round-trip stability)
2023-12-14 21:22:59 +00:00
John Beard 481fa1f959 Allow PCB reference image locking and UUID to be saved
Add some unit tests for reference image saving/loading.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16334
2023-12-14 21:22:59 +00:00
John Beard f3f16a1e23 Update format version for reference images and footprint format changes 2023-12-14 21:22:59 +00:00
Jeff Young a0274a8463 Last fix was too aggressive.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16362
2023-12-14 18:27:33 +00:00
Jeff Young ec7e3c5bd6 Handle nets in recoverBaseline().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16360
2023-12-14 15:35:09 +00:00
Wayne Stambaugh 8687d5092f String and dialog layout fixes. 2023-12-13 11:49:34 -05:00
Jeff Young 1fa6b7b5d6 Initialize pre-defined sizes even when using netclass values.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16351
2023-12-13 14:14:58 +00:00
Jeff Young b9daa073d4 Work around wxWidgets CHAR_HOOK issue. 2023-12-13 13:16:51 +00:00
Wayne Stambaugh 9d6e9b14eb Fix action tool friendly name string capitalization. 2023-12-13 08:15:19 -05:00
jean-pierre charras 427de4cda6 BOARD::GetBoardPolygonOutlines(): add option to add NPTH as board holes.
Used in 3D viewer to truncate plated holes intersecting NPTH.
Fixes #16325
https://gitlab.com/kicad/code/kicad/-/issues/16325
2023-12-13 08:31:29 +01:00
Mike Williams 96e229de0a kicad-cli: only plot user selected copper layers
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15634
2023-12-12 11:00:49 -05:00
Jeff Young de070a1d62 Watch out for VVIAs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16339
2023-12-12 15:45:13 +00:00
Jeff Young e000acb768 Make sure router honours unconstrained tuning setting. 2023-12-12 13:57:12 +00:00
Jeff Young ea67430c49 Cleanup. 2023-12-12 13:57:12 +00:00
Ian McInerney 3c0566d318 Don't allow copying markers
Fixes KICAD-5FQ
2023-12-11 22:22:19 +00:00
Jon Evans 873023f0c4 Yet another workaround for libgit2 API changes 2023-12-11 16:21:18 -05:00
Wayne Stambaugh 5fa274ead0 Add board layer view stack up sequence from front layer to back layer.
The old bottom to top layer stack up sequence from back to front layer was
only used for plotting so it was renamed appropriately.  This will be used
for future board object select disambiguation improvements.
2023-12-11 15:07:58 -05:00
Jeff Young e801e793dc Prevent copy-elision issues by using smart-pointer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16335
2023-12-11 16:27:31 +00:00
Jeff Young abd2cf25f2 Re-display hidden router items after cancelling.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16308
2023-12-11 16:02:02 +00:00
Jeff Young c9b5e3b012 Don't leave undo items in a hidden state. 2023-12-11 15:12:41 +00:00
Jeff Young 453d0566ff Support properties dialog during tuning. 2023-12-11 15:12:41 +00:00
Mike Williams 61da4fb1af PCB Fields: operate on field copies in dialogs
Makes cancel/undo work properly
2023-12-11 09:37:23 -05:00
Ian McInerney 7554e629a8 Fix visibility of NET_INFO::SetParent
Without explictly inheriting the base SetParent method, the compiler was
warning a lot about hiding it due to the different argument type of the
new SetParent method.
2023-12-11 10:07:28 +00:00
Jon Evans 8a474879c5 Make sure DRC engine works at startup
If we wait to initialize this until later, some
routing operations will not work properly as the
constraints will be empty
2023-12-10 23:00:19 -05:00
Jon Evans 47ab6f8d03 Set default netclass for newly-added no-net PNS items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16144
2023-12-10 22:59:36 -05: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
Jeff Young a567a66d35 Fix tooltip.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16330
2023-12-10 18:53:13 +00:00
Jeff Young 3efc191aa9 Implement ESC processing for choose footprint dialog.
Also steals copy processing for details pane from symbol chooser.
2023-12-10 18:13:42 +00:00
jean-pierre charras 057baf306f Pcbnew: draw shadow PCB_SHAPEs for locked items using continuous lines.
Using other shapes gives really strange and ugly results.
Fixes #16327
https://gitlab.com/kicad/code/kicad/-/issues/16327
2023-12-10 15:36:33 +01:00
Jeff Young 931cec862e Non-plated slots are effectively edges.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16267
2023-12-09 21:06:40 +00:00
Alex Shvartzkop a161829f86 Use SCOPED_FLAGS_CLEANER more carefully.
Other methods used ConvertOutlineToPolygon's SKIP_STRUCT state.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16321
2023-12-09 19:24:51 +03:00
Seth Hillbrand 0db362a907 Fix bug where default courtyard outline set to 0
The defaults are stored in mm, this needs to be converted to IU for
proper use in pcbnew
2023-12-08 13:31:13 -08:00
Jeff Young e3c9cf94b7 Reduce the size of the tuning popups.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16304
2023-12-08 19:50:29 +00:00
Wayne Stambaugh b7dc7e90ac Minor string fixes. 2023-12-08 13:09:16 -05:00
Jeff Young 4d28dfacc2 Remove query dialog from tuning tool startup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16305
2023-12-08 17:01:14 +00:00
Jeff Young e0a34efcb7 Use a more self-documenting API for router preview item flags.
Also fixes a bug where rule areas were drawn with solid fills.
2023-12-08 16:02:15 +00:00
jean-pierre charras ccb935db4a dialogs setup default: use a better dialog to show errors. 2023-12-07 17:04:33 +01:00
Jon Evans 0c1fba8686 IPC-2581: Do not render hidden text 2023-12-07 09:46:39 -05:00
Jon Evans 8b45579ed0 IPC-2581: Make sure components are deduplicated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16287
2023-12-07 09:32:08 -05:00
Jeff Young d257dc5b4e Cleanup unused variables. 2023-12-07 13:41:24 +00:00
Jeff Young aa046345eb Add missing case to Selectable().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16283
2023-12-07 13:41:24 +00:00
Ian McInerney be9c3b08b5 Fix library table file filters
The schematic librayr table was missing the Kicad Sexpr filter, and also
the filter inside the grid editor was never updated when the library
plugin type was changed in the grid, so a library of the new type could
not be selected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16278
2023-12-07 11:16:02 +00:00
Jon Evans 855486f849 IPC-2581: Do not create an empty Bom node 2023-12-06 17:16:15 -05:00
Jon Evans 9fcff5e701 IPC-2581: BomHeader assembly needs to be genStringified 2023-12-06 17:02:50 -05:00
Jon Evans 2674a2a294 IPC-2581: Make sure non-physical layers aren't exported 2023-12-06 16:57:52 -05:00
jean-pierre charras 921291c28b Pcbnew, default values for sizes and thickness: add missing tests for validation.
Especially for texts, the min and max values that are used are the same as
for other dialogs.
2023-12-06 16:45:18 +01:00
Mike Williams 2795fa9ca3 EE/PCB_Actions: convert to generic Finish
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16079
2023-12-06 10:33:17 -05:00
Jeff Young 2661e7a8ee Fix over-zealous copy/paste and add a few more comments. 2023-12-06 13:08:22 +00:00
Alex Shvartzkop b7840f4f82 Make STEP export process crash more visible. 2023-12-06 08:46:26 +03:00
Alex Shvartzkop 9345b73af5 Don't crash when OCC fails to read a model and didn't open the doc. 2023-12-06 03:16:46 +03:00
Alex Shvartzkop eb1fbadc12 Fix/reserve strings in STEP export dialog. 2023-12-05 13:55:26 +03:00
Seth Hillbrand fcc6dec0e4 Handle bezier curves in 2581 better
Rather than keeping the cached, we should calculate the level we want
and output that
2023-12-04 16:55:43 -08:00
Seth Hillbrand bd4278140f Allow graphical fill to be read as boolean
We had been allowing yes/solid/none with yes/solid both representing
true and none representing false.  This adds the complimentary boolean

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16262
2023-12-04 13:47:31 -08:00
Seth Hillbrand 06c3879007 Don't put polygons in shared bins
Some viewers don't want to render polygons as part of UserSpecial, so
keep them in their own set even though they have absolute coordinates
2023-12-04 13:45:33 -08:00