Commit Graph

3564 Commits

Author SHA1 Message Date
Wayne Stambaugh e4feb8826b Coverity issue fixes. 2023-08-28 09:29:56 -04:00
Mike Williams 3edcef0229 Grids: remove more uses of old user grid in UI
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15515
2023-08-28 07:27:25 -04:00
Jeff Young 67bd2139ad Use standard bitmap button. 2023-08-27 10:53:03 +01:00
Marek Roszko d32b55f504 Minor cleanup after last commit 2023-08-24 21:19:35 -04:00
Marek Roszko 339684263c Fix accidental plotting of disabled textbox borders
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15252
2023-08-24 21:03:48 -04:00
Marek Roszko d193334a10 Add vrml export to cli
Roughcut as the vrml exporter needs some loving

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15472
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13952
2023-08-24 20:39:21 -04:00
Seth Hillbrand db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
jean-pierre charras b59f7fbd9d DIALOG_TEXT_PROPERTIES_BASE: allows more room in wxTextCtrl for coordinates.
Sometimes coordinates in mils can have many digits.
2023-08-22 15:30:19 +02:00
Marek Roszko 5eac1840a0 Drop the 3d command in favor of direct 2023-08-21 21:47:56 -04:00
Jeff Young 55a7b9e6bf More consistent naming.
(Also better differentiates the PCBEXPR_ classes from PCB_
objects.)
2023-08-21 15:26:33 +01:00
jean-pierre charras 84fa4532b9 DIALOG_EXPORT_STEP: fix some issues:
- add missing inits (the zones were never created)
- fix a incorrect tool tip
- minor enhancements (add afew messages during export)
2023-08-21 09:36:25 +02:00
Marek Roszko b52b05ebbb Add zone export to step export
Mileage may vary on performance, decent enough for my board.
Warning, freecad chokes on boards with zones, but commerical tools are fine

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15234
2023-08-20 22:11:45 -04:00
Jeff Young cf22d5b99b Preferences setting for force-show-fields-when-fp-selected.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15215
2023-08-20 18:10:28 +01:00
Marek Roszko ea3101587a Add gltf export to step dialog 2023-08-19 19:01:29 -04:00
Marek Roszko 7ef3252064 Use an indeterminate progress bar for the 3d export log window 2023-08-19 19:01:29 -04:00
Jeff Young 6c9ba52f18 Clean up naming. 2023-08-18 22:20:09 +01:00
Jeff Young 6a6e839cc4 Move checking for null parent higher.
(Otherwise we set the failure flag without telling the user why.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15415
2023-08-18 10:32:45 +01:00
Seth Hillbrand 75f9a5bda8 Add autocomplete for zone connection style property 2023-08-16 11:05:37 -07:00
Jeff Young 686704bb31 ADDED: plot control over FP text.
(Also adds said control to "Follow Plot Settings" in 3D viewer.)
2023-08-15 16:56:46 +01:00
Alex Shvartzkop 76e0d5981d Import system refactor for PCB plugins. 2023-08-15 05:26:12 +03:00
jean-pierre charras d8ba6c07ac Pcbnew, DIALOG_PAD_PROPERTIES: ensure the right spoke angle is displayed.
Previously it was sometimes the default value, not the initial value when
opening the dialog.
Fixes #15410
https://gitlab.com/kicad/code/kicad/-/issues/15410
2023-08-14 17:56:16 +02:00
Marek Roszko 061d18cbb0 Support json reports as option in erc/drc dialogs 2023-08-13 19:19:19 -04:00
Marek Roszko 14a0fa435c ADDED: DRC JSON report 2023-08-13 14:59:10 -04:00
jean-pierre charras 53b732466a pcbnew, DIALOG_GRAPHIC_ITEM_PROPERTIES: fix issues (perhaps platform dependent)
- fix crash when trying to select a layer
- ensure the net selector is always shown when selecting a copper layer.
2023-08-12 11:30:52 +02: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
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
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
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
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
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
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 c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01: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 686dfba77a ADDED autocomplete for value field in Symbol Properties dialog. 2023-08-02 20:45:52 +01: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
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
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
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
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
Josue Huaroto 4cad021ef4 Add Open preferences folder button in Preferences Dialog 2023-07-13 14:10:31 +00:00
Jeff Young 56752e9bad Move some MRU paths from app to project.
Also augments Save As path updating to handle these newly-moved paths,
and to handle absolute paths that point into the project directory.
2023-07-12 17:30:42 +01:00
jean-pierre charras 2e7db309bd Fix typo 2023-07-12 17:24:03 +02:00
Jeff Young c3d10084b9 ADDED footprint associations dialog. 2023-07-11 14:52:05 +01:00
Jeff Young 8f5b7569d1 Split StyleFootprints into separate bools for fields vs text & graphics.
Also moves the settings from Board Setup to Preferences > PCB Editor.

Also collapses Track Drag Mode from radio buttons to a choice menu to
save space and allow it to be with the other editing action modes.
2023-07-10 17:15:57 +01:00
Jeff Young df63ca0189 Save a bit of space in FP 3D preview by moving board thickness to dlg.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13896
2023-07-09 20:36:55 +01:00
Jeff Young a66360525a Broaden "Style footprint fields" to cover graphics as well.
Also cleans up the layout of the symbol & fp properties dialogs.

Also fixes the background colour of the link textEdit controls on Mac.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8161

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
Mike Williams cc7798745e Board Settings: control styling of footprint fields
Can use library values or board default settings. Defaults to board
default settings.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8161
2023-07-08 19:58:11 -04:00
Jeff Young bcfb6e4888 Fix diagrams of meander dimensions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10073
2023-07-01 17:06:00 +01:00
jean-pierre charras 5b42348834 Pcbnew: shows the UUID of a footprint in DIALOG_FOOTPRINT_PROPERTIES.
This is an important property of a footprint, but it is never shown to
a user, although it is used in a lot of cases.
2023-06-29 12:36:20 +02:00
Jeff Young 1411b09178 Remove EDIT_TOOL's quasi-global BOARD_COMMIT.
It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
2023-06-27 17:04:18 +01:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Jeff Young 493828cc6b Eradicate a bunch of calls to dyn_cast.
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2023-06-25 11:10:07 +01:00
Jon Evans 7804c2177c Do not force focus on dataview in RC dialogs
On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11925
2023-06-23 08:09:53 -04:00
Kuba Sunderland-Ober b60f7d4136 Make comparison operators const. 2023-06-21 08:49:26 +00:00
Ian McInerney 480223f67c More RunAction specialization 2023-06-20 21:52:50 +01:00
Mike Williams a24c55affe PCB Fields: fix up python, API
Remove SetFields from both symbol and footprint, it doesn't handle
mandatory fields and is unlikely to ever be safe.
2023-06-20 18:34:52 +00:00
Mike Williams 85f889bc19 Fields: Description now mandatory
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams b81fcaeaf7 PCB Fields: use validators in dialogs, restrict editing of footprint 2023-06-20 18:34:52 +00:00
Mike Williams ad7d9ec956 PCB: footprint properties dialog fields fixes 2023-06-20 18:34:52 +00:00
Mike Williams 74606cda9c PCB: text properties dialog should indicate "Offset X/Y:" properly 2023-06-20 18:34:52 +00:00
Mike Williams 6d93950dcc PCB: abolish TEXT_TYPE::TEXT_is_*
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Mike Williams 37837dc392 PCB: introduce PCB_FIELD_T 2023-06-20 18:34:52 +00:00
Mike Williams a859b25d2c PCB: convert footprints to use PCB_FIELDs for fields from schematics 2023-06-20 18:34:52 +00:00
Mike Williams bd5d3533d8 Footprints: rename Fabrication Attributes to just Attributes
Makes it consistent with the Symbol attributes that are often
synchronized.
2023-06-20 18:34:52 +00:00
Mike Williams 028f500cd9 Footprints: rename properties to fields for consistency with symbols 2023-06-20 18:34:52 +00:00
Jeff Young b1cdcca9e6 Use hypertext link for Edit Ingored Tests in both ERC and DRC.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15010
2023-06-19 23:53:42 +01:00
Jeff Young 3b8cc3a3ac Tab-order fix provided by aris-kimi.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9406
2023-06-17 18:41:17 +01:00
Alex Shvartzkop d3be62f644 Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).
2023-06-16 19:12:37 +03:00
Alex Shvartzkop f5da58e17d PAGED_DIALOG: allow setting initial size in ctor. 2023-06-16 18:53:00 +03:00
Jeff Young 782c73300b Move drawing sheet datastructures to EDA_IU_SCALE.
Or mostly, at least.  Plotters still define their own mils-to-iu scale.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2023-06-12 22:34:25 +01:00
Jon Evans 3a2cc8f56f Net Inspector: clear sort ordering during rebuild
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14697
2023-06-09 09:06:11 -04:00
jean-pierre charras 639da0eb5a Fix a wxWidgets alert when deleting the last entry in a lib table. 2023-06-09 08:09:22 +02:00
jean-pierre charras 14c10d2a37 PANEL_FP_PROPERTIES_3D_MODEL: fix a wxWidgets alert.
Happens when there is no 3D model in 3D grid list, and when trying to add
a new 3D model, but canceling the 3D dialog file selector.
2023-06-08 17:46:38 +02:00
jean-pierre charras f92271af2c DIALOG_GEN_FOOTPRINT_POSITION: replace "Gerber (experimental)" by "Gerber X3"
Gerber position file is now not experimental, and is accepted by some board houses.
2023-06-07 11:43:30 +02:00
Jeff Young f3d3ade1dc Increased mutex safety.
Don't even query the size() without having at least a shared_lock.

*May* prevent KICAD-4S, but seems unlikely.
2023-06-05 11:01:10 +01:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
jean-pierre charras 9a47b34499 Replace PAD_SHAPE::RECT by PAD_SHAPE::RECTANGLE to avoid a collision NAME with a windows header on MSYS2, creating many compil warnings. No actual code change. 2023-06-02 12:18:24 +02:00
jean-pierre charras db3cf4274b Modify the order of an include to avoid a collision name with a windows
header that prevent Kicad build (msys2 specific)
2023-06-01 16:26:19 +02:00
Jeff Young c36b0fcda7 Make sure 3D file browser is treated as modal by quit.
(Otherwise we crash when freeing it during the quit.)
2023-05-30 14:58:46 +01:00
jean-pierre charras 6b845b9054 Fix compil warnings and a wxWidgets alert. 2023-05-30 09:00:46 +02:00
Roberto Fernandez Bautista a119bd604d Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID 2023-05-28 23:56:41 +02:00
Jeff Young 50da4e483e Tailor inspector text properties for dimension objects. 2023-05-25 16:18:37 +01:00
Jeff Young 1518ddde74 Push much of text var autocomplete down into SCINTILLA_TRICKS.
Shared code == fewer bugs.  Well, in theory anyway....
2023-05-25 10:24:50 +01:00
Jeff Young 14f004d2a5 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Jeff Young 56853a6209 Change teardrop edge shape to a checkbox. 2023-05-23 17:45:26 +01:00
Wayne Stambaugh 5b539958a2 Fix track and via properties dialog radio buttons on GTK. 2023-05-22 13:54:13 -04:00
Jeff Young 00986484e0 Attempt to fix teardrop radio buttons on GTK. 2023-05-22 14:48:53 +01:00
Wayne Stambaugh a13a49f45a Fix clipped combobox entry in board editor text box dialog.
The layer combobox color swatch was clipped when the combobox was
closed when the dialog was launched.  Setting the minimum width
resolved the issue.  This may have been a GTK only issue.
2023-05-22 08:54:48 -04:00
Jeff Young 08a9d4b26f ADDED preference for ratsnest thickness.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14708
2023-05-21 00:07:08 +01:00
Jeff Young 8b1fd62d35 Make pad & via teardrops 1st-class citizens (props of the pad/via)
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.

Add updating of teardrops on BOARD_COMMIT::Push().

Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
2023-05-19 18:02:03 +01:00
Jeff Young daa3a1aae9 Revert addition of update-teardrops checkbox to DRC dialog. 2023-05-11 14:53:28 +01:00
Jeff Young 3f44c811c7 Don't run onPageChanged() event handler during initialization. 2023-05-11 12:51:55 +01:00
Jeff Young 03c9b1c202 Move remainder of Board Setup to lazy loading. 2023-05-11 11:43:10 +01:00
Jeff Young ddc6ecf7be Lazy loading of Schematic Setup panels. 2023-05-11 11:43:10 +01:00