Commit Graph

9579 Commits

Author SHA1 Message Date
Jon Evans 9c113b25a4 Allow turning the API server on/off at runtime 2024-04-03 22:04:11 -04:00
Marek Roszko e0b913cc65 Get rid of code path that has been unreachable for many years 2024-04-03 19:54:07 -04:00
Jon Evans 75b61956e9 Fix Windows name collision 2024-04-02 20:06:36 -04:00
Jon Evans 1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Jon Evans 6bd02cae6d Refactor; add user control over API server 2024-04-02 19:51:18 -04:00
Jon Evans a3b6ab48a4 Add a new plugin system for the new API 2024-04-02 19:51:16 -04:00
Jon Evans f613cd1cb4 ADDED: A new IPC API based on protobuf and nng
Details, documentation, and language bindings are works in
progress and will be evolving over the course of KiCad 9
development.
2024-04-02 19:34:36 -04:00
Jon Evans 77eaa75db1 Show all library children if library name matches search
(cherry picked from commit a042d1aab4)
2024-04-02 22:51:41 +00:00
Alex Shvartzkop b905b4eac8 Improve moving, rendering and plotting of very small angle arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17110
2024-04-03 00:40:18 +03:00
Seth Hillbrand d82e8ee41a Map nets in pasted data
Add missing nets to the existing board and use any existing nets of the
same name.

Adds option to clear all nets in Paste Special

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17626
2024-04-01 16:56:44 -07:00
Ian McInerney 9456f35491 Properly cleanup git repos and memory on project/frame deletion
* Ensure the git backend is deleted when the project tree is deleted.
* Unload the git repo for a project when the project is unloaded from
  the tree.
2024-04-01 21:59:50 +01:00
Ian McInerney 921358b096 Make instance checker path globally writable
On Linux, this directory is shared between users, so a multi-user
machine needs to let the other users have access to the directory to
create their own lockfiles.
2024-04-01 21:59:46 +01:00
Ian McInerney 9e597ea754 Add the option to use alternating row colors in tables/grids
ADDED: Option to use alternating row colors in tables/grids

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16739
2024-04-01 21:59:37 +01:00
Céleste Wouters e98c9f283f Improve SHAPE_POLY_SET fracture performance
Refactors `SHAPE_POLY_SET::fractureSingle()` to be more efficient, while
not changing the actual algorithm:

* increase cache locality by using contiguous arrays instead of what was
effectively a linked list
* reduce latency and jitter by replacing per-edge allocator calls with
ahead-of-time std::vector reserves
* increase cache efficiency by making the vertex struct smaller
* replace O(n^2) leftmost edge search with O(n log n) std::sort
* sort the polygons instead of the edges
* cut iteration count in half in the remaining O(polygons * edges) part
2024-03-27 21:19:02 +00:00
Ethan Chien 0a89236f19 CLI: Add allegro and pads netlist output format options 2024-03-26 19:58:22 +08:00
Jeff Young 2f2c42a06b More defensive coding for KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560
2024-03-24 19:22:05 +00:00
Jeff Young a53bc9e026 Attempt to prevent KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560
2024-03-24 18:12:58 +00:00
Jeff Young 5d37a00759 Table plotting for PCBNew.
Also fixes some bugs with property exposure that (along with
other things) allowed you to put table cells on a different
layer than their parent table.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17438
2024-03-24 16:49:33 +00:00
Jeff Young f3ce3bc758 Close active cell editor when showing/hiding columns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17425
2024-03-24 10:09:27 +00:00
Alex Shvartzkop bd59fb7768 Fix spelling mistake. 2024-03-23 21:43:30 +03:00
Alex Shvartzkop 93581607a8 Don't print unnecessary digits after decimal point for imperial units.
1 nm = 0.00003937 mils = 0.00000003937 inches,
So there's no reason to print more decimal places than 5 for mils and 8 for inches.

Related: https://gitlab.com/kicad/code/kicad/-/issues/15539
2024-03-23 21:19:04 +03:00
Jeff Young fc572bfbc6 Make sure users don't run into min text size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17543
2024-03-23 15:50:45 +00:00
Jeff Young 7218d501d4 Better locality-of-reference for footprint chooser filters. 2024-03-23 12:48:52 +00:00
aris-kimi d7abed2d60 Footprint Chooser dialog: Allow toggle buttons to work simultaneously 2024-03-23 09:48:15 +00:00
Jeff Young a3f3da5a7d Implement STROKE_PARAMS::Stroke() for SH_RECT.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17516
2024-03-22 12:22:30 +00:00
Marek Roszko f0912b6128 Fix msys2 build 2024-03-21 19:52:18 -04:00
Seth Hillbrand 7e7fec69f6 Add logging and area check to tesselation
Logging is useful when we find an area that cannot be triangulated.
This will be used to generated test cases.

Skipping minor untesselated areas means that the polygon will still be
considered fully tesselated (and not sent back again and again) even if
the tesselation misses an area less than the configured limit.
Currently, this is 31^2nm.
2024-03-21 13:57:57 -07:00
Seth Hillbrand 4f03bb2fb6 Update triangulation 2024-03-21 13:57:57 -07:00
Jeff Young b285545aee Don't take too long worrying about very small exposed areas.
(And in particular, don't take forever if the min / 10 results
in step being 0.)
2024-03-21 18:14:29 +00:00
Jeff Young 58df9c96f4 ADDED: Expose units and DeMorgan to properties system.
(Also fixes inheritance bug in LIB_PIN's properties.)
2024-03-21 16:19:55 +00:00
Marek Roszko 83ef5fd7d6 Move PGM_BASE to kicommon 2024-03-20 23:29:42 -04:00
Marek Roszko e32b26ebeb Move JSON_SETTINGS and PARAMS to kicommon 2024-03-20 23:29:42 -04:00
Jon Evans e7b6573717 wxWidgets 3.3 compatibility: properties API 2024-03-20 22:02:40 -04:00
jean-pierre charras f3966371be Simulation: add export current plot to clipboard and current schematic
These exports are in file menu.
2024-03-19 17:05:55 +01:00
JamesJ a763d613e5 Move Net Inspector dialog to a widget panel in pcbnew
Introduces some updates to the inspector, and a number of bug fixes:

- Correctly handles changes in board stackup
- Correctly handles unit change events
- Correctly handles language change events
- All layout / panel settings are stored to the project settings
- Retains ability to create net report
- Simple filter searches on net name and net class name (stored in settings)
- Allows hide / show of columns (stored in settings)
- Grouping by netclass (stored in settings)
- Optional filtering by net name (stored in settings)
- Optional filtering by net class (stored in settings)
- Custom grouping by net name match
2024-03-19 01:02:01 +00:00
Jeff Young 05cdd44404 Don't assume all glyphs are outline with an outline font.
Underline and overbar may be stroke glyphs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17478
2024-03-18 22:21:01 +00:00
Mike Williams 5318001726 prettifier: add newline to end of file
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17480
2024-03-18 15:29:43 -04:00
jean-pierre charras 0fab12f367 hotkey selector dialog: accept hotkey using Alt key modifier on Windows.
On Windows, Alt key is specific, and the dialog did not accept the modifier

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17453
2024-03-18 18:16:37 +01:00
Mark Roszko 72d83cd5de Revert "Move JSON_SETTINGS and PARAMS to kicommon"
This reverts commit 81855aaaa6
2024-03-18 00:08:46 +00:00
wh201906 3f2e3d89e2 Fix selected item count in the properties panel
The code for updating selected item count is skipped if the properties
items don't change.
2024-03-17 22:26:31 +00:00
Marek Roszko 81855aaaa6 Move JSON_SETTINGS and PARAMS to kicommon 2024-03-17 18:11:49 -04:00
Jeff Young da2610b93b Add autocomplete accept & cancel to the hotkeys list. 2024-03-15 00:40:17 +00:00
Jeff Young f22f5f47cb Reset penWidth before stroking.
(PlotPoly will have set it to "1".)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17218
2024-03-14 17:40:04 +00:00
Jeff Young e30b6398b7 ADDED: optional PDF metadata from AUTHOR and SUBJECT variables.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17289
2024-03-14 17:40:04 +00:00
Wayne Stambaugh 34ec57958d Fix Eagle board import when footprint library versions exist.
This was a crude hack that appends the library URN ordinal to the name of
the footprint so that it can be correctly looked up by the "element" node.
The Eagle XML DTD does not make it clear how the URN "ASSET_ID" and
"VERSION" are used to look up the appropriate "ASSET_TYPE" so this is a
best guess and seems to work correctly.

The inferred edge clearance dialog had to be disabled when importing third
party boards because on GTK (and possibly other platforms) the dialog would
completely hang KiCad preventing the imported board and possible schematic
from being saved.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12897
2024-03-14 09:45:05 -04:00
Jeff Young 7ec2a1f09c Allow Scintilla-created clipboard to be accessed after quit. 2024-03-12 17:09:07 +00:00
Jeff Young 2a0ce409e3 Attempt to fix non-MacOS build error. 2024-03-12 15:17:30 +00:00
Jeff Young 87121af3c9 Simplify about dialog impl and make it real-time performant.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17213
2024-03-12 14:50:10 +00:00
Alex Shvartzkop 463b609993 Disable infinite panning when using XWayland.
Cursor warping doesn't work properly in this scenario.

https://gitlab.com/kicad/code/kicad/-/issues/14109
2024-03-12 10:31:23 +03:00
Alex Shvartzkop e4218effbd Disable search ctrl cursor management on non-OSX.
Buggy at least on GTK and MSW.

(cherry picked from commit 764de7257f)
2024-03-12 08:28:11 +03:00
Alex Shvartzkop bf6ff5b805 Do not write alpha to the main framebuffer when performing antialiasing.
This allows correct background display when the main framebuffer has alpha.
Noticeable on Wayland with Mesa 24.0.2 Iris driver.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17341
2024-03-12 08:04:56 +03:00
Jeff Young 85d0126187 Auto-start text entry for Scintilla grid cells. 2024-03-11 17:46:09 +00:00
Mojca Miklavec 01cb1543bb Change the platform detection order
Make sure that windows-specific getWindowsKiCadRoot() is only called on Windows
2024-03-11 15:43:33 +00:00
Jeff Young 1152b0462c Grid properties for GerbView.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17372
2024-03-10 18:21:50 +00:00
ecorm 4dcd1fb8e2 Fix formatting from simulator X/Y zoom changes 2024-03-10 12:43:18 +00:00
ecorm 16de0a666c Horizontal/vertical zoom for Simulator plots
ADDED: Horizontal/vertical zoom for simulator plots, via mouse wheel,
toolbar buttons, menu commands, and hotkeys.

ADDED: Simulator preferences panel, populated with mouse wheel
and trackpad settings that control pan and zoom of simulator plots.

ADDED: Zoom In/Out Horizontally/Vertically commands that can be bound
to hotkeys.

CHANGED: Simulator plot scroll wheel gestures are no longer hard-coded
and can now be configured via the new Simulator preferences panel.

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

Other unreported bugs that were fixed:

- Fixed wierd, jumpy simulator plot view limiting behavior.

- Fixed Zoom In Center and Zoom Out Center commands not preserving
  the simulator plot center point.

- Fixed simulator plot nudging when exported as PNGs.

- Fixed rectangular selection zoom being able to exceed simulator plot
  view limits.

Notes:

- Provided new SIM_PREFERENCES struct to be used for future
  simulator preferences set via the simulator preferences dialog.

- Bundled pre-existing EESCHEMA_SETTINGS::SIMULATOR settings into
  EESCHEMA_SETTINGS::SIMULATOR::VIEW.

- Replaced mpWindow::EnableMouseWheelPan with more general
  SetMouseWheelActions.

- Refactored and tidied up wxMathPlot's mpWindow code involved with
  fitting, zooming, and panning.

- Consolidated long lists of duplicated member variable initializers to
  a new mpWindow private delegated constructor.

- Provided provisional Zoom In/Out Horizontally/Vertically toolbar
  icons that need improvement by a graphics designer.

- Provided gitignore entries for the Qt Creator IDE
2024-03-10 12:43:18 +00:00
Jeff Young a12d79cd13 Performance improvements for multi-page dialogs. 2024-03-10 12:18:50 +00:00
Jeff Young f341ab9b00 Bug fixes for flipping tables.
Also adds support for tabbing between table cells in the
table editor dialog.

Also adds support for calling the table editor dialog from
edit properties on a table selection.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17337
2024-03-09 22:18:19 +00:00
Jeff Young 72ba31ba27 Pass symbol's netlist to footprint preview widget.
This allows us to show the pin functions on the corresponding
pads.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17349
2024-03-09 15:01:59 +00:00
Marek Roszko cb01bca1f4 Add PADS netlist format export 2024-03-09 10:00:46 -05:00
Alex Shvartzkop 4d66a8ebdb Fix rendering/plotting of arcs with tiny angle and huge radius.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17343
2024-03-09 02:07:24 +03:00
Alex Shvartzkop f6f0b9a661 ADDED: PCB 3D image raytracing rendering from CLI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3691
2024-03-08 14:38:18 +00:00
Jon Evans 9b54537e38 Add environment variable for configuring stock data home
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15687
2024-03-05 23:18:06 -05:00
Jon Evans 4ffbef5e42 Fix mismatched new[] vs free() in Altium parser 2024-03-05 23:09:38 -05:00
Jon Evans 0c2a084a47 Fix a few LIB_TREE search issues
Don't apply pruning to libraries that don't have
any children, since the point of the pruning is to
hide libraries that don't directly match a search
term if they don't have any children that match.

Fix searching for full LIB_IDs that got broken by
the implementation of "AND"

Fix searching for library names alone

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17205
2024-03-05 18:54:04 -05:00
Yon Uriarte 77576e1a80 Responsive: OPENGL_GAL::DrawArc reserve linequads to reduce drawing time 2024-03-05 14:15:33 +00:00
Jeff Young da634a618f Resolve double-indirection CURRENT_DATE in title blocks.
If ${COMMENT1} resolves to ${CURRENT_DATE} then we need to resolve again.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17256
2024-03-05 13:43:41 +00:00
Jon Evans 1988aac2b3 Update a few more list/tree views for macOS 2024-03-05 08:38:46 -05:00
Alex Shvartzkop c056ef407a EasyEDA Std: support multiple schematic sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17219
2024-03-04 15:09:31 +03:00
Alex Shvartzkop 219d0c399d EasyEDA Pro import: make sure to use UTF-8 for project.json and device.json.
Also catch exceptions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17248
2024-03-03 21:20:47 +03:00
Lucas Dumont 13c647ef6f Fix resources leak reported by coverity
For unique_ptr, release only set the ownership to null, but don't free the resource behind. On the other hand, reset do. 

Closes Coverity ID 483269
Closes Coverity ID 471974
Closes Coverity ID 471973
2024-03-03 16:23:49 +00:00
Marek Roszko 0c8e08ed58 Move some language changes to a event on the frame 2024-03-03 11:02:26 -05:00
Marek Roszko 585cf841e5 Create a singular point for events like EDA_EVT_UNITS_CHANGED to be exported out of kicommon 2024-03-02 16:29:08 -05:00
Jeff Young 1082930c34 Don't steal command-keys from a wxGrid.
It's unlikely to win you friends.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17229
2024-03-02 15:28:22 +00:00
Yon Uriarte 464f185387 Performance
Cache VIEW_ITEM's bbox in VIEW_TREE for faster removals.

Fixes https://gitlab.com/kicad/code/kicad/issues/16841
2024-03-02 00:03:46 +00:00
Jeff Young 8dddd9cc2c Separate "use board stackup colors" into separate checkbox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17085
2024-03-01 23:45:06 +00:00
Seth Hillbrand e7d4127f99 Update contributors 2024-03-01 13:45:46 -08:00
Alex Shvartzkop defcb49ac8 Support Altium Schematic ASCII import 2024-02-29 20:49:20 +00:00
arturo182 41147dc3b3 kicad_advanced: Make OCE tesselation deflection configurable
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17168
2024-02-29 19:04:39 +00:00
aris-kimi 24529e5242 ADDED: library tree context menu option to open sym/fp library files from the defined text editor.
Short description:

Works for Symbol and Footprint Editor behind an advanced config option.
For Symbol Editor it is shown for a single item selection (library or symbol).
For Footprint Editor it is shown for a footprint selection.
(fp editor allows a single tree item selection only).
Option stays hidden if current frame has been modified.

Also small fix(?) for similar action to the project manager.
(Call for the Execution has moved inside the file loop.)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15736
2024-02-29 19:01:59 +00:00
Jeff Young 48130c6982 The ruler tool is not part of InteractiveEdit.
(In particular, it should not return true to IsEditorTool().)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17164
2024-02-29 17:57:38 +00:00
Alex Shvartzkop 80457d5871 Support transparent background in 3D viewer PNG/clipboard export.
Only really works with realtime renderer currently.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12060
2024-02-29 17:11:53 +03:00
Alex Shvartzkop e71cbea7f8 Use a version string without the extra packaging info in drawing sheets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17176


(cherry picked from commit c59fac4089)
2024-02-29 01:24:39 +00:00
Alex Shvartzkop 39a0a81832 EasyEDA Std import: support multiline text on PCB.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17171


(cherry picked from commit 0dab086f0c)
2024-02-29 00:54:46 +00:00
JamesJ 5f4c7a52e4 Add netclass color management / import functionality to PCB setup dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16908

ADDED Netclass color column in board setup dialog
ADDED Import netlist colors from schematic button in board setup dialog
2024-02-28 23:13:21 +00:00
JamesJ b8748c4ef8 Add import netclass color menu items to PCB appearance widget
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16908

ADDED: Context menu item in PCB appearances widget to import netclass
color from schematic.
ADDED: Context menu item to reset PCB netclass color (replicating
same menu item from Nets inspector)
2024-02-28 23:13:15 +00:00
Seth Hillbrand 6a8d2a7eb3 Store group id rather than group
We only need the group storage id for lookup.  Storing the KIID instead
of a copy of the group avoids unneeded overhead

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

(cherry picked from commit 7d1adff071)
2024-02-28 13:27:38 -08:00
Jeff Young d08e0e9eaa _() -> _HKI() for group names. 2024-02-28 17:50:51 +00:00
jean-pierre charras f086038684 GERBER_PLOTTER, round-rect aperture: ensure primitives have non null size.
for round-rect pads with a radius = 50% of the smaller dim, one of primitives
used to create the shape can have a 0 size.
Ensure a min size >= 10 nm (It should not create a actual change)
2024-02-28 17:31:10 +01:00
Alex Shvartzkop 97e3139505 Cairo GAL: fix endianness check.
(cherry picked from commit c4a7af8a47)
2024-02-28 01:11:27 +00:00
Alex Shvartzkop 3582edb185 Cairo GAL: reduce buffer allocation sizes.
cairo_format_stride_for_width() result is in bytes.
Also removes unneeded extra width.


(cherry picked from commit d359fb8ab9)
2024-02-28 00:53:56 +00:00
Alex Shvartzkop 4fed2e849f Cairo GAL: improve empty canvas performance (-80% CPU)
(cherry picked from commit 5618a6925d)
2024-02-28 00:53:51 +00:00
Jon Evans 299b548a41 Trivial change to avoid crash on tool re-entry
See https://gitlab.com/kicad/code/kicad/-/issues/17164
2024-02-27 19:31:09 -05:00
Jon Evans c3af434741 Force lib tree row height on GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16403
2024-02-27 19:24:53 -05:00
Jon Evans 0df5cf7f75 Expose grid origin action in more places
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17007
2024-02-27 18:50:44 -05:00
Jeff Young f754410c7e Add wxGrids to list of things that get arrow keys.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17144
2024-02-27 18:11:16 +00:00
Jon Evans e9456201a7 Don't rely on dynamic_cast across DLLs
See https://gitlab.com/kicad/code/kicad/-/issues/16998
2024-02-26 22:10:28 -05:00
Alex Shvartzkop b3df08c7b1 Initialize git_remote_callbacks structure.
(cherry picked from commit 35192f5bd4)
2024-02-26 21:36:08 +00:00
Alex Shvartzkop 755bfe3492 Initialize git_repository_init_options structure.
(cherry picked from commit d84a5e6f03)
2024-02-26 21:25:30 +00:00
Jon Evans 2f6c9d1f3a ADDED: Selection filter for schematic editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14988
2024-02-25 17:44:10 -05:00