Compare commits

...

2059 Commits

Author SHA1 Message Date
Jeff Young 9098750ba0 Debugging.
(Separate so Sentry can tell us which one fired.)
2025-07-07 12:17:10 +01:00
Jeff Young 0ccd706faf Bounds checking. KICAD-A6F. 2025-07-07 12:05:32 +01:00
Jeff Young 4e62a71448 Not all callers are expecting GUI to be put up at this level.
Potentially KICAD-RVC.
2025-07-07 11:50:03 +01:00
Jeff Young edbe570d42 Respect non-free-pads mode for Move Exactly.
(Also makes sure the filters are always in the
same order, though this may be immaterial.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21183
2025-07-07 09:19:57 +01:00
Jeff Young c960f69a9b Equality for doubles. (Potentially KICAD-SV8) 2025-07-06 21:57:23 +01:00
Jeff Young 693ea44990 Debugging.
(Separate wxCHECKs so Sentry can tell us which
one fired.)
2025-07-06 21:42:13 +01:00
Jeff Young 9e07f1e68b Include LAYER_LOCKED_ITEM_SHADOW in PADSTACK::EffectiveLayerFor() (KICAD-V2W) 2025-07-06 21:26:13 +01:00
Jeff Young 513bdadf81 Remove noisy assert. KICAD-6XH
We may need to support showing complex numbers at some
point, but as we don't today it's sort of moot.
2025-07-06 21:26:13 +01:00
Mark Roszko 907c424f5f Set VIATYPE setting via property type as well 2025-07-06 11:17:41 -04:00
Mark Roszko c29ca703c7 Remove accidental change 2025-07-06 11:12:19 -04:00
Mark Roszko 30242cca77 Don't allow the property editor to set bad layer pairs for vias 2025-07-06 11:10:39 -04:00
Mark Roszko 1ab8a5944b Add tiny test for IsCopperLayerLowerThan 2025-07-06 11:10:39 -04:00
jean-pierre charras c1eb69570d DIALOG_LABEL_PROPERTIES: enter key close it instead of open the drop down list
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21258
2025-07-06 16:59:00 +02:00
Jon Evans db2be8f8cb Make sure initial focus of label properties dialog is the text input
(cherry picked from commit 9c28241e458bf20cd81d808b2c3480104406a8dd)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-07-06 09:28:45 -04:00
Jeff Young 09e5afbe67 Don't ask for a string param from a frame_t event. (KICAD-THA) 2025-07-05 12:02:36 -06:00
Jeff Young b08990646c Fix format specifier (KICAD-SV6). 2025-07-05 12:02:36 -06:00
Jeff Young 96eb11cb9e Don't assume strings are non-empty (KICAD-PMX). 2025-07-05 12:02:36 -06:00
Jeff Young 9faf8b3d4c Commenting. 2025-07-05 12:02:36 -06:00
Jeff Young 275ff1cb4e Clear seleciton before removing rows. (KICAD-BER). 2025-07-05 12:02:36 -06:00
Mark Roszko 69e2c55291 Fix crash because the infobar button doesn't have a window yet (because the infobar was not shown yet on Windows), fixes sentry KICAD-X9Z 2025-07-05 13:48:09 -04:00
Mark Roszko b07fdd0e37 Add some variables to ctor initializer list for CONSTRUCTION_MANAGER
m_batchesMutex in particular needs to be ready before accptConstructionItems is called

Sentry KICAD-TYJ
2025-07-05 11:32:13 -04:00
Jeff Young 0730a0bc86 Formatting. 2025-07-04 22:13:49 -06:00
Jeff Young bf193c5ea1 Dirty connectivity when deleting via layers.
(Also dirty the document when removing blind/buried
vias.)

(This fixeds KICAD-FOY as a side-effect.)
2025-07-04 21:14:06 -06:00
Jeff Young 7bab41d746 If library was updated outside KiCad, the symbol may have been deleted. (KICAD-QZ9) 2025-07-04 19:58:13 -06:00
Jeff Young 7fc9fc5f58 Remove double-layer-processing.
(The caller already handles cycling through the
layers.)
2025-07-04 19:34:20 -06:00
Jeff Young 1e0a08034f Bounds checking (KICAD-8V9) 2025-07-04 16:40:17 -06:00
Jeff Young bacc82c589 Debugging. 2025-07-04 16:30:03 -06:00
Jeff Young dc96b99e22 Quiet assert. (KICAD-QZJ) 2025-07-04 16:19:42 -06:00
Jeff Young 7d18c237b3 Pads can be on Dwgs & Eco layers. (KICAD-RQE) 2025-07-04 16:12:41 -06:00
Jeff Young 4b510c59f9 Don't assume a schematic. (KICAD-G7S) 2025-07-04 16:12:11 -06:00
Jeff Young e1d1243a91 Don't trip over a stale sort column index. (KICAD-B3X) 2025-07-04 15:33:12 -06:00
Jeff Young 86280d5a65 Type safety (KICAD-QQT). 2025-07-04 15:23:31 -06:00
Jeff Young 9c884242f6 Clear arcs before running boolean ops (KICAD-QXG). 2025-07-04 15:14:21 -06:00
Jeff Young 1184bc3c36 Iterate pad layers when doing collisions (KICAD-R3Q). 2025-07-04 15:10:22 -06:00
Jeff Young 82d4ab5094 Don't assume a string (KICAD-8QP). 2025-07-04 13:20:41 -06:00
Jeff Young e18b4cbf72 User could lock the file at any time (KICAD-73V).
The file being locked is not a programming error.
2025-07-04 12:46:08 -06:00
Jeff Young 2a7474b33e We need to catch these when they're created. During write is too late. 2025-07-04 12:20:43 -06:00
Jeff Young 69b23df4c3 Make sure we don't end up with stale picker handlers (lots of Sentry tickets). 2025-07-04 12:10:59 -06:00
Jeff Young da9544dfd1 Attempt to patch SWIG for VIEW_ITEM::GetClass(). 2025-07-04 10:00:50 -06:00
Jeff Young 2892642516 Prevent wxWidgets assert. (KICAD-QZ5) 2025-07-03 23:26:13 -06:00
Jeff Young 4e4dfa0a38 Sort col may not be in the current columns. (KICAD-G74) 2025-07-03 23:14:35 -06:00
Jeff Young 7b0aceb99e Prevent wxWidgets assert (KICAD-6VM). 2025-07-03 22:50:56 -06:00
Jeff Young b077b32c43 Clear arcs before boolean ops (KICAD-CFQ). 2025-07-03 22:40:28 -06:00
Jeff Young 9ee5950c44 Fix a pair of copy/pastas (KICAD-JC2). 2025-07-03 22:28:16 -06:00
Jeff Young 3a8ea50783 More tool loop safety. 2025-07-03 21:49:11 -06:00
Jeff Young ee097a7073 ADDED: row height and column width property inspector properties.
(This time for SCH tables.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21224
2025-07-03 21:07:14 -06:00
Jeff Young 0375985d58 Debugging for removing items not in the view. 2025-07-03 20:45:11 -06:00
Jeff Young a7319bfcd0 Tool loop safety. 2025-07-03 20:01:35 -06:00
Jeff Young 6f7023116d Static_cast safety. 2025-07-03 19:41:52 -06:00
Jeff Young 54cfb62597 Double check file dlg results on MSW. 2025-07-03 17:35:34 -06:00
Jeff Young 762fd179d3 Be careful with legacy ".pro" conversions. 2025-07-03 17:27:49 -06:00
Jeff Young 4d06fbce1a Assert when nested_settings is null. 2025-07-03 17:12:17 -06:00
Jeff Young e74f56c629 Check file extensions before trying to open. 2025-07-03 17:11:58 -06:00
Jeff Young fde693ebe1 Don't overflow trying to draw ticks on ruler (KICAD-9HV). 2025-07-03 16:34:21 -06:00
Jeff Young 221cc13c79 Move selection before deleting (KICAD-7BH). 2025-07-03 16:24:44 -06:00
Jeff Young 5a2bae207b Formatting. 2025-07-03 16:15:13 -06:00
Jeff Young cccaeb3b29 Don't pass a null sheetPath to GetValue() (KICAD-QPF). 2025-07-03 16:15:02 -06:00
Jeff Young 6ca4c78b69 Clear arcs before calling SHAPE_POLY_SET boolean ops (KICAD-9Z0). 2025-07-03 15:50:42 -06:00
Jeff Young 59cec7ec3a Update enabled layers when starting FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21245
2025-07-03 14:42:28 -06:00
Alex Shvartzkop 6a4b857e51 Update translations 2025-07-03 20:15:54 +03:00
Pferd O 96498f776f Translated using Weblate (German)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-07-03 19:15:35 +02:00
Pferd O 0397a9da86 Translated using Weblate (German)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-07-03 19:15:35 +02:00
Pferd O 34d6dc7790 Translated using Weblate (German)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-07-03 19:15:35 +02:00
Pferd O 0410037af7 Translated using Weblate (German)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-07-03 19:15:35 +02:00
Sárkány Lőrinc 1617b14cb9 Translated using Weblate (Hungarian)
Currently translated at 29.5% (3064 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-07-03 19:15:35 +02:00
Pferd O a1f05e0552 Translated using Weblate (German)
Currently translated at 99.5% (10311 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-07-03 19:15:35 +02:00
dsa-t acc10b7dad Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:35 +02:00
YÜKSEL AÇIKGÖZ eb38ee31eb Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:35 +02:00
Pferd O 72bcc3168c Translated using Weblate (German)
Currently translated at 99.3% (10295 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-07-03 19:15:35 +02:00
Luka Borkovic 2eca237c15 Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:35 +02:00
Luka Borkovic bed82ef3cd Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:35 +02:00
Luka Borkovic d1050967fc Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:34 +02:00
Luka Borkovic 2ed55e6e9f Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:34 +02:00
Luka Borkovic f521c2978a Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:34 +02:00
Luka Borkovic 0097299ce0 Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:34 +02:00
Luka Borkovic 04dde1559b Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:34 +02:00
Luka Borkovic 75a8c1ab08 Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:34 +02:00
Luka Borkovic 31efa2c7ea Translated using Weblate (Serbian)
Currently translated at 18.4% (1915 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 79b35c268f Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 2c52a6da0d Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 3fe9c722ee Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 784503e974 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 6522e17d91 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 2ae31ecd42 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 3d3be90834 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ a4a60650a1 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:34 +02:00
YÜKSEL AÇIKGÖZ 43bcbdfc27 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 9f5a7bf0a6 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 5556665652 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 43e0b23675 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ de0ac13896 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 6848a29226 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ c71933de12 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 032bc1f9fa Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 849a3cb008 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 8113432a3b Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ e5bb024175 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 1bad14afab Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ 962056aa73 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:33 +02:00
YÜKSEL AÇIKGÖZ e0f40f41fc Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ 4f4470d70f Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ bb8208433a Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ f5f47d9df6 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ 8b77e066f8 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
Henrik Kauhanen a35e8e5cae Translated using Weblate (Swedish)
Currently translated at 99.8% (10343 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-07-03 19:15:32 +02:00
Henrik Kauhanen 3146b96952 Translated using Weblate (Swedish)
Currently translated at 99.8% (10343 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-07-03 19:15:32 +02:00
Julio Dias 05fc976db1 Translated using Weblate (Portuguese)
Currently translated at 87.2% (9036 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2025-07-03 19:15:32 +02:00
Pferd O 090abddba1 Translated using Weblate (German)
Currently translated at 99.1% (10269 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ 645b00b649 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ 4fc0ef8842 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ 6ec0dc3f3e Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
YÜKSEL AÇIKGÖZ eb32444fe6 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:32 +02:00
தமிழ்நேரம் 7c45fa1b4d Translated using Weblate (Tamil)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-07-03 19:15:32 +02:00
தமிழ்நேரம் 23c8f919e6 Translated using Weblate (Tamil)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-07-03 19:15:31 +02:00
Temuri Doghonadze aa35fc9911 Translated using Weblate (Georgian)
Currently translated at 10.2% (1062 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ka/
2025-07-03 19:15:31 +02:00
YÜKSEL AÇIKGÖZ a47838cdc7 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:31 +02:00
YÜKSEL AÇIKGÖZ a6bede58d2 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:31 +02:00
CloverGit 5aa9abf5fe Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit 72039fe69d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit 0460987f3a Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit 36227a2f7a Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit a78939d6b9 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit 229abc843e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit dce2998021 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit c8cc45e904 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit 6aab1bfa10 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
CloverGit d55ba906ce Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (10221 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-07-03 19:15:31 +02:00
YÜKSEL AÇIKGÖZ b4e28514e3 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:31 +02:00
YÜKSEL AÇIKGÖZ 71edb85a09 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:31 +02:00
YÜKSEL AÇIKGÖZ 52e77a5e87 Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:31 +02:00
YÜKSEL AÇIKGÖZ eff320377a Translated using Weblate (Turkish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-07-03 19:15:31 +02:00
ZbeeGin 96ca199ea4 Translated using Weblate (Polish)
Currently translated at 100.0% (10361 of 10361 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-07-03 19:15:30 +02:00
Jeff Young e0bfc220b4 Nullptr safety (KICAD-AD). 2025-07-02 23:10:10 -06:00
Jeff Young c5dd17a415 Remove noisy assert (KICAD-KMP). 2025-07-02 23:10:10 -06:00
Jeff Young 233da7934d Don't force symbol to have a library (KICAD-74K). 2025-07-02 23:10:10 -06:00
Jeff Young 21b294e204 Don't specify number of rows, wxWidgets will figure it out (KICAD-7HS)
(and likes to assert if you don't let it.)
2025-07-02 23:10:10 -06:00
Jeff Young 880ff60416 Attempt to circumvent GetValue() getting called when there's no wxDataViewItem. 2025-07-02 23:10:10 -06:00
Jeff Young 60869cc950 Don't use wxFRAME_FLOAT_ON_PARENT if there's no parent (KICAD-GJS). 2025-07-02 23:10:10 -06:00
Jeff Young 9a3c9d780f Formatting. 2025-07-02 23:10:10 -06:00
Jeff Young 8dc62e1db5 Don't choke on degenerate polygons.
It's a bit late to be asserting during drawing.
We'd need to know how the object was created to
do anything about it.
2025-07-02 23:10:10 -06:00
Jeff Young 04e38d3fcd This is also used for save as. (KICAD-81M) 2025-07-02 23:10:10 -06:00
Mark Roszko 9dd1ba7f9f Update wxwidgets-33 port to fix arm64 build 2025-07-02 20:14:26 -04:00
Jeff Young fa9a588683 Respect "exclude DNP" setting for Gerber X3.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21201
2025-07-02 14:18:50 -06:00
Alex Shvartzkop 90f5cbf003 EasyEDA Std import: support multiple consecutive arc parameter sets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21238
2025-07-02 18:03:24 +03:00
Alex Shvartzkop 453ab91482 Fix unused function warning when Sentry integration is disabled. 2025-07-02 16:48:53 +03:00
Alex Shvartzkop 4a5039c2cf Remove some unused variables. 2025-07-02 16:48:26 +03:00
Jeff Young 5ab735eb93 Ensure algorithmic safety (KICAD-ARX). 2025-07-01 21:42:11 -06:00
Jeff Young 39f6b30ee7 Ensure algorithmic safety (potentially KICAD-9RN). 2025-07-01 21:34:30 -06:00
Jeff Young f5f59e797d Make sure event has position before querying it (KICAD-796). 2025-07-01 21:17:22 -06:00
Jeff Young 5e907f864e Don't attempt to update temp lines when it will fail (KICAD-FWF). 2025-07-01 21:14:38 -06:00
Jeff Young eafa1a7af0 Fix double-delete.
The JSON_SETTINGS stuff makes copies of the
JOBSET_DESTINATION.  That ends poorly when it
contains just a naked C++ pointer.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21227
2025-07-01 21:02:27 -06:00
Jeff Young 18d9e113a6 ADDED: row height and column width property inspector properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21224
2025-07-01 20:33:35 -06:00
Jeff Young 423a1705af AllowMissingCourtyard and AllowSolderMaskBriges no longer in GetAttributes().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21232
2025-07-01 19:26:23 -06:00
Jeff Young 01a8d44bce Further simplify scoring logic.
Do away with special cases for showing.
Do away with resetting the score separately.
All methods are subtractive (logical AND).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21220
2025-07-01 11:03:53 -06:00
Jeff Young bf6712d4f4 Don't attempt to convert reference image to a SHAPE_POLY_SET.
Also make sure we render table thicknesses when they're
drawn on copper layers.
2025-07-01 01:01:49 -06:00
Jeff Young 7f58e8d5e9 Don't presume a schematic early in the creation of a file [KICAD-RYV]. 2025-07-01 00:25:25 -06:00
Jeff Young b04057498d UNDEFINED_LAYER no longer copacetic for pads (KICAD-QOC). 2025-06-30 23:48:54 -06:00
Jeff Young c573825a49 Formatting; reduce asserts. 2025-06-30 23:34:54 -06:00
Jeff Young 194437b0f6 Enforce values required by implementation (KICAD-R9A). 2025-06-30 23:22:58 -06:00
Jeff Young b3b5f6963f Remove noisy assert. 2025-06-30 22:46:47 -06:00
Jeff Young 5df676c1d0 Fixup. 2025-06-30 21:55:12 -06:00
Jeff Young 26f8f1cdd1 Allow pin autoplacer to run on symbol not yet in schematic (KICAD-JMA). 2025-06-30 21:54:22 -06:00
Jeff Young d47454bb66 Fix nullptr crash (KICAD-SPF). 2025-06-30 21:31:23 -06:00
Jeff Young a5ae1103e4 Nullptr safety (KICAD-1R8). 2025-06-30 21:26:54 -06:00
Jeff Young 24ae06a96f Fix CloseProject assertions (and potentially crashes). 2025-06-30 20:52:55 -06:00
Jeff Young a2cf59cc89 Clear selections before deleting grid rows (KICAD-J40). 2025-06-30 20:43:30 -06:00
Jeff Young f5d2553161 static_cast safety. 2025-06-30 20:34:26 -06:00
Jeff Young 2052595dac Check that library exists before checking read-only (KICAD-6Z8). 2025-06-30 20:21:00 -06:00
Jeff Young a75e0b126a Don't try to select items that don't exist (KICAD-J0X). 2025-06-30 20:11:47 -06:00
Jeff Young b179a6cac8 Nullptr safety (KICAD-F5D). 2025-06-30 20:08:27 -06:00
Jeff Young 382ba0629e Don't assert on autosave dir not writeable (KICAD-6ZA). 2025-06-30 20:04:12 -06:00
Jeff Young 97a3a09c90 Embed fonts used in fields as well as text items.
(Also, don't presume a non-stroke font is an outline
font.  We may have more types in the future....)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20578
2025-06-30 18:08:29 -06:00
Jeff Young b8eda55b24 Search user layer names first.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20922
2025-06-30 17:41:37 -06:00
Jeff Young 21c9364063 ClearArcs before calling SHAPE_POLY_SET boolean ops.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21209
2025-06-30 15:48:06 -06:00
Jeff Young fc0bf1e8bd Allow move action when selection contains non-table-cells.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19982
2025-06-30 15:10:52 -06:00
Jeff Young 6ef9e93cd5 Don't let arc radii blow up (KICAD-BS4). 2025-06-30 11:59:08 -06:00
Jeff Young d973757f81 Don't assume a board (KICAD-KKF). 2025-06-30 11:59:08 -06:00
Jeff Young 0922386262 No sense checking a static_cast. 2025-06-30 11:59:08 -06:00
Jeff Young 0c1ff4d133 Don't presume a parent board (KICAD-SQD). 2025-06-30 11:59:08 -06:00
Jeff Young b35150abf7 Remove overzealous assert (KICAD-MF5).
(It is still called when using global Edit Tracks & Vias
to set vias to netclass defaults.)
2025-06-30 11:59:08 -06:00
Jeff Young b2dfe1029e Silence wxWidgets assert. 2025-06-30 11:59:08 -06:00
Jeff Young 238719184e Prevent assert (and access violation) in wxWidgets.
(It directly dereferences the ArrayString with the
FilterIndex, without bounds checking it.)
2025-06-30 11:59:08 -06:00
Jeff Young 82fd8623eb Don't block-add all pad layers to target tree (KICAD-V5P).
(While the assert is probably harmless enough, this
will also be faster.)
2025-06-30 11:59:08 -06:00
Alex Shvartzkop 84fd260fc0 Restore .h files generated from .md
Weblate translations don't work if these files are missing.
2025-06-30 07:05:22 +03:00
Alex Shvartzkop fbd277a02d Revert "Remove auto-generated files from git tracking."
This reverts commit 808bcdda0f.

Weblate translations don't work if there's no .h files.
2025-06-30 06:58:27 +03:00
Alex Shvartzkop 50ce7d93fb Fix some warnings. 2025-06-30 06:52:16 +03:00
Jeff Young 8a0e0b620c Only promote to footprints when it's clear that's what the user meant.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21207
2025-06-29 16:47:52 -06:00
jean-pierre charras 6d4cf65d5a DIALOG_PIN_PROPERTIES: fix incorrect initial size when info bar is shown.
FinishDialogSettings() must be called after the info bar is initialized.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16761
2025-06-29 10:06:32 +02:00
jean-pierre charras d6f493a42c DIALOG_EXCHANGE_FOOTPRINTS: better look at least on Windows. 2025-06-29 07:57:04 +02:00
Jeff Young 02365bb206 Don't special-case footprint children for undo of delete.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21204
2025-06-28 21:08:08 -06:00
Jeff Young e91b51011e Use title case for menu items. 2025-06-28 19:51:10 -06:00
Jeff Young fd67108c8b Use title case for menu items. 2025-06-28 19:41:58 -06:00
Jeff Young c57f0f79ff Fix memory leaks. 2025-06-28 17:13:20 -06:00
Jeff Young 6c98fcd14e Uninitialized variable. 2025-06-28 17:05:29 -06:00
Jeff Young 0464cc18b1 Progress reporting for Run Jobs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19629
2025-06-28 16:23:34 -06:00
Jeff Young 9bcf9c643a Don't call TransformShapeToPolygon() with no layer (KICAD-KFR). 2025-06-27 22:59:12 -06:00
Jeff Young d5eeef0f2c Don't presume symbol library still exists (KICAD-74C). 2025-06-27 22:59:12 -06:00
Jeff Young 4e174f2078 Don't try to keep netcodes in defaultZoneSettings (KICAD-7Z8). 2025-06-27 22:59:12 -06:00
Jeff Young 07b8291173 Remove overzealous assert (KICAD-MH0).
(It is still called with no layer from SWIG.)
2025-06-27 22:59:12 -06:00
Jeff Young be120b4821 Nullptr safety (KICAD-6K6). 2025-06-27 22:59:12 -06:00
Jeff Young 044ac6e8e5 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Jeff Young 98e0a79f05 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Jeff Young 2ce1107e62 Overflow protection (KICAD-ARX). 2025-06-27 22:59:11 -06:00
Jeff Young 62d9d7d4e1 Nullptr safety.
(Potentially KICAD-N6C.)
2025-06-27 22:59:11 -06:00
Andrea Greco 8eff58a6dc PCB: Add option to cli and graphics to export stpz 2025-06-27 22:41:58 +01:00
Alex Shvartzkop 4a4aad7373 Update translations 2025-06-27 22:51:09 +03:00
YÜKSEL AÇIKGÖZ 94b29ba2fb Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ 98e44d02f9 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ 896e38e44d Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ 2e499e420f Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ 7f503809f9 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ e3674dfa9f Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ c490d9d137 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ 54f1a7ece4 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ a706a27a11 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ ec553eca4b Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
YÜKSEL AÇIKGÖZ 9c06b4008e Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:51 +02:00
Luka Borkovic 6a9cde3da0 Translated using Weblate (Serbian)
Currently translated at 17.4% (1806 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-06-27 21:50:50 +02:00
Marco Ciampa d023cce403 Translated using Weblate (Italian)
Currently translated at 99.9% (10359 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-06-27 21:50:50 +02:00
Luka Borkovic 42ae2becfe Translated using Weblate (Serbian)
Currently translated at 17.2% (1785 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-06-27 21:50:50 +02:00
YÜKSEL AÇIKGÖZ 6cbc004132 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:50 +02:00
pominglee 2fab721a9c Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 96.5% (10003 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-06-27 21:50:50 +02:00
Manuela Silva 1dd712fc80 Translated using Weblate (Portuguese)
Currently translated at 87.2% (9046 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2025-06-27 21:50:50 +02:00
Marco Ciampa 72515a67e3 Translated using Weblate (Italian)
Currently translated at 98.9% (10255 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-06-27 21:50:50 +02:00
YÜKSEL AÇIKGÖZ 101cc06104 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:50 +02:00
ZbeeGin 0e1b9c6ee3 Translated using Weblate (Polish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-06-27 21:50:50 +02:00
2tama3 d2a219731e Translated using Weblate (Japanese)
Currently translated at 96.8% (10038 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-06-27 21:50:50 +02:00
YÜKSEL AÇIKGÖZ 7dacfa49d6 Translated using Weblate (Turkish)
Currently translated at 100.0% (10363 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:50 +02:00
co8 j 3c9078770d Translated using Weblate (Japanese)
Currently translated at 96.6% (10020 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-06-27 21:50:50 +02:00
Seth Hillbrand 1200e22fed Translated using Weblate (Turkish)
Currently translated at 95.5% (9902 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:49 +02:00
YÜKSEL AÇIKGÖZ 2a3992d3ba Translated using Weblate (Turkish)
Currently translated at 95.5% (9902 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-06-27 21:50:49 +02:00
Miklós Márton 74675ce4c9 Translated using Weblate (Hungarian)
Currently translated at 29.5% (3063 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-27 21:50:49 +02:00
Pferd O ec9c2cd040 Translated using Weblate (German)
Currently translated at 99.0% (10268 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-27 21:50:49 +02:00
CloverGit 73b59696c6 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.0% (10163 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-06-27 21:50:49 +02:00
Henrik Kauhanen 89b11ef3fd Translated using Weblate (Swedish)
Currently translated at 99.8% (10346 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-06-27 21:50:49 +02:00
Henrik Kauhanen 1814f2055d Translated using Weblate (Finnish)
Currently translated at 93.0% (9647 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-06-27 21:50:49 +02:00
Pferd O 9371a2d737 Translated using Weblate (German)
Currently translated at 98.7% (10233 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-27 21:50:49 +02:00
Jan Straka 58509bc69a Translated using Weblate (Czech)
Currently translated at 74.8% (7757 of 10363 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2025-06-27 21:50:49 +02:00
Jeff Young 709c0f8c72 Nullptr safety.
(Potentially KICAD-372.)
2025-06-27 12:48:40 -06:00
Jeff Young 21a1499911 Garbage pointer safety.
(Potentially KICAD-K2F.)
2025-06-27 12:39:59 -06:00
Jeff Young 071bdbdaa7 Nullptr safety. 2025-06-27 12:09:31 -06:00
Jeff Young ce1ebddbe9 Clear the entire ID cache when deleting markers.
This probably doesn't fix anything, but it may be
faster when deleting large marker sets.

It also *might* impact KICAD-AX1, but that's less
likely.
2025-06-27 10:04:26 -06:00
Jeff Young 52a2985769 Cleanup. 2025-06-27 09:39:44 -06:00
jean-pierre charras 9475399dda LAYER_BOARD_OUTLINE_AREA: better default colors, fix visibility in PANEL_PCBNEW_COLOR_SETTINGS
Color is better when opacity is < 1 (now 0.35) to show grid
PANEL_PCBNEW_COLOR_SETTINGS must use a board with use = BOARD_USE::NORMAL,
not BOARD_USE::FPHOLDER because it display a full board.
2025-06-27 13:24:59 +02:00
jean-pierre charras 96e4c8454a PCB_PAINTER: Do not draw board outlines area for FPHOLDER boards
Only the board editor has a board outlines area and controls to show/hide
this draw area.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21199
2025-06-27 09:50:16 +02:00
Jeff Young 2564e5511f Tighten isCoupledDiffPair test when we only have one item.
Improves https://gitlab.com/kicad/code/kicad/-/issues/19838
2025-06-26 19:42:14 -06:00
Jeff Young a37af2b81b Remove overzealous assert (KICAD-775).
Pasting text can paste junk.  Might as well just use align_center.
2025-06-26 19:42:14 -06:00
Jeff Young 902ae353f6 Remove overzealous assert (KICAD-6VK). 2025-06-26 19:42:14 -06:00
Jeff Young fa3d23a818 Assertion reduction (KICAD-756). 2025-06-26 19:42:14 -06:00
Jeff Young 3424f2bd4c Fix presumptive cast (KICAD-J24). 2025-06-26 19:42:14 -06:00
Jeff Young 78f3be2af9 Don't group un-groupable items (KICAD-8D6). 2025-06-26 19:42:14 -06:00
jean-pierre charras 3d7d1192ea French translation update 2025-06-26 19:38:03 +02:00
jean-pierre charras c44a477823 DIALOG_SYMBOL_FIELDS_TABLE: minor enhancements and fix a minor issue
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19145
2025-06-26 18:24:01 +02:00
Jeff Young ed8605b9c1 Nullptr safety (KICAD-78). 2025-06-26 10:01:55 -06:00
Jon Evans 0997205ffb Minor code style fixes 2025-06-25 21:25:45 -04:00
Seegong 66d8a133e2 Implement PCB_GROUP serialization and deserialization methods 2025-06-25 21:22:02 -04:00
Jeff Young 5d3279004f Add undefined netclass to severities list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20373
2025-06-25 16:23:58 -06:00
Jeff Young e48d746bbb Must show a dialog for it to be useful. 2025-06-25 15:51:53 -06:00
Jeff Young 9add4a39c8 Must call SetPassEvent() for event to run in its own loop.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19805
2025-06-25 15:33:12 -06:00
Jeff Young ac6e38fe2c Formatting. 2025-06-25 15:17:53 -06:00
Jeff Young 1b81f78152 Formatting. 2025-06-25 11:43:27 -06:00
Christopher Alexander f4b1a15cd8 fix for issue 17429 - fixes DRC unconnected items exclusion instability 2025-06-25 17:03:35 +00:00
Jeff Young c5dd60aed9 Remove overzealous assert (KICAD-752). 2025-06-24 21:30:48 -06:00
Jeff Young b7362c3fb5 Don't assume all EDA_ITEMs are BOARD_ITEMs (KICAD-KCZ). 2025-06-24 21:30:48 -06:00
Mark Roszko 5c8a8b5272 Expose our define for message dialog to the header for reuse 2025-06-24 21:45:26 -04:00
Mark Roszko 4e0c7cb778 Fix color picker cursors not showing in wx3.3 on windows 2025-06-24 21:27:24 -04:00
Jeff Young 8ff66e073a Don't rebuild deleted groups.
Also don't futz with parentGroup in RemoveFromScreen();
let the commit & undo code handle it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21191
2025-06-24 17:39:15 -06:00
Jeff Young 19a6669943 Set layerName before plotting drawing sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20959
2025-06-24 14:04:53 -06:00
Jeff Young 0a59ca7590 Can't use EndModal() to cancel a modal dialog that hasn't been shown yet (KICAD-6YE).
(This particular case happens when the user cancels
the progress dialog while loading symbols before the
symbol picker has been displayed.  3.5K people have
done this 13K times on MSW.)
2025-06-24 11:52:29 -06:00
Jeff Young e2808846ce Formatting. 2025-06-24 11:52:29 -06:00
Jeff Young bb92b40364 Quiet noisy assert (KICAD-9D7). 2025-06-24 11:52:29 -06:00
Jeff Young b58f5607cc Don't assume net navigator has root item (KICAD-7Q7). 2025-06-24 11:52:29 -06:00
Jeff Young a7fdea9b6f Attempt to fix destruction order crash (KICAD-6KC). 2025-06-24 11:52:29 -06:00
jean-pierre charras 0d013498ef STEP export: ensure messages are immediately printed, and not stored in buffer.
The issue was mainly seen on Windows, in STEP export with msys2 build but also
with other builds when exported from Pcbnew dialog
2025-06-24 17:20:52 +02:00
Jeff Young 100260ed59 Don't be pedantic about selection contents when exposing commands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21112
2025-06-23 16:01:24 -06:00
Jeff Young 541ca43d9e Iterator safety. 2025-06-23 10:50:12 -06:00
Jeff Young 808bcdda0f Remove auto-generated files from git tracking. 2025-06-23 10:46:42 -06:00
Jeff Young 1291880f7c Quiet Coverity. 2025-06-23 10:44:43 -06:00
Jeff Young b6a47fb546 Nullptr safety. 2025-06-23 10:32:43 -06:00
Jeff Young 4403c9b62f Uninitialized variable. 2025-06-23 10:22:26 -06:00
Jeff Young 5257574361 Compiler warnings and formatting. 2025-06-23 10:17:49 -06:00
Jeff Young 89fcd3134e ADDED: text variable processing in DRC rules.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11231
2025-06-23 09:02:51 -06:00
Jeff Young 38f4a21b96 ADDED: expression support in min/max/opt values. 2025-06-23 09:02:51 -06:00
Jeff Young a382fd3064 Formatting. 2025-06-23 09:02:51 -06:00
Jeff Young 99076cfc5f Smarten libeval missing units warning.
In particular, don't choke on multiplicative statements
including a scalar.

The new algo is not actually smart enough to eval the
whole parse tree and separate conditionals from multiplication
from addition; it just contents itself with reporting
the common case of a single value with no units.

See comments in code.
2025-06-23 09:02:51 -06:00
Jeff Young 3284dc348a Formatting. 2025-06-23 09:02:51 -06:00
Tomasz Wlostowski ed6440b782 router: clean up shoved traces after aborting differential pair routing in shove mode
Note: the single-trace placer (LINE_PLACER) has moved to the FIXED_TAIL for tracking the interim placed routes (and reverting them if user pressed backspace). Unfortunately the DIFF_PAIR_PLACER didn't follow. The result was the dummy CommitPlacement() call at the end of aborted routing would commit the last shove state, even if FixRoute() was never called. For longer-term fix: fix ROUTER_TOOL logic to indicated aborted routing to the router/placer (AbortPlacement() is already there). Also implement FIXED_TAIL in diff pair placement mode.
2025-06-23 00:53:12 +02:00
jack2bs 8c017c7503 bitmap2component: Adding file drag and drop 2025-06-22 08:26:57 -04:00
Tomasz Wlostowski 0256ccb6a6 router: TOPOLOGY::SimplifyLine() should not try to merge segments of differing widths
Note to self: likely a regression after adding aAllowSegmentSizeMismatch parameter (default = true) to AssembleLine(). We need to improve the simplification algorithm to take differing widths into account.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21078
2025-06-22 00:26:33 +02:00
Jeff Young 8302b0d6bd Escape/unescape symbol name in save as dialog.
SymbolNameInUse() also needed some help.
As did DIALOG_LIB_NEW_SYMBOL.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21170
2025-06-21 15:31:56 -06:00
Jeff Young a5d11a1673 Attempt to fix Coverity warning. 2025-06-21 15:31:56 -06:00
Jeff Young 38f6fc496b Don't generate and integer result when we're expecting a double. 2025-06-21 15:31:56 -06:00
Jeff Young b62897bfe5 Improve code clarity.
(Hopefully enough that Sentry won't trip over it.)
2025-06-21 15:31:55 -06:00
Alex Shvartzkop da0d9d5bb3 Update translations 2025-06-20 23:57:05 +03:00
Peter B ff13ac4cdc Translated using Weblate (Romanian)
Currently translated at 23.1% (2399 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ro/
2025-06-20 22:56:36 +02:00
Sárkány Lőrinc 31a321d4be Translated using Weblate (Hungarian)
Currently translated at 29.5% (3064 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-20 22:56:36 +02:00
Peter B 0e81932a8f Translated using Weblate (Romanian)
Currently translated at 23.0% (2385 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ro/
2025-06-20 22:56:36 +02:00
ℂ𝕠𝕠𝕠𝕝 (𝕘𝕚𝕥𝕙𝕦𝕓.𝕔𝕠𝕞/ℂ𝕠𝕠𝕠𝕝) 7bab248ae7 Translated using Weblate (Latvian)
Currently translated at 0.7% (74 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/lv/
2025-06-20 22:56:36 +02:00
Pferd O be1ca8a9b2 Translated using Weblate (German)
Currently translated at 99.2% (10282 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-20 22:56:36 +02:00
Luka Borkovic 5d386193cc Translated using Weblate (Serbian)
Currently translated at 14.1% (1467 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-06-20 22:56:36 +02:00
Sárkány Lőrinc 1f79b04d6f Translated using Weblate (Hungarian)
Currently translated at 29.5% (3063 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-20 22:56:35 +02:00
Luka Borkovic 06386e1e30 Translated using Weblate (Serbian)
Currently translated at 14.0% (1451 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-06-20 22:56:35 +02:00
ZbeeGin 1a9d3a2be2 Translated using Weblate (Polish)
Currently translated at 100.0% (10359 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-06-20 22:56:35 +02:00
Sárkány Lőrinc 7cc4defce5 Translated using Weblate (Hungarian)
Currently translated at 29.5% (3060 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-20 22:56:35 +02:00
Sárkány Lőrinc 33bb37ca3b Translated using Weblate (Hungarian)
Currently translated at 28.9% (3001 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-20 22:56:35 +02:00
Pferd O 1b70055089 Translated using Weblate (German)
Currently translated at 98.8% (10242 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-20 22:56:35 +02:00
co8 j a22f972876 Translated using Weblate (Japanese)
Currently translated at 97.1% (10068 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-06-20 22:56:35 +02:00
Pferd O 08de7a896a Translated using Weblate (German)
Currently translated at 98.6% (10215 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-20 22:56:35 +02:00
தமிழ்நேரம் fd4c168320 Translated using Weblate (Tamil)
Currently translated at 100.0% (10359 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-06-20 22:56:35 +02:00
CloverGit 5fc0084386 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.5% (10211 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-06-20 22:56:35 +02:00
Sárkány Lőrinc 222a28bf9f Translated using Weblate (Hungarian)
Currently translated at 27.6% (2864 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-20 22:56:35 +02:00
Pferd O a48f8e2717 Translated using Weblate (German)
Currently translated at 98.2% (10179 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-20 22:56:35 +02:00
CloverGit cfbf805c53 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 97.9% (10146 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-06-20 22:56:34 +02:00
தமிழ்நேரம் f67dea250d Translated using Weblate (Tamil)
Currently translated at 98.7% (10228 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-06-20 22:56:34 +02:00
Henrik Kauhanen 8d847182ea Translated using Weblate (Swedish)
Currently translated at 99.8% (10347 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-06-20 22:56:34 +02:00
ZbeeGin c7568dfea5 Translated using Weblate (Polish)
Currently translated at 100.0% (10359 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-06-20 22:56:34 +02:00
Pferd O b423d8eb46 Translated using Weblate (German)
Currently translated at 97.9% (10148 of 10359 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-20 22:56:34 +02:00
jean-pierre charras c56ad6fecb Eeschema: ensure a hop over coordinate in entered only once for a given wire
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21164
2025-06-20 10:35:11 +02:00
Mark Roszko 23d64221e3 Bump wxwidgets-33 port being used 2025-06-19 20:22:20 -04:00
Mark Roszko ce545f4d6c ADDED: Ability to set a PDF background color for PCB plots
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20873
2025-06-19 19:34:31 -04:00
Tomasz Wlostowski e274307437 router: possible fix for disappearing split-segments
https://gitlab.com/kicad/code/kicad/issues/21019
2025-06-20 00:18:38 +02:00
Tomasz Wlostowski 9408f53e37 pcbnew: fix view bounding box calculation of center-type dimensions 2025-06-20 00:10:11 +02:00
jean-pierre charras 5d8c8b9c54 pcbnew, appearance control: add entry to enable/disable LAYER_BOARD_OUTLINE_AREA 2025-06-19 18:42:03 +02:00
jean-pierre charras 01e67d78d6 board area fixes (jpc) 2025-06-19 18:26:39 +02:00
jean-pierre charras ea12df80be make board area colored (from Ethan Chien) 2025-06-19 18:26:39 +02:00
Jeff Young 1faa9800dc Row height consistency.
Rats.  Also got tangled up in another commit which
removes some dead code.
2025-06-19 14:29:37 +01:00
Jeff Young a51925bcf5 Safer way to null temp member variable.
(No, there were no returns or throws, but someone might
add one in future, and this version will still work.)

Also fixes some other compiler warnings.
2025-06-19 14:29:37 +01:00
jean-pierre charras 33c9a50afd Fix typo in last commit 2025-06-19 09:03:05 +02:00
jean-pierre charras 92934b2178 Eeschema: fix crash (null pointer) in Preferences->Colors panel.
When drawing items shown in this panel, the <item>->Schematic() is nullptr
so we cannot use it.
2025-06-19 08:53:13 +02:00
Jeff Young 2cd6654e81 Hop-over improvements.
1) Move hop-over enablement to Schematic Setup.
2) Make hop-over size user configurable.
3) Prefer hop-overs to hop-unders.
2025-06-18 22:18:59 +01:00
Jeff Young 716e446e06 Reduce compiler warnings. 2025-06-18 17:58:30 +01:00
Jeff Young 0d8b24747e Smarten copper area collection routine. 2025-06-18 17:55:31 +01:00
Jeff Young 52f77864bc Formatting. 2025-06-18 17:45:53 +01:00
Jeff Young e3baebd53a Check/Uncheck All for Change Footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21150
2025-06-18 11:06:59 +01:00
Mark Roszko cf56ac3300 Switch to generic message dialogs on windows to maintain dark mode immersion 2025-06-17 21:20:09 -04:00
Jeff Young 96c8d995dd Don't reset current tool in group when rebuilding toolbars.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21125
2025-06-17 23:01:24 +01:00
Jon Evans feec61e050 Hyperlynx: flip Y-axis coordinates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18581


(cherry picked from commit b1649071e8)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-06-17 17:44:10 -04:00
Jeff Young 2e9987e722 Clear child flags for items whose undo/redo is managed by parent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21111
2025-06-17 19:56:43 +01:00
Jeff Young b2025b7568 Formatting. 2025-06-17 19:56:43 +01:00
jean-pierre charras 025317ee10 Eeschema, hop over arc: refinement in draw code (arcs always have the right radius). 2025-06-17 18:53:38 +02:00
jean-pierre charras c56d55b3e7 FP editor: use the footprint datasheet field value if it is not empty.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21149
2025-06-17 18:02:54 +02:00
Jeff Young af076488f5 Naming conventions. 2025-06-17 14:03:57 +01:00
Jeff Young 5e707acbdb Ensure any mapped layers are enabled.
Also fixes a missing mutex for parallel access to cache
in DRC_TEST_PROVIDER_COPPER_CLEARANCE::testGraphicClearances().

Also simplifies the logic for not show multiple errors.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21138
2025-06-17 14:03:57 +01:00
Jeff Young 6c5f682254 Ensure any mapped layers are enabled.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21138
2025-06-17 12:33:55 +01:00
Jeff Young a3ae173159 Formatting. 2025-06-17 11:36:19 +01:00
Jeff Young bdc3129db3 Don't allow repeat command when one is already running.
Also, performa undo during move locally, and bar redo events.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21145
2025-06-17 11:18:11 +01:00
Jeff Young d55a454b2a Consistent naming. 2025-06-17 11:18:11 +01:00
Alex Shvartzkop 89961465e2 Add algorithm import for Clang 19.
Otherwise it can't find std::ranges::find_if
2025-06-17 11:38:38 +03:00
Jon Evans f9d1a4d31b API: Don't accidentally copy board's net info
(cherry picked from commit c9668b81c8)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-06-16 23:24:00 -04:00
Mark Roszko 9fb98449d9 Fix use-after-free crash in PCB_PICKER_TOOL 2025-06-16 22:32:07 -04:00
Mark Roszko 95235dc8ad Minor port updates 2025-06-16 21:03:44 -04:00
jean-pierre charras 27a036206c French translation update 2025-06-16 20:13:30 +02:00
Jeff Young f0a2d6ffb6 Repair inadvertent change. 2025-06-16 17:33:33 +01:00
Mark Roszko 3c6ac7ddf8 Rename the job tmp var for future generalization and fix the unsetenv call 2025-06-16 16:04:34 +00:00
Jeff Young edca1ee62d ADDED: check/uncheck all update option buttons.
Dialog is wide enough now not to require double lines for LIB_IDs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21137
2025-06-16 16:04:21 +01:00
jean-pierre charras 714117eb1b Pcbnew, Bezier curve: do not show Fill option in dlg and prop manager.
In Pcbnew, a Bezier curve is not a closed shape, and fill it is not supported
(This is supported only in schematic editor)
2025-06-16 13:21:25 +02:00
Jeff Young 8d1119e5dd Uninitialized variables. 2025-06-16 12:01:20 +01:00
Jeff Young ca1db93013 Iterator safety. 2025-06-16 11:46:18 +01:00
Jeff Young 3a3d1708d4 Variable initialization and nullptr safety. 2025-06-16 11:12:03 +01:00
Jeff Young 74bf678d99 Warp back from context menu before running command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19560
2025-06-16 10:58:03 +01:00
jean-pierre charras 6471db70cd 3Dviewer: Fix crash created by commit 447b7426 when a board has Bezier shapes. 2025-06-16 11:06:44 +02:00
jean-pierre charras 1b29499452 Eeschema, hop over arcs: fix the case of two 45 deg segments intersecting. 2025-06-16 10:24:09 +02:00
jean-pierre charras cd206a62ba Eeschema: hop over arcs: ensure they are drawn not filled. 2025-06-16 08:53:38 +02:00
Jeff Young 27ac2beac5 Nullptr safety. 2025-06-15 21:52:52 +01:00
Jeff Young f6b814658e Fix typo. 2025-06-15 21:50:55 +01:00
Jeff Young 1bc60c32f0 Nullptr safety. 2025-06-15 21:45:09 +01:00
Jeff Young 17158f21da Ignore visibility and style attrs in instance data.
It appears that it's always null/0.  (At least in this
test-case.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19734
2025-06-15 20:48:31 +01:00
jean-pierre charras a987c98fc3 Restore hop over arcs on undo command. 2025-06-15 16:55:19 +02:00
jean-pierre charras ca9df9986a Make show hop over a configurable option 2025-06-15 16:55:18 +02:00
jean-pierre charras 57bbc96ab2 Make BuildWireWithHopShape() a member of SCH_LINE
BuildWireWithHopShape(): fix incorrect code, and plot Hop Over shapes
2025-06-15 16:54:54 +02:00
Dhineshkumar S f650999004 Eeschema: Add option to show unconnected wire crossings as hop-overs. 2025-06-15 16:53:40 +02:00
jean-pierre charras b621e0ccf5 Pcbnew: fix position of rectangles after a Rotate command. 2025-06-15 16:48:19 +02:00
Jeff Young 98dc94f8f2 Rework ruleAreas to avoid stale pointers.
1) UpdateRuleAreasInScreens() is going to reset the rule
area caches on all SCH_RULE_AREAs.  This means that every
SCH_ITEM in the screen that *had* a rule area cache is going
to get it cleared.  So we might as well just up-front clear
the caches of all SCH_ITEMs, avoiding the need to use the
(possibly stale) pointers inside SCH_RULE_AREA::m_items.

2) UpdateRuleAreasInScreens() also sets the repaint flag on
all SCH_DIRECTIVE_LABELs, so there's no need to worry about
them elsewhere.

3) SCH_RULE_AREA::m_prev_items could also contain stale
pointers.  We avoid this one by converting it to KIIDs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21120
2025-06-15 15:15:09 +01:00
Mark Roszko 95000ce62f Use generic progress dialog on windows built with wx3.3 to get dark mode compatible dialogs 2025-06-15 10:06:59 -04:00
Mark Roszko 6a719e2c91 Disable C4355 warnings 2025-06-15 10:06:20 -04:00
Mark Roszko 50eae8fff9 Fix stc cell editor heights on win32 under wx 3.3 2025-06-15 09:59:01 -04:00
Alex Shvartzkop d928e3c4fe Support wxCursorBundle on wx 3.3+
See https://gitlab.com/kicad/code/kicad/-/issues/16231
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16224
2025-06-15 10:24:49 +03:00
Alex Shvartzkop 199c5bafb9 Tweak AUI pane caption size on high-DPI for wx 3.3 on MSW. 2025-06-15 01:50:42 +03:00
Mark Roszko 5715296b14 Edit Windows-CI.yml 2025-06-14 21:39:29 +00:00
Jon Evans 9b72e30a0b QA: Store SVGs, not PNGs
Different platforms/versions can result in very slight differences
when converting SVGs to PNGs for diffing them.

(cherry picked from commit 8b80853ad7)
2025-06-14 17:16:25 -04:00
Mark Roszko 1696d75471 Provide custom coloring for Control Light / wxSYS_COLOUR_3DLIGHT 2025-06-14 15:57:23 -04:00
Mark Roszko ef54f4dde1 Fix ambigious string 2025-06-14 15:48:54 -04:00
Mark Roszko bdfd1e0601 Silence WX_INFOBAR asserts on wx3.3 2025-06-14 15:28:48 -04:00
Jeff Young 3bc4cbc596 Performance tweaks. 2025-06-14 20:25:59 +01:00
Jeff Young 17d2a05df0 Uninitialized variables. 2025-06-14 20:25:59 +01:00
Jeff Young c9ee462652 Nullptr safety. 2025-06-14 20:25:59 +01:00
Jeff Young 18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Jeff Young 5ed332771c Don't overwrite return value. 2025-06-14 20:25:59 +01:00
Jeff Young 5707f34c5b Nullptr safety. 2025-06-14 20:25:59 +01:00
Mark Roszko 2440cf4892 Update vcpkg for wx3.3 trial in windows nightlies 2025-06-14 15:10:50 -04:00
Mark Roszko 5f145d02bd Disable WX_USE_REL_AND_DBG under vcpkg as it doesnt really play nice with lib and debug/lib
This is usually fixed by the hackjob in vcpkg for the wxwidgets find module being so...crazy
2025-06-14 15:07:46 -04:00
Mark Roszko 4bfeddcc8d Fix assert on construct of jobset page 2025-06-14 14:05:36 -04:00
Mark Roszko 6ded31927b Fix accidentally uncommented debug msgs 2025-06-14 13:58:45 -04:00
Mark Roszko b83f433506 Enable dark mode on windows when built with wx 3.3 2025-06-14 13:55:02 -04:00
Mark Roszko 1922cab5f4 Kill the near-global spread of length_delay_calculation.h 2025-06-14 13:32:18 -04:00
Marek Roszko 74e60e8917 change in wx3.3 header includes causes conflicts in ipc2581_types.h 2025-06-14 13:31:20 -04:00
Marek Roszko 10331e32e0 Fix our FindwxWidgets.cmake that actually always had the wrong lib search path for wx vcpkg 2025-06-14 13:31:19 -04:00
Jeff Young 9f7fa4df66 There's no view when running tests. 2025-06-13 18:09:22 +01:00
Jeff Young e2cf944915 Dirty clearance lines when rule areas change.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20734
2025-06-13 16:37:10 +01:00
Jeff Young aaa0e74311 Eagle sheet descriptions are elements, not attributes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20957
2025-06-13 12:28:08 +01:00
Jeff Young 2844674449 Use courtyards for DNP cross-out sizes.
(And failing that, just pads and edges, no text.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21115
2025-06-12 16:29:50 +01:00
Jeff Young ac3a20278b Reset m_drcRun flag when clearning all markers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21113
2025-06-12 12:51:38 +01:00
Jeff Young 7fbf51b17c Be more pedantic about RECURSE_MODE.
Also fixes an invalid iterator bug.

Also adds mirroring support for PCB_GROUPs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21107
2025-06-12 11:21:28 +01:00
Jeff Young c159b06f57 Cleanup. 2025-06-12 09:42:01 +01:00
Jeff Young de4f2dd3cb Remove annoying tabs in dialog.
(It just makes it harder to see what's happening.)
2025-06-12 09:42:01 +01:00
Jeff Young 7258546084 Use KiCad terminology and fix broken logic around locked footprints.
(And don't show users UUIDs.)

(Also fix broken logic around skipped numbers.)

(Also removes nag dialog.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19977
2025-06-12 09:42:01 +01:00
aris-kimi cf5d4df78a Sim:Fix an unescaped while loop 2025-06-12 01:07:38 +01:00
Jeff Young c3192a9501 Consistency in dialog visuals and control/tooltip naming. 2025-06-11 13:23:25 +01:00
Alexander Boehm 2e94e6413f repeat layout: always fixupNet
I don't understand how cloned nets get their target zone
net in the first place. What I do know is that rarely it does
not work and the source net is retained. This is where
fixupNet() shines and does what its name suggests.
2025-06-10 14:18:46 -04:00
Alexander Boehm 159f2c9482 multi-channel tool: more fine grained control over in/exclusion
The locking option from the repeat layout dialog was renamed and
is now called 'include locked items', like in the code.
If an item is locked in the source rule area it is not replicated,
if an item is locked in the target area it will not be deleted upon
running the repeat layout tool. Added an option to ignore tracks that
do not share a net with a pad inside the source rule area. This gives
unrelated track segments lying inside the rule areas a chance
of peaceful coexistance.
2025-06-10 17:33:26 +00:00
Alexander Boehm 6e06125719 multi-channel tool: copy only routing fully within rule area
Tracks segments of arbitrary lenght were replicated as long as some
part was inside the reference rule are. Now only track segments fully
within the rule area are replicated. This improves performance,
consistency (e.g. only zone fills fully within rule area are copied) and
usablity. Regarding the usability: if a channel is replicated and then
connected to something else these wires were often messed up if another
replication (some internal update) was necessary. Now the chance that
external connections going into the rule area survive an replication is higher.
2025-06-10 17:33:26 +00:00
Alexander Boehm 56bd7e4427 multi-channel tool: grid tricks for repeat layout dialog
This allows selecting/unselecting multiple checkboxes at once
by hitting space. And maybe some other tricks I don't know about...
2025-06-10 17:33:26 +00:00
Alexander Boehm 4111140f93 generate rule areas dialog: vertical scroll bars
With many entries the dialog could not be resized by dragging
nor were scroll bars displayed (at least under Linux).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20195
2025-06-10 17:33:26 +00:00
Alexander Boehm 6dd366f7bf multi-channel tool: anchor footprints
adds a dropdown menu to select an anchor footprint from the
reference rule area. The corresponding footprints in the
target areas determine displacement and rotation off all the
replicated items. If no anchor footprint has been selected
the previous behavior is unchanged, i.e. rule area position
determines placement.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20603
2025-06-10 17:33:26 +00:00
Jeff Young 4678000a0e ADDED: DNP, etc. attributes to SCH rule areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14037
2025-06-10 18:26:34 +01:00
Ian McInerney ae1c1c6f26 Fix type in string 2025-06-10 17:16:22 +01:00
Jan Wichmann 63fadcbcce DIALOG_LIB_NEW_SYMBOL: Added extended control of data fields when creating derivatives 2025-06-10 08:20:06 -04:00
Jeff Young 2d0184faf9 Adjust margins. 2025-06-10 11:31:19 +01:00
Jeff Young e4294aab85 Don't export negative layers to copper.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20949
2025-06-10 09:43:39 +01:00
Jeff Young f66a3c3fac Adjust spacing. 2025-06-10 09:43:39 +01:00
Jeff Young e6d94d5b09 Repair saved locking logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21090
2025-06-10 09:06:59 +01:00
Mike Williams d5b0e64a1b build: fixes 2025-06-09 16:15:35 -04:00
Seth Hillbrand e957d10098 Force grids to have entries.
If they don't in the file, reset to the default

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21060
2025-06-09 13:12:35 -07:00
Jeff Young 307f3c17bc Revert div-by-0 fixes which fail arc regression tests. 2025-06-09 20:09:24 +01:00
Jeff Young 9d6928043f Don't format strings if we're not going to report them. 2025-06-09 20:09:24 +01:00
Jeff Young 3d5a87d8db Performance tweaks. 2025-06-09 20:09:24 +01:00
Jeff Young 8235843d01 Don't pass large structures by value. 2025-06-09 20:09:24 +01:00
oskarwires abba11031a Fix pin length change and push 2025-06-09 13:57:08 -04:00
jean-pierre charras 68929aa980 Fix overzealous cleanup. 2025-06-09 19:49:12 +02:00
Damjan 2c92f95a1c 3d-viewer: Navigation gizmo for 3D viewer
ADDED: Blender-like navigational gizmo - new feature

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16956
2025-06-09 10:29:34 -07:00
Sebastian 3cafe2e6bb Fix updating embedded drawing sheet by marking true to update the embed drawing files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20800
2025-06-09 17:32:24 +01:00
Mike Williams 65e282e6e1 schematic: break/slice will temporarily switch to free angle mode
Otherwise operations like breaking a wire in orthogonal mode simply
don't make sense.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13394
2025-06-09 12:16:21 -04:00
Mike Williams b440349586 schematic: better implementation of repeated break 2025-06-09 11:41:41 -04:00
Mike Williams cd85226c1a schematic: make break wire a repeat-until-cancel action
User requested feature.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13392
2025-06-09 11:27:06 -04:00
Mike Williams 6acb2114ed sch: don't make cancelled break wire invisible
I'm not entirely sure why this can't be added to the selection, but
removing the selection fixes the behavior.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19847
2025-06-09 10:49:25 -04:00
Mike Williams adde48010e schematic: avoid crash on missing tool 2025-06-09 09:16:10 -04:00
Mike Williams f4659b4c4f warnings: remove unused variables 2025-06-09 09:00:47 -04:00
Jeff Young 4cf559ad27 Performance tweak. 2025-06-09 12:54:30 +01:00
Jeff Young c5a053d51c Div-by-0 safety. 2025-06-09 12:54:30 +01:00
Jeff Young fb46ca39df Performance tweak. 2025-06-09 12:54:30 +01:00
Jeff Young a52a205ca4 Performance tweak. 2025-06-09 12:54:30 +01:00
Jeff Young f76608c0da Nullptr safety. 2025-06-09 12:54:30 +01:00
Jeff Young c989fc17ac Iterator safety and shared code. 2025-06-09 12:54:26 +01:00
Jeff Young 9ef0e7fb01 Don't leak design blocks. 2025-06-09 12:53:11 +01:00
Jeff Young e045def6f7 Correct underline spacing in dialogs; flatten origins & axes. 2025-06-09 12:53:11 +01:00
jean-pierre charras 9c2c756bd0 SCH_SYMBOL::AddHierarchicalReference(): fix crash when m_instanceReferences.size() = 0
It happens in QA tests.
2025-06-09 12:40:48 +02:00
aris-kimi 9c5b2c55fb Move simulation frame panel togglers to sch_actions and eechema.Simulator domain 2025-06-09 10:10:43 +01:00
Jeff Young 28369ee4dd Don't remove ruler from view; just hide it. 2025-06-08 23:25:25 +01:00
Jeff Young 116bd924c2 Static cast safety.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20958
2025-06-08 23:21:02 +01:00
Jeff Young 46cb3f96a0 Stale pointer safety. 2025-06-08 22:10:39 +01:00
Jeff Young 6ce9033331 Initialization not required for smart pointers. 2025-06-08 22:03:04 +01:00
Jeff Young a6707a42d1 Formatting. 2025-06-08 21:46:42 +01:00
Jeff Young 5b44312a10 Prefer the active layer when picking tuning patterns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20963
2025-06-08 20:57:05 +01:00
erhannis 4d739ea8e5 Minimal changes needed to build 2025-06-08 20:52:57 +01:00
Jeff Young ef473c2b01 Hack to prevent single-line scintilla scrolling bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19708
2025-06-08 18:31:21 +01:00
Jeff Young 70dfc9215d Accept empty "(fp)" statements.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20002
2025-06-08 16:33:05 +01:00
Jeff Young f3050bd7ed Nullptr safety; performance; formatting. 2025-06-08 16:33:05 +01:00
Jeff Young 96dd1815ea Performance. 2025-06-08 16:33:05 +01:00
Jeff Young ff0f6c448b Performance. 2025-06-08 16:33:05 +01:00
Jeff Young 8968ff62e3 Remove dead code. 2025-06-08 16:33:05 +01:00
Jeff Young cecf29dd02 Cleanup; remove dead code. 2025-06-08 16:33:05 +01:00
Jeff Young c6ff846af6 Don't leak design blocks. 2025-06-08 16:33:05 +01:00
Jeff Young f5c48b3f34 Iterator safety. 2025-06-08 16:33:05 +01:00
Jeff Young a66aff301f Cleanup. 2025-06-08 16:33:05 +01:00
Jeff Young 92b9997948 Nullptr safety. 2025-06-08 16:33:05 +01:00
Jeff Young ecd4d9d64a Don't assume a frame. 2025-06-08 16:33:05 +01:00
Jeff Young a85408d8ef Nullptr safety. 2025-06-08 16:33:05 +01:00
Jeff Young 530b4d683c Comments. 2025-06-08 16:33:05 +01:00
Jeff Young 95ab9f0b50 Lock safety.
We're going to grab the lock every time through anyway,
might as well have it for the reads as well as the
writes.
2025-06-08 16:33:05 +01:00
Jeff Young a7a83efc46 IncrementTimeStamp() lock safety.
Increment is only called once per op, so it's not
overly performance critical.  Better to have the
lock when reading the cache values.
2025-06-08 16:33:05 +01:00
Jeff Young 265d273f93 Negative number safety. 2025-06-08 16:33:04 +01:00
Alex Shvartzkop 7417365771 Update translations 2025-06-08 17:02:54 +03:00
dsa-t fa2896959d Translated using Weblate (Russian)
Currently translated at 96.3% (9954 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-06-08 16:01:40 +02:00
Sárkány Lőrinc 30152e4619 Translated using Weblate (Hungarian)
Currently translated at 27.7% (2867 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-08 16:01:39 +02:00
CloverGit f3851d5160 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.4% (10172 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-06-08 16:01:39 +02:00
Sárkány Lőrinc a072759370 Translated using Weblate (Hungarian)
Currently translated at 27.6% (2856 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-08 16:01:39 +02:00
Sárkány Lőrinc a978c3134b Translated using Weblate (Hungarian)
Currently translated at 26.9% (2786 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-08 16:01:39 +02:00
CloverGit 7611468df5 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.4% (10172 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-06-08 16:01:39 +02:00
ZbeeGin bbd057c8af Translated using Weblate (Polish)
Currently translated at 100.0% (10327 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-06-08 16:01:39 +02:00
김랑기 f6e8d2376d Translated using Weblate (Korean)
Currently translated at 97.0% (10027 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-06-08 16:01:39 +02:00
Pferd O 7c4d7252e5 Translated using Weblate (German)
Currently translated at 98.5% (10175 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-08 16:01:39 +02:00
DevAny 077e2e3bb0 Translated using Weblate (Korean)
Currently translated at 97.0% (10027 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-06-08 16:01:39 +02:00
CloverGit 75437ba7d0 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.3% (10160 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-06-08 16:01:39 +02:00
Henrik Kauhanen 824cb13550 Translated using Weblate (Swedish)
Currently translated at 99.8% (10313 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-06-08 16:01:39 +02:00
ZbeeGin 4cb9142953 Translated using Weblate (Polish)
Currently translated at 100.0% (10327 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-06-08 16:01:39 +02:00
DevAny 719afbba18 Translated using Weblate (Korean)
Currently translated at 96.8% (10003 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-06-08 16:01:39 +02:00
Pferd O 5179100d9d Translated using Weblate (German)
Currently translated at 98.2% (10148 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-08 16:01:38 +02:00
CloverGit 7ebbf6bba2 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.0% (10125 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-06-08 16:01:38 +02:00
Frank Sonnenberg a99f8492f7 Translated using Weblate (German)
Currently translated at 98.1% (10139 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-08 16:01:38 +02:00
Pferd O 590ad6f3a1 Translated using Weblate (German)
Currently translated at 98.1% (10139 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-06-08 16:01:38 +02:00
Jeff Young 0f9e858beb Add grammar for SkyWater .subckt parameters.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20220
2025-06-08 11:11:10 +01:00
John Beard d15b2b7305 SHAPE_ARC: Fix GetCentralAngle normalization documentation
This appears to have always been [-360 .. 360], as some tests in
test_shape_arc.cpp have had negative values for a very long time.

Add tests on the start, end and central angle accessors to enforce
the documented normalizations.
2025-06-08 09:55:54 +08:00
John Beard 026eb2512d QA Arc: update 'bad midpoint' test case after fix (2124f2b846) 2025-06-08 09:55:54 +08:00
Jeff Young 80d24d4720 Runtime cache for knockout text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20711
2025-06-07 22:47:07 +01:00
Jeff Young e89c8db632 Pin Table prettification. 2025-06-07 22:47:07 +01:00
Marek Roszko 4ada004bb4 Add some checkpoints to qa_pcbnew 2025-06-07 15:02:52 -04:00
Marek Roszko a5e4ed38a3 Move most of the sentry logic to a class inside the APP_MONITOR namespace 2025-06-07 14:55:07 -04:00
Jeff Young ebe30355ce Separate icon for Constraints Resolution.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21038
2025-06-07 17:44:00 +01:00
Jeff Young d81e9e6cd1 Code cleanup.
A placement-area is a rule-area sub-type.  We don't
need to say rule-area-placement each time.

Also removes some dead code, and simplifies some
damage-propagation logic.
2025-06-07 17:44:00 +01:00
Marek Roszko bccb3534f4 Add missing no-op for no built sentry 2025-06-07 11:52:03 -04:00
Marek Roszko dea46f7780 Add a TRANSACTION class to experiment with performance metrics in nightlies 2025-06-07 11:43:11 -04:00
Marek Roszko f6c305cea6 Allow QA to create new SCHEMATIC instances rather than reusing a single container
Why make cleanup complicated lol
2025-06-07 10:38:43 -04:00
Jon Evans 76465bdc1a Add prettifier support to ExportFootprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21071


(cherry picked from commit 1bc11d0e77)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-06-07 10:18:39 -04:00
Jon Evans d9cf5c8986 Restore ability for moves to be async
This is required for the API

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


(cherry picked from commit d0453a89bc)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-06-07 09:47:03 -04:00
Marek Roszko 34be0452fd Add some additional breadcrumbs 2025-06-07 09:01:05 -04:00
Marek Roszko 3c76e042e2 Start a central space to manage sentry things without exposing sentry everywhere 2025-06-06 23:00:25 -04:00
Marek Roszko 2d327d9d73 Allow running jobsets in cli by description (and uuid)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20033
2025-06-06 19:02:47 -04:00
Seth Hillbrand 8e97a98fef Fix small segment render
Small segments, not just zero-length ones need to be drawn as circles to
avoid being dropped

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21083
2025-06-06 15:54:50 -07:00
Seth Hillbrand 56019bcbe8 Don't blindly deref an optional
Since the optional might not have a value (and the wxVariant seems to
equate 0 with an empty string), we should check for the valid optional
first and fallback to 0 if not set

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

(cherry picked from commit a5896e231a)
2025-06-06 13:52:48 -07:00
Seth Hillbrand 51e36257e1 Fixup for cda127a9a3
Support for arbitrary layer count
2025-06-06 12:44:58 -07:00
Jeff Young dd39a50a14 Autocomplete for OUTPUT_TMP_PATH_VAR_NAME.
(Along with a list of other env vars in use.)
2025-06-06 20:34:05 +01:00
Jeff Young af1a246e12 Nullptr safety. 2025-06-06 18:28:39 +01:00
Jeff Young 1968d67bf3 Prefer const& to passing by value. 2025-06-06 18:28:39 +01:00
Jeff Young cda127a9a3 Fix for new layer arch (copper on even numbers only). 2025-06-06 18:28:39 +01:00
Jeff Young d6857ddc56 Naming conventions. 2025-06-06 18:28:39 +01:00
Jeff Young 863d3c3603 Fix logic that's been broken for 11 years.
(And was doubly-broken when copper layers went to
even numbers only.)
2025-06-06 18:25:20 +01:00
Jeff Young b94f5a013a Remove dead code. 2025-06-06 18:25:20 +01:00
Jeff Young 31c6c28882 Performance optimizations. 2025-06-06 18:25:20 +01:00
jean-pierre charras aa892efc17 Fix a build issue (related to protobuf) on mingw/msys2 2025-06-06 18:28:23 +02:00
jean-pierre charras 095158d70c Fix a minor compil warning 2025-06-06 18:27:32 +02:00
Marek Roszko fe54a2ec0f Append python Scripts directory to PATH env on windows 2025-06-05 23:12:32 -04:00
Marek Roszko ba63b07a5e Set an env var when running jobs that points to the temp folder for the jobset output 2025-06-05 22:50:58 -04:00
Marek Roszko 4fb89a9341 Use m_project member instead of Prj() inside SCHEMATIC 2025-06-05 21:40:30 -04:00
Marek Roszko c505e11c24 Inverse conditional to silence warning about fallthrough
[[fallthrough]] cant be inside a if statement, the next statement must be the case
2025-06-05 21:35:49 -04:00
Marek Roszko 54780ae0d4 Fix nuisance warning about unreachable return 2025-06-05 21:29:54 -04:00
Marek Roszko bf192a1a98 Remove the callback on RecomputeIntersheetRefs 2025-06-05 20:25:27 -04:00
Marek Roszko 674ffa2a3d Split part of RecalculateConnections to SCHEMATIC, fix cli loader to call RecalculateConnections which fixes rules areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20528
2025-06-05 20:25:27 -04:00
Seth Hillbrand 677193b5e4 Force PTH pads to exist on all layers
By definition the PTH will exist on all layers at the moment but some
corner case allowed the NPTH layer set to be saved in the layerset,
after which it was hard to reset

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

(cherry picked from commit 846425c638)
2025-06-05 17:12:05 -07:00
Seth Hillbrand bdf5cc5af8 Re-enable pin selection
Pins are no longer in the view separate from their sheet/symbol so we
need to extract the pins for our hit test

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20898
2025-06-05 14:11:12 -07:00
Seth Hillbrand 1a432cae3b Fallback for ProtoBuf detection
Avoid always having to write out the setting for older systems
2025-06-05 12:10:15 -07:00
Seth Hillbrand 29dc45d584 Remove the forced ancillary grid
If you are moving an object, we already have the axis snap, forcing the
grid to center at the start of the move prevents us from easily aligning
elements by moving them.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18196
2025-06-05 12:04:25 -07:00
Seth Hillbrand fbaf480351 Split bar check for fp/symbols 2025-06-05 11:40:47 -07:00
Seth Hillbrand ed67d37480 If we can't load the KiCad, don't crash
We already fail the test, so just continue instead of segfaulting the qa
2025-06-05 11:40:47 -07:00
Wayne Stambaugh 1eb76cb14d Fix simulation model dialog issues.
At some point ".\" was added as the default file text control string
which triggered a SPICE model library load.  This would fail every
time the dialog was loaded for the first time.

Clear the model list box when the SPICE model library fails to load.
This way a container out of bounds exception will not get thrown when
the  library model list contains stale model indices.

Technically this does not fix issue #21063 because the crash was fixed
by catching the invalid index exception.  It does prevent an annoying
modal dialog that blocks all of KiCad.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21063
2025-06-05 13:30:25 -04:00
Jeff Young 9750f7690c Performance optimizations. 2025-06-05 18:01:44 +01:00
Jeff Young 5117ecdf3d Iterator safety. 2025-06-05 18:01:44 +01:00
Jeff Young abc23a313d Lock safety.
("row" should not exceed the lifetime of "lock".)
2025-06-05 18:01:44 +01:00
Jeff Young 6609e79868 Nullptr safety. 2025-06-05 18:01:44 +01:00
Jeff Young 68f1cd0a08 Fix uninitialized member variable. 2025-06-05 18:01:44 +01:00
Jeff Young 9a01225a57 Simplify logic. 2025-06-05 18:01:44 +01:00
Jeff Young 4dcaac0dc4 Iterator safety. 2025-06-05 18:01:44 +01:00
Jeff Young 3acdac525b Nullptr safety. 2025-06-05 18:01:44 +01:00
Jeff Young adb535e649 Initializer safety. 2025-06-05 18:01:44 +01:00
Jeff Young 639b856ea9 Formatting. 2025-06-05 18:01:44 +01:00
Jeff Young 52f9cba035 Add missing member variables to EDA_ITEM::operator=
Also don't rebiuld groups that are only on the undo list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21064
2025-06-05 18:01:44 +01:00
jean-pierre charras a04bead8b0 Eeschema: fix crash when trying to edit a non symbol field using U,V or F
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21072
2025-06-05 16:39:50 +02:00
jean-pierre charras c278deb9ef DSNLEXER: do not leave a member ( m_knowsBar ) uninitialized
It can break the footprint file parser and the embedded file parser
2025-06-05 11:36:46 +02:00
jean-pierre charras e34c3b4c7e minor cosmetic enhancement: add icon to 2 pcb actions 2025-06-05 08:17:05 +02:00
Marek Roszko 1da8ddbadd Move CleanUp to SCHEMATIC 2025-06-04 20:33:48 -04:00
Marek Roszko fcc09a5ce6 Move BreakSegment(s/OnJunction) out of SCH_EDIT_FRAME 2025-06-04 20:33:47 -04:00
Seth Hillbrand dd92736c46 Handle unquoted strings that use the bar '|' character
We use this as part of the standard sexpr now.  But previously, if a
designer used the '|' character as part of a string with no spaces, it
would be entered unquoted into the file, which neccesitates special
handling

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

(cherry picked from commit 5eacca8b18)
2025-06-04 10:54:22 -07:00
Jeff Young ee2cf47f23 CHANGED: Use FILTER_COMBOBOX for label names.
Also pushes some of the implementation down a level
so that it can be shared between this and the
SYMBOL_FILTER_COMBOBOX.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20943
2025-06-04 17:49:17 +01:00
Jeff Young 8c6aa8e043 Still want to climb up to parent footprint in previewer (part II)
(Apply SolderMask fix to SolderPaste.)
2025-06-04 17:49:17 +01:00
Jeff Young 1c915d3456 Still want to climb up to parent footprint in previewer 2025-06-04 17:49:17 +01:00
David Rees fce444a227 calc/galvanic: Improved list of electrochemical materials and added dynamic text contrast
- Added additional materials to the galvanic table
- Improved with ITU-R BT.709 dynamic text contrast calculation for better readability
- Improved inline comments and electrochemical annotations
2025-06-04 20:50:26 +10:00
Seth Hillbrand b70f2269cb Ensure text ${LAYER} resolves to text not fp layer
We were resolving the footprint variables first for text objects.  This
resulted in always seeing the footprint layer resolution instead of the
text object if the text object was in a footprint.  But this only
happened in the board, not the fp editor.  This harmonizes the display

(cherry picked from commit b2bbee2375)
2025-06-03 11:52:51 -07:00
Mike Williams b174911a39 board: prevent null-pointer deref in solder paste rules 2025-06-03 14:32:52 -04:00
Mike Williams 143628065e groups: fix properties assert in board editor 2025-06-03 14:06:43 -04:00
Mike Williams 861fc359d6 groups/design blocks: remove todos
Design block's aren't groups, but groups can have a link to a design
block's lib id.
2025-06-03 13:41:59 -04:00
jean-pierre charras b6aaa14e77 Fix crash in PAD::GetSolderMaskExpansion() when in 3D previewer.
The dummy board used in 3D previewer has no DRC engine, so creating a nullptr.
2025-06-03 17:35:36 +02:00
Jeff Young 2e87a04358 Differentiate between FP previews and FP editor for 3D viewer settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21053
2025-06-03 16:11:28 +01:00
Wayne Stambaugh fe20f685c2 Coding policy fixes. 2025-06-03 09:26:30 -04:00
Wayne Stambaugh 1cef61c34f Honor escape key policy for sheet pin synchronization dialog. 2025-06-03 08:59:09 -04:00
Jeff Young 4ebe0686e2 Fix linebreak. 2025-06-03 11:41:27 +01:00
Jeff Young c994b96509 ADDED: custom rules for solder mask & paste margins.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15622
2025-06-03 11:41:27 +01:00
Jeff Young 96fa79cef2 Minor performance optimizations. 2025-06-03 11:41:27 +01:00
Jeff Young c2591977b8 Minor performance optimizations. 2025-06-03 11:41:27 +01:00
Jeff Young aa77f74c76 Invalid iterator safety. 2025-06-03 11:41:27 +01:00
Jeff Young 0ddb34e8b0 Nullptr safety. 2025-06-03 11:41:27 +01:00
Marek Roszko ab75263b91 Bump kicad-vcpkg to fix occt debug 2025-06-02 21:02:08 -04:00
Seth Hillbrand 5496ad8ae6 Fix crash when loading footprints with bezier
We don't have an m_board with design settings, so this can be null and
crash unless we protect it

(cherry picked from commit 6988d48250)
2025-06-02 17:10:41 -07:00
Wayne Stambaugh 473ceb90cc Fix incorrect board editor text box bitmap button sizes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21050
2025-06-02 15:19:35 -04:00
jean-pierre charras f892f39674 Pcbnew, plot zones on Silk and Mask layers: use actual filled areas.
Previously zone outlines were used, but it did not take in account rule areas
that can create holes in filled areas.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21046
2025-06-02 16:25:31 +02:00
Graham Keeth 80e09328e5 Tweak string for resetting alternate pins 2025-06-02 14:42:59 +01:00
Jeff Young 5959562b85 Invalid iterator safety. 2025-06-02 14:12:02 +01:00
Jeff Young fa2c085c79 Div-by-zero safety. 2025-06-02 14:07:34 +01:00
Jeff Young e5682ff2c1 Line-breaking; decrease use of auto.
Also some "fixes" to keep Coverity queit.
2025-06-02 14:00:37 +01:00
Jeff Young f5d09816ab Fix typo. 2025-06-02 13:37:25 +01:00
Jeff Young dc342c0fc1 Fix copy/pasta. 2025-06-02 13:32:48 +01:00
Jeff Young 31cf3f9b53 Nullptr safety. 2025-06-02 13:29:49 +01:00
Jeff Young 09fd6c13e2 Quiet Coverity. 2025-06-02 13:17:08 +01:00
Jeff Young 8265950658 Treat stacked pins as a single item in 4-way connection test.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20532
2025-06-02 12:53:17 +01:00
Marek Roszko fa687289bf Fix qa and make SCHEMATIC::Reset safe on null projects 2025-06-01 21:04:58 -04:00
Mark Roszko 9d32d208b8 Fix project lock both working and not working.
Turns out project locks would get created and only stick around for a short duration as the default move constructor was letting the og object free the lock.
But if you crashed kicad or managed something weird, you can get a lock file with no override prompt which also creates confusion as some stuff gets set read only.

So lets just fix this up.

- Implement move constructor on lockfile so that the old object will no longer free the lockfile
- Move lock ownership to the project itself, just slightly less weird to handle for the lock override
- Implement the override lock prompt
2025-06-01 20:20:49 -04:00
Jeff Young e615fcfe90 Improve progress reporting for opening and importing schematics. 2025-06-01 21:05:50 +01:00
Jeff Young a5d8cadeb9 Formatting. 2025-06-01 20:32:51 +01:00
Jeff Young d0f0c4022f Be explicit about avoiding catastrophic O(n^2) pretty printing we had in Altium importer. 2025-06-01 19:38:24 +01:00
Jeff Young f97ab279a3 Remove unused member variable. 2025-06-01 19:38:24 +01:00
Jeff Young 30748006f7 Standardize on American English spelling of "canceled". 2025-06-01 19:38:24 +01:00
Jeff Young 06dcb64ad8 Harden progress reporter API against misuse.
Also, titles are nouns, not verbs.  (Messages
*inside* reporters are verbs.)

Also implements progress reporter for Altium
schematic import.
2025-06-01 19:38:24 +01:00
Jeff Young 74fc5cde02 Don't save symbol library when importing Altium schematic.
The user can always export the symbol library from
the schematic if they want it.

This also improves performance by more than 100X
in the test case for #20299.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15468
2025-06-01 19:38:24 +01:00
Jeff Young 38c53edc39 Don't try to convert Altium UUIDs to KiCad.
They're different format and all it does is generate
exceptions and slow things down.
2025-06-01 19:38:23 +01:00
Jeff Young 59a172101b Formatting. 2025-06-01 19:38:23 +01:00
Alex Shvartzkop 20fa1f268b Update translations 2025-06-01 20:42:40 +03:00
dsa-t 24f6064ec2 Translated using Weblate (Russian)
Currently translated at 96.3% (9953 of 10327 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-06-01 19:42:00 +02:00
Alex Shvartzkop 985c77d8fd Update translations 2025-06-01 19:41:53 +03:00
dsa-t 675db6f7d6 Translated using Weblate (Tamil)
Currently translated at 99.4% (10263 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-06-01 18:41:07 +02:00
Anonymous 40840eeda5 Translated using Weblate (Tamil)
Currently translated at 99.4% (10262 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-06-01 18:40:43 +02:00
தமிழ்நேரம் f5e63a789b Translated using Weblate (Tamil)
Currently translated at 99.4% (10263 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-06-01 18:39:18 +02:00
Morad Tamer 676a6eeb68 Translated using Weblate (Arabic)
Currently translated at 1.0% (110 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ar/
2025-06-01 18:39:18 +02:00
co8 j 0575d86fa1 Translated using Weblate (Japanese)
Currently translated at 97.5% (10073 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-06-01 18:39:18 +02:00
Jan Straka f0ae463596 Translated using Weblate (Czech)
Currently translated at 75.1% (7761 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2025-06-01 18:39:17 +02:00
aris-kimi 58ecad7c78 Translated using Weblate (Greek)
Currently translated at 83.0% (8573 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/el/
2025-06-01 18:39:17 +02:00
Sárkány Lőrinc 29e41cf1c9 Translated using Weblate (Hungarian)
Currently translated at 26.8% (2776 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-06-01 18:39:17 +02:00
Henrik Kauhanen 99999cae10 Translated using Weblate (Swedish)
Currently translated at 99.8% (10309 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-06-01 18:39:17 +02:00
dsa-t e12e1b19ea Translated using Weblate (Russian)
Currently translated at 95.9% (9905 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-06-01 18:39:17 +02:00
Hildo Guillardi Júnior 3b8521c61a Translated using Weblate (Portuguese)
Currently translated at 88.2% (9105 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt/
2025-06-01 18:39:17 +02:00
ZbeeGin 43ae887c69 Translated using Weblate (Polish)
Currently translated at 100.0% (10323 of 10323 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-06-01 18:39:17 +02:00
jean-pierre charras 2124f2b846 SHAPE_ARC::GetCentralAngle(): better algo to calculate actual arc.
The old algo worked fine only if the arc "middle point" was on the middle
of the arc. This algo just needs a "middle point" on the arc, not necessary
exactly near the middle of the arc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21035
2025-06-01 10:12:40 +02:00
Jeff Young 65dfee161b Read Altium's showName property for fields.
Also fixes a potential crash bug in schematic
cleanup when breaking lines that are part of a
group.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20985
2025-05-31 22:14:09 +01:00
Jeff Young 70d8050002 Formatting. 2025-05-31 22:14:09 +01:00
Jeff Young a3c9454221 Tighten up footprint c'tor and copy c'tor.
Several fields weren't being initialized; several
other fields weren't being copied.
2025-05-31 22:14:09 +01:00
Jeff Young 9d3646ced1 Formatting. 2025-05-31 22:14:09 +01:00
John Beard 98efdaea5e QA Arc: add a test of SHAPE_ARC start/mid/end construction
Also add an expected-failure for an arc where a bad midpoint
should be corrected or rejected by the SHAPE_ARC constructor

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/21035
2025-05-31 19:30:23 +08:00
John Beard 1ad03f5717 QA: Fix angle-equality predicate
This was sometimes accepting a wrong value on the "other side" of
the correct value. Only actually affected one test, which is fixed.
2025-05-31 19:29:02 +08:00
Jeff Young d8a935be1c Tidy spacing in dialog. 2025-05-31 11:00:45 +01:00
Jeff Young 4a21da6b27 ADDED: field options for Update PCB from Schematic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21021
2025-05-31 11:00:45 +01:00
Jeff Young 62001204b7 CHANGED: share GUI and code between net-ties and jumpers.
ADDED: description of jumper groups for PCB Footprint
Properties dialog.

Also untangles the internal storage of the DRC exclusion
flags from the fabrication attributes.

Also removes allow-missing-courtyards from PCB footprint
properties because you can't edit the courtyards there
so it makes no sense.

(Which means the library parity checker also doesn't
need to check it as it will always match the library.)
2025-05-31 11:00:45 +01:00
Jon Evans 7e24210b1e API: Use net names, not codes, and allow creating new nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21027


(cherry picked from commit 0ff77bd332)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-30 22:13:44 -04:00
jean-pierre charras cbdfc279ff French translation update 2025-05-30 11:11:55 +02:00
JamesJCode 41601e9c2f Further DRC net class and component class match improvements
- Implements wildcard matching for constituent component classes
- Implements wildcard matching for effective net and component class names
2025-05-29 21:47:56 +01:00
Alex Shvartzkop ab036282d9 Update translations 2025-05-29 21:50:35 +03:00
CloverGit 2339c8077d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.1% (10122 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-05-29 20:49:02 +02:00
Sárkány Lőrinc a137e4e881 Translated using Weblate (Hungarian)
Currently translated at 26.9% (2776 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:02 +02:00
Marco Ciampa e54eacbefd Translated using Weblate (Italian)
Currently translated at 99.9% (10307 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-05-29 20:49:02 +02:00
Sárkány Lőrinc 4588f54f0c Translated using Weblate (Hungarian)
Currently translated at 26.8% (2771 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:02 +02:00
weblateuser 8f783e3282 Translated using Weblate (German)
Currently translated at 98.3% (10135 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-29 20:49:02 +02:00
Marco Ciampa 79455f31f3 Translated using Weblate (Italian)
Currently translated at 99.5% (10259 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-05-29 20:49:01 +02:00
CloverGit c4b2252c36 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.0% (10102 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-05-29 20:49:01 +02:00
EdizonTN 8718f8c3d0 Translated using Weblate (Slovak)
Currently translated at 53.9% (5557 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sk/
2025-05-29 20:49:01 +02:00
Sárkány Lőrinc 847d4e4f02 Translated using Weblate (Hungarian)
Currently translated at 26.6% (2743 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:01 +02:00
EdizonTN 221516ab50 Translated using Weblate (Slovak)
Currently translated at 53.8% (5546 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sk/
2025-05-29 20:49:01 +02:00
Sárkány Lőrinc 97d8e000df Translated using Weblate (Hungarian)
Currently translated at 26.2% (2711 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:01 +02:00
___davidpr 0f805a0368 Translated using Weblate (Serbian)
Currently translated at 8.5% (878 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sr/
2025-05-29 20:49:01 +02:00
Sárkány Lőrinc 40a73917ed Translated using Weblate (Hungarian)
Currently translated at 26.0% (2688 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:01 +02:00
ZbeeGin 2c653d5162 Translated using Weblate (Polish)
Currently translated at 100.0% (10308 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-05-29 20:49:01 +02:00
Sárkány Lőrinc 99b98a1c7c Translated using Weblate (Hungarian)
Currently translated at 25.9% (2675 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:00 +02:00
Pferd O 1b34e94f2c Translated using Weblate (German)
Currently translated at 98.3% (10134 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-29 20:49:00 +02:00
Sárkány Lőrinc f5fbe6c5a0 Translated using Weblate (Hungarian)
Currently translated at 22.6% (2332 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:00 +02:00
Henrik Kauhanen 26b2439855 Translated using Weblate (Swedish)
Currently translated at 99.8% (10296 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-05-29 20:49:00 +02:00
Pferd O f3869da53e Translated using Weblate (German)
Currently translated at 98.1% (10121 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-29 20:49:00 +02:00
Henrik Kauhanen 133436bc6f Translated using Weblate (Swedish)
Currently translated at 99.8% (10292 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-05-29 20:49:00 +02:00
dsa-t cba3d70781 Translated using Weblate (Russian)
Currently translated at 96.0% (9901 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-05-29 20:49:00 +02:00
Sárkány Lőrinc 121cd25527 Translated using Weblate (Hungarian)
Currently translated at 21.7% (2247 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-29 20:49:00 +02:00
Pferd O c00c426faa Translated using Weblate (German)
Currently translated at 98.1% (10119 of 10308 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-29 20:49:00 +02:00
Alex Shvartzkop 8550394cca Remove outdated GTK hack.
It is no longer needed with wx 3.2, and causes problems on themes like Adapta.

See https://gitlab.com/kicad/code/kicad/-/issues/9019
2025-05-29 20:44:56 +03:00
Jeff Young a1cc6403bd Remove selection before notifying grid of deletion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20747
2025-05-29 17:55:02 +01:00
Jeff Young 27abe86e0e Comments for wxBitmapCombobox hack.
(And a small increase in the fudge factor.)

(Note: this whole bailiwick is under review and
may get reverted.)
2025-05-29 12:25:30 +01:00
Jeff Young 8dadbc1c5c Insert a cover for wxBitmapCombobox.
(This will allow us to hack-fix wxWidgets' bug
for determining the height when fonts are scaled.
This commit includes such a fix, but I have no
idea if this particular one will work or not.)
2025-05-29 11:45:02 +01:00
Jeff Young 7679d6d96d Formatting & naming conventions. 2025-05-29 11:45:01 +01:00
Jeff Young 9601db4c97 Localizations must be done in real-time for language menu to work. 2025-05-29 11:45:01 +01:00
Jeff Young b5e7371275 Retire old fix in favour of enlarged grid rows.
(This should prevent vertical scrolling which is
what makes it look like the text disappears.  the
problem with using a GRID_CELL_TEXT_EDITOR is that
it doesn't support auto-complete.)
2025-05-29 11:45:01 +01:00
Jeff Young dd12961cce Restore missing gutter between columns. 2025-05-29 11:45:01 +01:00
Alex Shvartzkop 86de85ad78 Fix wxStyledTextCtrl in field properties dialog on MSW.
The sunken border was included in the size calculation on Windows, causing the same visibility bug.

Use a panel with a border that wraps the control instead.

(cherry picked from commit 830b963b3a)
2025-05-29 12:37:34 +03:00
dsa-t 004645db32 Unset PCM button to avoid crash on close.
(cherry picked from commit 6a003b94d6)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-05-29 12:29:55 +03:00
jean-pierre charras 7dfa680eb4 PCB_PLOT_PARAMS::Format(): use locale independent double to string converter 2025-05-29 10:17:29 +02:00
dsa-t 9aab186c38 Protect against concurrent wxPlatformInfo access at startup.
wxPlatformInfo is not thread-safe.

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


(cherry picked from commit aeb124294e)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-05-28 21:27:38 +03:00
dsa-t 81e4f4efeb Fix text disappearing in field properties dialog for Value.
Also keeps vertical alignment by increasing descent.

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


(cherry picked from commit 11d1e50bfc)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-05-28 20:39:36 +03:00
Jeff Young 5fe8763513 Revert previous hack. Alex has something better on the way.... 2025-05-28 18:17:13 +01:00
Jeff Young 5e337567d4 Another attempt to fix Scintilla vertical scrolling issue. 2025-05-28 18:11:29 +01:00
Jeff Young c5947d8901 Fix Scintilla vertical scrolling issue.
(At least on MacOS.  *May* also fix GTK.)
2025-05-28 13:54:01 +01:00
Tomasz Wlostowski c5a4f9e747 router: make sure we are not committing VIAs with non-unique IDs, fixes random disappearing via issue
Note to self:
LINE_PLACER::FixRoute used to silently reclaim the UID of the transient via (as used by the SHOVE's heads tracking logic).
Depending on the particular sequence of user events (the bug is next to impossible to reproduce on a touchpad), this would
result in freshly placed vias disappearing...

Fixes https://gitlab.com/kicad/code/kicad/issues/20999
2025-05-28 13:44:49 +02:00
jean-pierre charras 3813cbd40b Make changes in LOCALE_IO more easy (simplify locale_io.h).
No actual change in code.
2025-05-28 13:26:57 +02:00
jean-pierre charras 4ee1542e4f Ensure double DSNLEXER::parseDouble() is locale independent with old compilers
This was already the case for "recent" compilers.
2025-05-28 11:29:21 +02:00
Jeff Young 6e1c46ad0f Fix some bugs introduced with new hatch connection algo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20998
2025-05-28 10:09:22 +01:00
Jon Evans 04b9fc76d0 PNS: Fix early exit from followTrivialPath
Don't mark a segment as visited until the
start of the next loop.

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


(cherry picked from commit 52e9cdde99)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-26 22:48:13 -04:00
Jon Evans 061cb2eba8 API: Add CheckPadstackPresenceOnLayers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20587


(cherry picked from commit d1e4b03ec1)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-26 21:47:44 -04:00
Jon Evans 71eeb754b3 API: Don't set human-readable path that isn't actually
(cherry picked from commit 9466cab585)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-26 20:07:02 -04:00
Jon Evans dd80797aa4 Don't bypass empty visibility recovery due to migration
In some situations, loading a project in 8.0 would wipe the
object visibility settings but the local settings also
require a format migration.  The migrator was adding visibility
for the shapes layer in this situation, bypassing the recovery
from having no objects visible.


(cherry picked from commit 81ea108d8c)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-26 15:19:42 -04:00
JamesJCode 7176dbe6dc Re-implement wildcard matches for netclass constituents in DRC evaluation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20955
2025-05-26 19:18:56 +01:00
Jeff Young e8e7282fe1 Fix a bunch more bugs in bezier approximation. 2025-05-26 18:12:43 +01:00
Jeff Young e44c5a7fcd Use maxError when converting bezier to polyline.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20312
2025-05-26 13:37:57 +01:00
Jeff Young 2dd28d18e8 Performance improvements for ERC. 2025-05-26 13:37:57 +01:00
Graham Keeth 6bb3fc39df Sim: correctly netlist AM/SFFM current sources
AM and SFFM current sources were being netlisted as voltage sources due
to the wrong prefix being added.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20994
2025-05-26 09:08:01 +00:00
Jeff Young 1237756b4a More performance improvements. 2025-05-25 20:53:07 +01:00
Jeff Young df0aefab59 Fix MSW compile error. 2025-05-25 20:52:56 +01:00
Jeff Young ef395d3957 Slight performance improvements. 2025-05-25 20:01:18 +01:00
Jeff Young 7605bb7586 Slight performance improvement to CleanupBoard. 2025-05-25 20:01:18 +01:00
Jeff Young aa49b0319a Fix faulty logic for setting range.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20982
2025-05-25 20:01:18 +01:00
Jeff Young 327cca9de5 Coverity fixes. 2025-05-25 20:01:18 +01:00
Jeff Young 1e45ca3e65 A couple more memory leaks. 2025-05-25 20:01:18 +01:00
jean-pierre charras 134e3140ff Simulator fix error message or crash in user-defined signal dialog
It happens when deleting all chars using backspace key

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20991
2025-05-25 17:36:27 +02:00
Jeff Young 96dfff2f07 Better solution to memory leaks. 2025-05-25 11:19:09 +01:00
jean-pierre charras 5f17a7b024 Fix a compil warning. 2025-05-25 11:20:39 +02:00
Jeff Young d2305957d8 Reduce designBlock memory leaks. 2025-05-25 09:28:37 +01:00
Jeff Young 42c68f1a16 Uniform application of recursion guards in simulation code. 2025-05-25 09:09:11 +01:00
Jeff Young ed1b4f6e5a Better and more complete recursion guards.
(ie: ones that actually work.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20990
2025-05-24 22:39:03 +01:00
Jeff Young 1c8f971789 Fix typo in comparator. 2025-05-24 21:41:28 +01:00
Mark Roszko 3d68d47f09 Show [read-only] in the title bar based on the project's state
(cherry picked from commit 9d07784835)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-24 20:11:36 +00:00
Mark Roszko e97c920fbd Ensure symbol pins are sorted before infering spice pin mapping
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20590


(cherry picked from commit 2d8c805107)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-24 18:41:57 +00:00
Jeff Young 61d36f9d29 Fix recursion issues with text variables.
1) Pass aDepth down through those versions of
CreateModel() which expand text variables

2) Be aware that unresolved text variables look
just like unexpanded text variables.
2025-05-24 18:30:30 +01:00
Jeff Young aae4833c94 Add autocomplete for OP:power.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20984
2025-05-24 18:30:30 +01:00
Jeff Young e03cb736f2 Move board functions to BOARD_EDITOR_CONTROL. 2025-05-24 18:30:30 +01:00
Jeff Young a3ac56e1a6 Minor cleanup. 2025-05-24 18:30:30 +01:00
Jeff Young 55992e6ff0 More ID eradication. 2025-05-24 18:30:30 +01:00
John Beard ce3806fbf7 Sym edit: report errors using a REPORTER on CSV pin table import
Also allow the user to cancel the process if they get an error report
(or choose to continue).
2025-05-24 21:11:03 +08:00
John Beard afd3b97c51 Sym edit: allow translated and untranslated strings in CSV import
This should make it easier to transfer CSV between users with different
locales.
2025-05-24 20:14:41 +08:00
John Beard 4925abc116 Symbol edit pin table: even up borders in right-hand panes 2025-05-24 18:36:22 +08:00
John Beard 83ea3397c3 CSV: quote everything to avoid locale-dependency
Avoids having to reason about locales where the decimal separator
is a comma.

This should still work for IO purposes (checked in LibreOffice, numbers
still end up right aligned as expected).
2025-05-24 18:22:33 +08:00
Mark Roszko f3d445efc9 Prevent crash on failure to load ngspice's dll
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20695


(cherry picked from commit f35078cb29)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-24 04:17:28 +00:00
Mark Roszko 280031f6e0 Prevent oob string access in SCH_REFERENCE::IsSplitNeeded
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20948


(cherry picked from commit 10c7796336)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2025-05-24 04:02:20 +00:00
Marek Roszko cada104957 Fix tuning patterns (generators) not being arrayed properly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20617
2025-05-23 21:49:41 -04:00
Seth Hillbrand 9d32de5154 Avoid deref on missing part
We do not always have the LIB_SYMBOL set in a SCH_SYMBOL, so avoid
trying to get the embedded files from it

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20986
2025-05-23 17:03:47 -07:00
Marek Roszko 5e4ad048e2 Load the saved rule area uuid back in
Partial fix for https://gitlab.com/kicad/code/kicad/-/issues/20918
2025-05-23 19:51:30 -04:00
Jeff Young 4bb54b3439 Move more stuff to ACTIONs framework. 2025-05-23 15:19:49 +01:00
jean-pierre charras 6a9b427562 3D viewer: do not change anything in the board shared by the FP editor.
Especially, the BOARD managed by FP editor had is m_project member reinitialized
when creating the 3D viewer, thus creating issues in FP editor, and create
a crash when closing kicad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20964
2025-05-23 15:56:25 +02:00
Jeff Young 759c953ee7 Un-collapse menu name from tooltip. 2025-05-23 12:33:27 +01:00
Jeff Young 3c0d5d1e09 Nullptr safety. 2025-05-23 12:15:03 +01:00
Jeff Young 3e28cd4f69 Nullptr safety. 2025-05-23 12:15:03 +01:00
Mark Roszko c37762f015 Edit .gitlab-ci.yml 2025-05-22 23:18:44 +00:00
Mark Roszko 42a5d86a76 Disable Windows CI temporarily while the kraken is fought 2025-05-22 11:19:53 +00:00
Marek Roszko e32b3c4f61 Move kicad-vcpkg forwards for occt 7.9.1 2025-05-22 00:12:12 -04:00
Marek Roszko f06216a64a Bump wxwidgets in vcpkg 2025-05-21 23:05:21 -04:00
Marek Roszko 99762565bd Update vcpkg baseline 2025-05-21 19:53:02 -04:00
Wayne Stambaugh 19cb41722a Make directive label text color behave like other labels.
Label text color will inherit from the assigned net class.  Apparently
this was overlooked when the directive labels were implemented.
2025-05-21 12:51:35 -04:00
jean-pierre charras 6d064e8bb3 Fix pcbnew.py BOARD_ITEM::Duplicate() after changes in board_item.h changes 2025-05-21 18:23:36 +02:00
Jeff Young bcaba0184c Dirty parent group before modifying its members. 2025-05-21 15:57:34 +01:00
Jeff Young f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Mike Williams 2b5b3ffb8d sch selection: fix non-greedy line selection
Make sure we selected at least one end before selecting.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20942
2025-05-21 08:54:37 -04:00
Alex Shvartzkop c5326e7fce Update translations 2025-05-21 05:16:51 +03:00
தமிழ்நேரம் 97b11e1423 Translated using Weblate (Tamil)
Currently translated at 99.9% (10289 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-05-21 03:54:18 +02:00
Sárkány Lőrinc cea21b5adb Translated using Weblate (Hungarian)
Currently translated at 21.1% (2172 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-21 03:54:18 +02:00
Pferd O f0445951dc Translated using Weblate (German)
Currently translated at 98.5% (10144 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-21 03:54:18 +02:00
தமிழ்நேரம் 53404248e8 Translated using Weblate (Tamil)
Currently translated at 90.9% (9359 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-05-21 03:54:18 +02:00
Jason Son 9ac70e9223 Translated using Weblate (Korean)
Currently translated at 94.9% (9772 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-05-21 03:54:18 +02:00
Sárkány Lőrinc 56b46c69e3 Translated using Weblate (Hungarian)
Currently translated at 14.7% (1522 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-21 03:54:18 +02:00
தமிழ்நேரம் c3eb3b4e84 Translated using Weblate (Tamil)
Currently translated at 63.6% (6551 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-05-21 03:54:18 +02:00
Sárkány Lőrinc e542ed283b Translated using Weblate (Hungarian)
Currently translated at 14.5% (1496 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-21 03:54:18 +02:00
தமிழ்நேரம் 2c914334b4 Translated using Weblate (Tamil)
Currently translated at 53.4% (5501 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-05-21 03:54:18 +02:00
Sárkány Lőrinc 76b5ef3370 Translated using Weblate (Hungarian)
Currently translated at 13.9% (1435 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-21 03:54:18 +02:00
தமிழ்நேரம் 72075646cb Translated using Weblate (Tamil)
Currently translated at 47.8% (4926 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ta/
2025-05-21 03:54:18 +02:00
CloverGit 8891bb7523 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.3% (10125 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-05-21 03:54:18 +02:00
Sárkány Lőrinc db5756ac03 Translated using Weblate (Hungarian)
Currently translated at 13.3% (1378 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-21 03:54:18 +02:00
Sárkány Lőrinc 315a018bdc Translated using Weblate (Hungarian)
Currently translated at 10.0% (1039 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-05-21 03:54:18 +02:00
2tama3 8f05fb10f8 Translated using Weblate (Japanese)
Currently translated at 97.7% (10061 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-05-21 03:54:17 +02:00
Tevfik Bagcivan 136b2255de Translated using Weblate (Turkish)
Currently translated at 63.5% (6535 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-05-21 03:54:17 +02:00
co8 j 9dc8a58f80 Translated using Weblate (Japanese)
Currently translated at 97.6% (10046 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-05-21 03:54:17 +02:00
Pferd O 0535528dc4 Translated using Weblate (German)
Currently translated at 98.5% (10136 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-21 03:54:17 +02:00
Jan Straka 7299ea1093 Translated using Weblate (Czech)
Currently translated at 75.5% (7772 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2025-05-21 03:54:17 +02:00
Adolfo Jayme Barrientos 8112a936c6 Translated using Weblate (Catalan)
Currently translated at 40.7% (4191 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-05-21 03:54:17 +02:00
Ivan Chuba 5125eaf0b3 Translated using Weblate (Ukrainian)
Currently translated at 74.8% (7699 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-05-21 03:54:17 +02:00
2tama3 21d8ea3909 Translated using Weblate (Japanese)
Currently translated at 97.5% (10037 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-05-21 03:54:17 +02:00
Adolfo Jayme Barrientos b2e1eb02f4 Translated using Weblate (Catalan)
Currently translated at 40.6% (4188 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-05-21 03:54:17 +02:00
Henrik Kauhanen 37c98b3eff Translated using Weblate (Swedish)
Currently translated at 99.8% (10274 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-05-21 03:54:17 +02:00
ZbeeGin 40fa0bf271 Translated using Weblate (Polish)
Currently translated at 100.0% (10290 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-05-21 03:54:17 +02:00
Pferd O e01a7d272c Translated using Weblate (German)
Currently translated at 98.2% (10105 of 10290 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-21 03:54:16 +02:00
aris-kimi 0cf866d4fb Inline static bool Fp/3Dmode members to remember panel layout
Layout is remembered for Schematic/Symbol Editors and Footprint Chooser frames until KiCad restarts

Also Added a new button toggle to show/hide the description panel with some new images too


Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17610
2025-05-20 16:16:01 -07:00
Seth Hillbrand 9508979040 Safety valve for integer sqrt
If the value is negative, we have likely overflowed the available size
of the integer container.  In which case, rather than slowly counting
down, we return the largest logical square root size to allow processing
to continue

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

(cherry picked from commit b47bf99632)
2025-05-20 15:14:36 -07:00
Mike Williams 8ad9634498 pcb: add track change layer command
Works the same as the prev/next layer commands, but the addition of CTRL
brings the track with it.
2025-05-20 15:48:49 -04:00
Mike Williams c09e9da471 router: make layer next/previous actions work consistently
UI was getting out of sync with router and they could be on different
layers. There was also some confusion about whether previous layer was
the opposite of next layer (-1/+1 to current layer), or effectively a
back button for the current layer.
2025-05-20 11:25:07 -04:00
John Beard 3172a5a735 BOARD: add a bit more detail to some debug 2025-05-19 23:45:21 +08:00
John Beard 60d18176ef Clang-format: better match code policy example for constructors
AllowAllConstructorInitializersOnNextLine and
ConstructorInitializerAllOnOneLineOrOnePerLine are both deprecated.

PackConstructorInitializers=Never is the most similar setting to
most code and the example in the policy document. E.g. this does not
get reformatted:

    STRINGFORMATTER( int aReserve = 300 ) :
        buffer( aReserve, '\0' )
    {
    }
2025-05-20 18:46:00 +08:00
John Beard 15be27845d Clang-format: ignore .clang-format
The _clang-format file is correct - avoid accidentally adding
a .clang-format file as well (the two files do the same thing).
2025-05-20 18:46:00 +08:00
Seth Hillbrand 9bedb6eedb Fix silk board edge collision case
First, fix the error limit check in drc_test_provider_edge_clearance.
Then, we rotate the final point incorrectly in SHAPE_ARC::Collide (need
negative angle).  We were not checking this result in the QA, so add the
proper tests
2025-05-19 17:49:03 -07:00
Mike Williams 6ca8078ca4 router: add missing commit change 2025-05-19 15:23:42 -04:00
Mike Williams 2f94b241ab router: intelligently guess next layer when placing vias with ratnest
Chooses the layer of the closest ratsnest item
2025-05-19 14:55:30 -04:00
Mike Williams 8ec70ee92b PCB: unroute segment
Works like the backspace key in the router, but for segments that are
already placed.
2025-05-19 14:05:14 -04:00
jean-pierre charras 1859330f74 Zoom actions: add zoom to selected objects to view/zoom sub-menus.
This action exists since some time ago, but is shown nowhere. It is now
show in view menu of board editor and schematic editor.
2025-05-19 19:43:11 +02:00
Mike Williams 22b24bb4df pcb search: don't list generators in groups 2025-05-19 09:10:47 -04:00
Mark Roszko 8a0d89c45c Remove the duplicate clang-format file 2025-05-19 11:20:13 +00:00
jean-pierre charras 4d0c7859e2 Zoom actions: add tool-tips and better FriendlyName when possible. 2025-05-18 20:16:21 +02:00
jean-pierre charras 0dd4e707cc try to fix a qa test (fast fix, not the better fix) 2025-05-18 15:39:19 +02:00
jean-pierre charras 0342524afc kicad-cli, gerber export, very minor fix: remove duplicate option
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20930
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20931
2025-05-18 13:49:47 +02:00
jean-pierre charras 69891438a6 Coverity warning fixes. 2025-05-18 13:44:04 +02:00
Wayne Stambaugh d16d2f5a5b Fix a cadre of symbol pin alternate issues.
Prevent the file formatter from writing and the file parser from loading
symbol pin alternates that have an empty name or when the alternate name
is the same as the default pin name.  Apparently at some point they were
able to be created and saved.

Do not allow SCH_PIN::SetAlt() to set an alternate name when the name
does not exist in the library symbol pin alternate list.  This required
fixing the associated QA test.

When updating or changing schematic symbols from library, reset the pin
alternate to the default when the alternate no longer exists in the
symbol.

Do not populate pin alternates context menu with duplicate default pin.

Clear orphaned pin alternates to the default when saving symbols from
symbol editor.
2025-05-17 14:20:07 -04:00
Damjan 447b7426fd 3d_viewer: hatched polygons shown as solid 2025-05-17 17:45:29 +00:00
jean-pierre charras 7c87da41cf Fix Coverity warnings (uninitialized member), round 2 2025-05-17 16:00:30 +02:00
jean-pierre charras 8480b27042 Hatched circle shape: fix incorrect clipping of hatches.
- Fix size of converted polygon in Pcbnew
- Fix approximation of converted polygon in Eeschema: one cannot use ARC_HIGH_DEF
as error in Eeschema because this value is defined for Pcbnew, and not suitable
in Eeschema.
2025-05-17 14:01:02 +02:00
Seth Hillbrand 484c35c44f When cycling next/prev selection, keep only single
We want to have only the current item in the selection rather than all
of them

(cherry picked from commit 62e1169492)
2025-05-16 09:27:38 -07:00
Seth Hillbrand 53a6deb080 Properly use optional
By dereferencing first, we force a get() on the optional and try to pass
that to a routine that takes an optional parameter.  Just passing the
optional reference protects against accessing an invalid

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

(cherry picked from commit 6c09957799)
2025-05-16 08:54:20 -07:00
Wayne Stambaugh 46b24a5b68 Fix update symbol from library when alternate pins are in play.
ADDED: An option in the update symbol dialog to reset alternate pins to
       their default value.

Don't set the symbol alternate pin when the updated symbol no longer
contains the alternate pin name.

Clear the alternate pin name when it's set to the default pin name.  This
is caused by a bug somewhere which hasn't been resolved and it causes the
library symbol comparison to fail when it's set.

This also changes the change/update symbol dialog layout.  Adding another
option check box was making the dialog too tall.  The option check boxes
were split into two columns which made the dialog wider.  It might be
worth using another wxCheckListBox for the options as more are added.
2025-05-16 07:39:16 -04:00
Alex Shvartzkop d59ffdcaa3 Use ToCDouble in ValueStringCompare. 2025-05-16 04:09:43 +03:00
Olliver Schinagl cf3dbfbbe6 export_vrml: Fix 3D model destination timestamp check
Not all hosts have `wxHAS_HUGE_FILES` enabled, which causes us to drop
millisecond resolution accuracy. In some cases, this can cause
race-conditions with externally generated components such as by KiBot
(which generates THT components with color bands on the fly), which runs
so fast, that we fall within a second resolution.

When setting the destination timestamp, there's only two valid options.
Either the destination file exists, and if it does, we use the
destination file's timestamp (current behavior) or it does not exist, in
which case we should use an 'invalid' (null, NaN, whatever).

Calling the constructor sets this up correctly and then only setting the
timestamp if the file exists. Nothing else.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20877
2025-05-15 11:30:31 -07:00
Mike Williams 2baeecbee8 groups/design blocks add convenience methods for placing/updating 2025-05-15 14:26:56 -04:00
jean-pierre charras a59a522438 Fix Coverity warnings (uninitialized member) 2025-05-15 17:40:39 +02:00
jean-pierre charras 0ddce3b210 PDF plot, auto scale: fix position of board on sheet
When not using a 1:1 scale, the board must be centered on sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20929
2025-05-15 10:35:59 +02:00
Seth Hillbrand 8a0e9bef5a Do not insert newlines in single line controls
2d2f443aa4 allowed the use of shift-enter
when creating tables for newlines.  However, this should not be applied
to all text controls.  We split the ones by IsMultiLine to determine if
the shift-return is a newline or a dialog close

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20866
2025-05-14 17:13:13 -07:00
Marek Roszko 42ccbe618d Fix menus in pdf broken by 3dpdf changes
woops
2025-05-14 19:48:15 -04:00
Seth Hillbrand e06e60882d Revise hierarchical sorting
The lexicographical sort for hierarchical pages needs to satisfy the
following:
- Ensure a parent comes before all its children
- Ensure all children with the same parent are sorted by page number
- Ensure all of a parent's children come before the parent's next sibling

To do this, we need to compare at each path level before descending

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20701
2025-05-14 16:45:29 -07:00
Seth Hillbrand 2e357fbfa0 Protect tool against null selection 2025-05-14 16:43:17 -07:00
Seth Hillbrand 4a896f84f5 Fix how blind/buried vias are handle in IPC356
Code 307 is used for blind/buried vias.  Additionally, the access layer
is represented based on sequential layer numbers and needed to be
adjusted for new layer numbering

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20928
2025-05-14 15:59:19 -07:00
Seth Hillbrand b2cfcd567e Prevent unneeded copy 2025-05-14 10:05:37 -07:00
Mike Williams 3fdc576422 sch groups: don't leave undone items in groups 2025-05-14 12:46:01 -04:00
Mike Williams 3c5a48868b groups: add ability to add selection to group 2025-05-14 12:15:22 -04:00
Mike Williams 195e79ae46 commit/groups: add ability to modify membership of group
Also add warning when you've tried to modify two groups in one commit,
which isn't currently supported.
2025-05-14 12:15:22 -04:00
jean-pierre charras eff4cdd6b4 French translation update 2025-05-14 18:14:02 +02:00
jean-pierre charras d3256c3430 PDF plotter: fix missing data that prevent Adobe Acrobat to open these PDF
(The issue is due to a recent change (Commit 0268ed6d) in code)
2025-05-14 17:31:20 +02:00
Jeff Young 085af89381 Only report single-file issues in single-file-mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20891
2025-05-14 16:23:40 +01:00
Jeff Young 38385340b1 Don't report missing color theme in B&W mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20923
2025-05-14 15:41:37 +01:00
Seth Hillbrand 750dbe6336 Fix usage of PCB_FIELD( PCB_TEXT& )
Passing a pointer to the CTOR invokes the PCB_FIELD( BOARD_ITEM* ) ctor,
which is not what is intended.  Passing just the reference is better but
still ends up creating a PCB_FIELD class with type PCB_TEXT because it
didn't correctly set the type.  So we need to properly set our type and
our parent, then copy the text attributes over.  We can't use the
default copy operator because this also copies the struct_id of PCB_TEXT

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20875
2025-05-13 17:44:59 -07:00
Salvador E. Tropea c2c987f9c0 Always use PCB_PLOTTER::PlotJobToPlotOpts for plotter exports
Removes PCBNEW_JOBS_HANDLER::populateGerberPlotOptionsFromJob
2025-05-14 00:42:05 +00:00
Mike Williams bfc47bf387 sch->pcb: fixes for adding items to existing group 2025-05-13 14:42:27 -04:00
Mike Williams 8e480445bc groups: add search handlers 2025-05-13 14:42:27 -04:00
Jeff Young a64278a12c Honour 0-width strokes on filled shapes. 2025-05-13 18:00:09 +01:00
Jeff Young af4d14b66c 0 width means 0 width when plotting text.
There's no such thing as a default line width
for text.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20916
2025-05-13 17:48:58 +01:00
Jeff Young 420b253ac4 Search board layer names when plotting Gerbers from CLI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20904
2025-05-13 17:38:05 +01:00
Mike Williams e64be2f208 pcb groups: copy nested groups on copy/paste 2025-05-13 10:41:32 -04:00
Mike Williams b30690664f commit: clear group membership from abandoned commit item copies 2025-05-13 10:41:32 -04:00
Mike Williams d2f0a13515 groups/design blocks: add lib link to groups from design blocks
Also add Place Linked Design Block function.
2025-05-13 10:41:32 -04:00
jean-pierre charras 63babb1a22 Footprint chooser: fix crash when closing the dialog with a large footprint.
The crash was perhaps due to use after delete of data in DTOR functions, when
a footprint with a **lot** of graphics was loaded and the view cleared.
The view is now cleared before any other deletion.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20915
2025-05-13 16:10:56 +02:00
Jeff Young f690b42b53 Read/write chaining tolerance to job params.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20906
2025-05-13 13:17:56 +01:00
Jeff Young 4cd2e947a1 Slice() must also support aMaxError.
In some cases arcs are re-inserted.
2025-05-13 12:03:41 +01:00
Jeff Young 24bb72c3cf Update CLI gold files for higher arc definition. 2025-05-13 10:09:26 +01:00
Jeff Young 7f4853b8a5 Third go at fixing the kimath test. 2025-05-13 09:57:13 +01:00
Jeff Young acf1dca1e1 Another go at fixing the kimath test. 2025-05-13 08:45:50 +01:00
Jeff Young a95f5172c9 Formatting. 2025-05-12 21:59:37 +01:00
Jeff Young 32cd142c39 Allow math tests to run with their own precision. 2025-05-12 21:57:52 +01:00
Jeff Young f54ae5246c Update Cadstar gold file for increased precision. 2025-05-12 21:40:48 +01:00
Jeff Young c3a0621dfb Formatting. 2025-05-12 20:28:47 +01:00
Jeff Young b70d3586c9 Use native arcs (not approximated ones) when converting circles to polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20895
2025-05-12 20:28:47 +01:00
Jeff Young 3474e962d5 Use a high definition for display of arcs in SHAPE_LINE_CHAINs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20895
2025-05-12 20:28:47 +01:00
Jeff Young 6757ba8165 Use consistent terminology and types. 2025-05-12 20:28:47 +01:00
Jeff Young c2537f81b7 Use board maxError for teardrops. 2025-05-12 20:28:47 +01:00
Jeff Young a65534a337 Use lower error limit where appropriate.
In both these cases we're just checking for a well-formed
outline.  We don't use the resulting poly.
2025-05-12 20:28:47 +01:00
Jeff Young 9ec4c9f540 Algorithmic safety.
Don't let computation times blow up.
2025-05-12 20:28:47 +01:00
Tomasz Wlostowski 96cd5ea8c1 revert #07a86873c (accidental debug code) 2025-05-12 15:25:10 +02:00
Tomasz Wlostowski 1907580b82 router: initial fix for 'reshoving' tracks whose clearance has been increased 2025-05-11 23:56:39 +02:00
Tomasz Wlostowski 07a86873ca topo match by value + prof 2025-05-11 23:46:49 +02:00
Marek Roszko e30fdcb500 Write fileinput stream directly to zliboutput stream in Plot3DModel 2025-05-11 14:11:13 -04:00
Mark Roszko 7e7b3762bb Add u3d file extension to FILEEXT 2025-05-11 17:54:47 +00:00
jean-pierre charras 033fcc0f6b French translation update 2025-05-11 19:47:28 +02:00
Marek Roszko 961de62278 Remove extra include from job headers 2025-05-11 13:28:41 -04:00
Michal Suchanek 8110347844 Define GL_SILENCE_DEPRECATION globally on OS X 2025-05-11 15:50:10 +00:00
Michal Suchanek 81bbb5e67b Define WIN32_LEAN_AND_MEAN globally
In modern Windows code WIN32_LEAN_AND_MEAN should be defined.

Without this define windows.h pulls in some legacy headers, notably
winsocks.h. Modern code that cares about winsocks includes winsocks2.h
which conflicts with winsocks.h. Other code that does not care about
winsocks (OpenGL, fontconfig, ...) includes windows.h pulling in legacy
winsocks.h, causing definition conflicts and build errors.

At worst defining WIN32_LEAN_AND_MEAN requires explicitly including some
additional headers on Windows.
2025-05-11 15:50:10 +00:00
Michal Suchanek ca54db2db4 windows: Fix build on case sensitive filesystem 2025-05-11 15:50:10 +00:00
Michal Suchanek fbf0d32391 cmake: Fix wxWidgets platfrom detection
wx-config --selected-config gives
x86_64-w64-mingw32-msw-unicode-static-3.2

Which in turn gives wxWidgets port 'x' with "^[msw|qt|gtk|osx]*"
2025-05-11 15:50:10 +00:00
Michal Suchanek df33ec79f7 test_ki_any: Add missing cstdint include
This is probably pulled in by some of the other includes for some build
configurations, but not always.
2025-05-11 15:50:10 +00:00
Marek Roszko 0268ed6d28 Add 3d pdf functions to PDF_PLOTTER to reduce rebasing pain 2025-05-11 11:47:37 -04:00
Jeff Young 57a3a3a2ec ADDED: hidden fields control for PCB find.
(Also improved label of control for SCH find.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20871
2025-05-11 11:35:15 +01:00
Jeff Young 5e6ef67fce Plot drill marks on mask layers if the pad exists there.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20859
2025-05-10 19:07:13 +01:00
Jeff Young 34139ae305 Push generalised sketch-mode support down into DXF_PLOTTER. 2025-05-10 17:31:59 +01:00
Jeff Young 3458534fd7 Cleanup plotting APIs. 2025-05-10 17:31:59 +01:00
Jeff Young 225b6aa2e8 Remove sketch-plot-mode support from Gerber and PS.
(It was never enabled for Gerber anyway.)
2025-05-10 17:31:59 +01:00
Jeff Young 88695af364 Move sketched DNP items to plot_brditems_plotter.cpp. 2025-05-10 17:31:59 +01:00
Jeff Young 3f41090630 Move drill-mark generation into GENDRILL_WRITER_BASE. 2025-05-10 17:31:59 +01:00
Jeff Young c78ce373fd Move pad-outline plotting to plot_brditems_plotter.cpp. 2025-05-10 17:31:59 +01:00
Jeff Young c452fe9686 REMOVED: HPGL plotting.
Its sketch-mode greatly complicates the plotting
code and it is poorly maintained due to lack of
use.
2025-05-10 17:31:59 +01:00
jean-pierre charras db23ee481c Pcbnew: fix an issue that prevent to write the right layer type in brd files
In layers block, the file type for User.n was always written as "user" type.
However this type can be set to "front" or "back" by the board settings
dialog (Off-board, front or Off-board, back) and allowed in file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20892
2025-05-10 16:59:40 +02:00
Seth Hillbrand 85a78c4530 Check for valid board before query
New items may not have a board set and will return nullptr

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

(cherry picked from commit cd3fea196c)
2025-05-09 13:45:40 -07:00
Seth Hillbrand ca7fbbe176 Add wait dialog when switching projects
If we are in the middle of a git operation when switching projects, wait
and show the user a dialog explaining what is going on
2025-05-09 13:31:46 -07:00
Seth Hillbrand c06ddf966d Don't overwrite explicit sizes unless needed
We already did this for single-ended, this extends to dp routes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20889
2025-05-09 13:31:39 -07:00
Seth Hillbrand fe0422b958 Fix infinite loop in QuasiModal
Now that we use RAII nuller, we need to avoid the case where
m_qmodal_loop is nulled before it ends

(cherry picked from commit 75fa0ab0c9)
2025-05-09 10:28:29 -07:00
Seth Hillbrand fc6f1f41d2 Make sure we re-hide hidden fields
Fields that are forced to be shown need to be re-hidden when the find
dialog closes.  While they are _also_ brightened, this flag may be
cleared by other processes, so we need to test for the forced visibility
as well.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20865
2025-05-08 16:47:55 -07:00
Seth Hillbrand fd3620296b Remove errant printf 2025-05-08 15:55:30 -07:00
jean-pierre charras cc75b511ba Eeschema, Net Navigator: fix incorrect refresh of nets tree.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20648
2025-05-08 11:40:50 +02:00
jean-pierre charras 4de6be8124 Fix a collision name in a windows header (GROUP). Windows specific.
Changed to GROUP_PLACEMENT (No actual code change)
2025-05-08 11:15:55 +02:00
Jon Evans 71417fbe3b API: Use action wrapper for setting grid origin
Fixes https://gitlab.com/kicad/code/kicad-python/-/issues/47
2025-05-07 23:28:19 -04:00
Seth Hillbrand 97296a3b08 Properly handle arc coupled items
When arcs do not share a center, the circle formed by the arc will be
closer on one side than the other.  When this happens, the NearestPoints
calculation was accidentally taking the distance from the wrong side of
the circle.

Note that this was likely due to the conventions for Rotate (positive =
reduce angle) being mixed up with angular addition

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20636
2025-05-07 13:12:05 -07:00
Seth Hillbrand 99a0f00087 Prevent assertion when flipping
Markers do not flip, so avoid including them
2025-05-07 13:10:43 -07:00
Mike Williams 5a87978099 build: don't use a GTK specific notebook function 2025-05-07 14:22:27 -04:00
Mike Williams a582c51de7 multichannel/shapes: don't try to rectify empty polygons 2025-05-07 14:10:22 -04:00
Mike Williams 87c91fea3d multichannel: support groups 2025-05-07 12:40:59 -04:00
Mike Williams a17ef3fd93 groups: add support for syncing from SCH->PCB 2025-05-07 12:40:59 -04:00
Jeff Young b14472e105 Skip same-net-checking for hole-to-hole collisions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20547
2025-05-07 13:28:48 +01:00
Salvador E. Tropea c519a6b827 Fix kicad-cli pcb export pdf --mode-multipage
So it generates one PDF instead of multiple PDFs
2025-05-06 22:50:18 +00:00
Jeff Young 8945bcc231 Also trim board item layersets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20063
2025-05-06 18:42:13 +01:00
Jeff Young da242ec3f3 Trim library layers to instance board before comparing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20552
2025-05-06 17:54:25 +01:00
Jeff Young e64c7a4aba Don't apply coupling rules to tuning patterns. 2025-05-06 17:54:25 +01:00
Salvador E. Tropea 1c07703851 Add "scale" option to "pcb export plotter" CLI and JOB
- Not for gerbers
- DXF, HPGL, PDF, PS and SVG
- Remove the GUI limitation that prevented the use of border & title when
  using a scale != 1
2025-05-06 16:32:53 +00:00
Mike Williams 71f71641c2 groups: dialog needs shared_ptr for lifetime issues
Tool resets were deleting the commit out from under us.
2025-05-06 11:29:42 -04:00
Mike Williams 9ca881112b design blocks: as place as group functionality to schematic 2025-05-06 11:29:42 -04:00
Mike Williams 217b6d0e30 PCB: handle area calculations in groups/generators 2025-05-06 11:29:42 -04:00
Jeff Young ea8b0c0e8a Don't expect a B item when evaling DIFF_PAIR_GAP_CONSTRAINT.
The checker first builds a map with only the
A items.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19825
2025-05-06 14:15:03 +01:00
Jeff Young 6b08407bd5 Formatting. 2025-05-06 13:11:07 +01:00
Jeff Young 6307058ac8 Formatting and reduced reliance on dyn_cast. 2025-05-06 12:03:09 +01:00
Alex Shvartzkop a96a9fc357 Update translations 2025-05-06 12:53:00 +03:00
dsa-t eca9736dc8 Translated using Weblate (Russian)
Currently translated at 96.9% (9936 of 10246 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-05-06 11:52:03 +02:00
Pferd O a49893cb26 Translated using Weblate (German)
Currently translated at 98.6% (10111 of 10246 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-05-06 11:52:03 +02:00
Henrik Kauhanen 74dc2935e5 Translated using Weblate (Swedish)
Currently translated at 99.8% (10234 of 10246 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-05-06 11:52:03 +02:00
ZbeeGin 2fc2dc0d0a Translated using Weblate (Polish)
Currently translated at 100.0% (10246 of 10246 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-05-06 11:52:03 +02:00
2tama3 62073cb7cf Translated using Weblate (Japanese)
Currently translated at 98.0% (10047 of 10246 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-05-06 11:52:03 +02:00
JamesJCode 019921cb48 Add new CONNECTIVITY_CANDIDATE flag
We reuse the CANDIDATE flag in various places across the codebase,
which is probably incorrect given the original intention for the
flag. Clearing it before use would be a performance hit for incremental
connectivity - and we can't rely on other users of the flag to clear
it for us. So we now use a new flag just for connectivity to avoid
other users trampling on connectivity updates.
2025-05-05 22:17:57 +01:00
Maciej Suminski 5147fd9829 altium: do not reshape NPTH pads to match the holes
Resizing pads affects also their solder mask and solder paste patterns,
admittedly in some unusual footprints.
2025-05-05 19:01:54 +00:00
Mike Williams 774cf6fbc8 bom export: don't break column order on mismatched column counts
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20520
2025-05-05 13:52:37 -04:00
Jeff Young 00e9d0241c Add some missing items to copy c'tor and comparator. 2025-05-05 18:47:20 +01:00
Jeff Young 676cd4b299 ADDED: front & back copper area to board statistics.
Also decreased the precision for message text
representing areas or volumes.  22150.3510mm^2
seems a bit excessive.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14653
2025-05-05 18:26:10 +01:00
Mike Williams 94b7d48f62 sch groups: fix walking text when rotating a single group
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20712
2025-05-05 10:54:18 -04:00
Mike Williams 2e8367a40a sch groups: don't allow drag selecting table cells in un-entered group
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20834
2025-05-05 10:35:47 -04:00
jean-pierre charras e8a9335c44 pegtl: fix compil warnings about a deprecated header (ciso646). 2025-05-05 16:23:06 +02:00
Mike Williams 3112a0b38b sch groups: fix grid alignment on copy/paste
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20823
2025-05-05 10:02:03 -04:00
jean-pierre charras 9ede0ef25b CSV_WRITER(wxOutputStream& aStream) fix issue with non ASCII7 chars.
When writing non ASCII7 chars (using UTF8 encoding), the number of bytes to
write is bigger than the number of "chars", so the written lines were
truncated.
2025-05-05 15:55:55 +02:00
John Beard 8a4496f458 Pcbnew: prevent a timer callback happening during ACTIVATION_HELPER destruction
Speculative fix, as I couldn't reproduce. But this seems like it could
cause the reported issue, though I think ~ACTIVATION_HELPER and the
callback should both be on the same event loop, so it's not clear to me
that it is exactly the issue.

And add a wxCHECK to at least bail safely before handing a nullptr off to the
later functions.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20693
2025-05-05 12:40:15 +08:00
Jeff Young 96522c4113 DRCEpsilon is generic. Zone knockouts need more specific values.
Each knockout can be approximated, and each knockout
will have m_ExtraClearance added.  If a neck is
between two knockouts, it will be 2X the above
values narrower than expected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20361
2025-05-04 15:33:04 +01:00
John Beard ebc86d1fa4 Pcbnew: array tool: fix radio button not intialising
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20723
2025-05-04 21:34:30 +08:00
John Beard ac3b56a560 Pcbnew: circular array tool: add angle offset and direction options 2025-05-04 21:34:30 +08:00
John Beard ec7129212c Eeschema: fix segfault when updating selected pins via pin table 2025-05-04 20:34:48 +08:00
Jeff Young d691a257b2 CHANGED: exclude heatsink pads from courtyard collision checking.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20454
2025-05-04 12:14:19 +01:00
Jeff Young afce3eb2d9 Timestamps for altium footprint libs. 2025-05-04 11:16:16 +01:00
Jeff Young 75d9f708a8 Fix presumed copy/pasta when ensuring circles are circles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20567
2025-05-04 10:13:38 +01:00
jean-pierre charras 16b8fd0d44 Eeschema fix crash when canceling a group move.
There was a similar issue in Pcbnew, fixed in PCB_GROUP::swapData() by commit
fc969ae501
So apply the same fix to SCH_GROUP::swapData()
2025-05-04 10:58:36 +02:00
jean-pierre charras bb3eb705a4 Fix a Coverity warning (uninitialized var) 2025-05-04 10:54:17 +02:00
jean-pierre charras 72b92e1cfd Fix a wxWidgets alert. 2025-05-04 10:53:01 +02:00
Jeff Young 3f25b36ff1 Ungroup before deleting items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20699
2025-05-03 21:16:39 +01:00
Jeff Young 6490ffb9b7 Formatting. 2025-05-03 20:45:40 +01:00
Jeff Young 76d05efe7a Attempt to fix older OCC version compile issue. 2025-05-03 20:38:19 +01:00
Jeff Young edd858a4d2 Patch for gcc stupidity. 2025-05-03 20:01:55 +01:00
Jeff Young 5f0856e5d2 unit==0 means all-units only for symbol children
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20663
2025-05-03 20:01:50 +01:00
Jeff Young e69c80f09d Move STEP exporter error reporting to REPORTER interface.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20738
2025-05-03 18:27:46 +01:00
Jeff Young e85d0d9d22 Paths look odd in italic. 2025-05-03 18:27:46 +01:00
Jeff Young 43d587c850 Cleanup; nullptr protection. 2025-05-03 18:27:46 +01:00
John Beard edee2f0ea6 Eeschema: pin table: add filter by selection
This uses a fairly simple way to determine if the pin is in the
selection, but avoids doing it by keeping pointers, so it should be
possible for the selection membership to persist across things like
CSV import which otherwise would stop matching on pointers.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13662
2025-05-03 23:22:35 +08:00
John Beard 1b57f45517 Eeschema: pin table: add filter by body style 2025-05-03 23:22:35 +08:00
John Beard 4c8b971021 Eeschema: Symbol editor: pin table CSV interchange
This adds the ability to export the pin table content to a CSV file
or the clipboard as CSV, then re-import it from CSV or TSV. This allows:

* to round-trip pin table data via a spreadsheet program, so that the pin
  data can be manipulated in a richer/more familiar editing environment
* an import method to bring in tabular pin data from other formats
  "semi-automatically", without having to write a full-blown symbol generator.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/19207
2025-05-03 23:22:35 +08:00
Alex Shvartzkop ceab28bc21 Update translations 2025-05-03 18:13:09 +03:00
Joakim Lundborg 2e18073d8b Translated using Weblate (Swedish)
Currently translated at 99.9% (10231 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-05-03 17:10:05 +02:00
dsa-t ce114e0135 Translated using Weblate (Russian)
Currently translated at 97.0% (9935 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-05-03 17:10:05 +02:00
ZbeeGin 5d7d914c44 Translated using Weblate (Polish)
Currently translated at 100.0% (10240 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-05-03 17:10:05 +02:00
Henrik Kauhanen c8ee45b370 Translated using Weblate (Swedish)
Currently translated at 99.9% (10230 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-05-03 17:10:05 +02:00
Stian Kristensen 068632794b Translated using Weblate (Norwegian Bokmål)
Currently translated at 41.3% (4230 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nb_NO/
2025-05-03 17:10:04 +02:00
DevAny 5cac4529a0 Translated using Weblate (Korean)
Currently translated at 95.4% (9778 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-05-03 17:10:04 +02:00
Toni Laiho 0305a5b1c6 Translated using Weblate (Finnish)
Currently translated at 95.3% (9761 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-05-03 17:10:04 +02:00
dsa-t 436f9e70fe Translated using Weblate (Russian)
Currently translated at 97.0% (9934 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-05-03 17:10:04 +02:00
DevAny KR bbcc671589 Translated using Weblate (Korean)
Currently translated at 95.4% (9773 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-05-03 17:10:04 +02:00
2tama3 f6c3fdddf1 Translated using Weblate (Japanese)
Currently translated at 97.7% (10008 of 10240 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-05-03 17:10:04 +02:00
Seth Hillbrand 0c23868ac2 Dijkstra's only works with positive weights
Overlapping limits break the assumptions of the algorithm.  We limit the
weights here to only positive numbers and protect the actual alg should
any sneak past

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20827
2025-05-02 17:09:54 -07:00
Marek Roszko 89aeba24f8 Fix SymbolCount() to what was intended back in 2008
Great mileage on this bug, only 500,000 miles! Yep, could get another 300,000 on it.
Or we can send it to the scrapper
2025-05-02 19:18:51 -04:00
Marek Roszko 4ac499b7cf Fix the last symbolcount fix, count empties 2025-05-02 19:06:15 -04:00
Marek Roszko 4b00114316 Don't try and GetChar() on a empty field. 2025-05-02 19:02:07 -04:00
Marek Roszko 51377cbf41 Remove leftover MSVC gate in path mod setup 2025-05-02 18:56:59 -04:00
Marek Roszko 3c08066f99 Shift the qa path setup to ENVIRONMENT_MODIFICATION due to no complaints over cmake 3.22 min 2025-05-02 18:49:48 -04:00
Marek Roszko e8a6fff5b0 Make the vcpkg bin depend on build type for the path mod 2025-05-02 18:49:48 -04:00
Alex Shvartzkop 1fe5addafb Slightly optimize creepage DRC.
See https://gitlab.com/kicad/code/kicad/-/issues/20827
2025-05-02 21:47:13 +03:00
John Beard a116f5cd57 Point editors: move cycle arc mode to common action, add to menu
This isn't the best possible UX (having the various modes immediately
available as graphical affordances would be best). But it's somewhat
discoverable, and at least shows the hotkey, if any, and it in the
context menu and not hidden in a toolbar right click menu. So if the
affordance-type system doesn't make it for v10, this will at least
provide something in eeschema.
2025-05-02 21:30:33 +08:00
John Beard 8ce0149e7f Eeschema: make arc edit mode user-selectable
For now, this is a preferences choicebox, same as Pcbnew.
Making the mode-switch more discoverable and fluent is a
sepearate issue (https://gitlab.com/kicad/code/kicad/-/issues/20824).

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18781
2025-05-02 20:50:41 +08:00
John Beard 4def9d8daf Eeschema point editor: use shared arc editing behaviour 2025-05-02 20:50:41 +08:00
John Beard 01b29c12e0 Point editor: move arc editing behaviour to common code 2025-05-02 20:50:40 +08:00
Jeff Young 3cfab79a78 Fix qa_cli gold files for junction dot size issue. 2025-05-02 10:55:04 +01:00
Marek Roszko 883a1f8d97 On Linux you can fopen (read) a directory for no reason, fix SafeReadFile to make it safer
TIL
2025-05-01 23:28:02 -04:00
Marek Roszko 157180e772 Swap windows path chars in FILENAME_RESOLVER::ResolvePath
This fixes the QA for issue13591 falsely passing on Linux.
It is actually failing this entire time.

But there is more wtfery going on, such as wxFFile::IsOpened returning True on a directory path.
2025-05-01 23:18:54 -04:00
Marek Roszko 83f9dc56d0 Add missing numpy requirement to tests/requirements.txt 2025-05-01 21:44:03 -04:00
Marek Roszko 74c79446a8 Add checkpoints to netlist testing 2025-05-01 21:20:20 -04:00
Marek Roszko 3a32ab30ed Add test from removed dup 2025-05-01 21:16:03 -04:00
Marek Roszko 784a115b3a Dont use boost_check_message for a log as it affects the last checkpoint record 2025-05-01 21:15:50 -04:00
Marek Roszko c3f733909f Remove test files not actually being used and upped 2025-05-01 21:15:23 -04:00
Marek Roszko a7b3d5454e Add another file open ReadAll check in qa 2025-05-01 20:04:32 -04:00
Wayne Stambaugh 93cac7d0a5 Fix broken select connection behavior.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19790
2025-05-01 17:02:21 -04:00
jean-pierre charras a02f1f2411 PDF plotter: fix a rare pen width issue when plotting many pages in one file.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20805
2025-05-01 19:57:29 +02:00
Jeff Young 3a4ad0fb8b Cleanup. 2025-05-01 17:02:31 +01:00
Jeff Young 1f07c28999 Fix a bunch of errors involving implied line widths in plotters.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20818
2025-05-01 16:37:08 +01:00
Jeff Young 5374bffb8e Formatting. 2025-05-01 16:36:33 +01:00
John Beard ff31b88857 Pcbnew: add keep-radius arc-edit mode
This is (now) fairly easy to slot into the PCB point editor
framework.

In this mode, the endpoints adjust only the endpoints on the existing
radius. Radius can ve changed with the midpoint point. The center
point moves the arc, as in the "keep center/adjust radius and angle"
mode.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15661
2025-05-01 22:07:46 +08:00
John Beard 70b1f8d16e Pin table: upgrade wxFB version, no changes 2025-05-01 22:06:09 +08:00
jean-pierre charras b3c6a03171 Fix a few Coverity warnings (uninitialized vars). No actual code change 2025-05-01 15:39:58 +02:00
jean-pierre charras 3c9d696c68 ltspice_schematic.cpp: fix missing initialization 2025-05-01 07:46:44 +02:00
Marek Roszko 880ca01ff7 Add a simple file isopened guard
The saga of why the docker container fails QA continues
2025-04-30 23:17:25 -04:00
Marek Roszko e14dfdf4b0 Protect s_ModelInfoMap against multithreading init
Encountered in QA tests on windows. Probably also a issue during kicad use if you trigger a spice netlist export without previously doing any spice model editing
2025-04-30 20:47:54 -04:00
Michal Suchánek 206d6ee0b0 Set KICAD_USE_EGL automagically
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20630
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12543
2025-04-30 13:33:47 -07:00
Seth Hillbrand fd0b8fcc3c Add paste length control to PCB Editor as well
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20732
2025-04-30 13:29:52 -07:00
Seth Hillbrand c5fde2aeb5 Add maximum pasted string length
Allows the user to avoid pasting unparsable boards as strings, which
freezes the system as we try to display enormous texts

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20732
2025-04-30 13:22:57 -07:00
Seth Hillbrand 8c98c0e59a Ensure that the group RTree positions are updated
Group selections are typically only the group (and not the children), so
calling an RTree update on the selection will not update the positon of
the children, only the group.  This will lead to misses when calculating
hits for various operations until the elements are updated (usually in a
commit).  This is, however, too late for checks that happen during moves

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20761
2025-04-30 11:35:05 -07:00
dsa-t ebcfcabde9 Don't write unused part of the buffer into image data.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20698


(cherry picked from commit 3aded5da4b)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-30 16:36:52 +03:00
Jeff Young 34f2038a95 Support URLs in Symbol Chooser info panel.
Also adds support for sim library fields as URLs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20811
2025-04-30 12:54:04 +01:00
Jeff Young b772960717 Fix bad static cast.
Hypertext fields aren't always intersheet refs anymore.
2025-04-30 12:54:04 +01:00
Seth Hillbrand 4a41f4a525 Prevent overriding existing track width
Avoids resizing existing tracks to match new track.  Adds new parameter
to AssembleLine to allow current behavior while only preventing width
overrides when creating new lines

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20031
2025-04-29 17:51:31 -07:00
dsa-t 82fb91ea83 LTspice import: support 2+ dir levels deep symbol names.
(cherry picked from commit cbd55bc201)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-30 03:41:34 +03:00
Seth Hillbrand f6206501d2 Fix crash when duplicating track
need to check for existing elements before calling front()
2025-04-29 17:17:44 -07:00
Seth Hillbrand e0e1971bd6 Prevent backspace from re-filtering nets
Makes adjusting autofilled nets more pleasant.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20786
2025-04-29 16:06:20 -07:00
JamesJCode fabcab1a86 Fix grammar in DRC error message 2025-04-30 00:03:51 +01:00
Alex Shvartzkop e836a67cab GenCAD export: fix arcs layers. 2025-04-30 01:59:28 +03:00
Wayne Stambaugh bebc9669ad Fix ERC QA failures caused by hierarchical label root sheet test. 2025-04-29 17:46:39 -04:00
dsa-t 9d6cd4c05b LTspice import: add warning when the default library is not found.
Also allow to put the library into ./lib/


(cherry picked from commit 71a6231bb8)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-30 00:44:35 +03:00
Wayne Stambaugh 31374906af Fix crash in connection graph when loading a version 8.0 schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20777

(cherry picked from commit c4f9710f98)
2025-04-29 17:17:34 -04:00
Wayne Stambaugh 6dcac5bded Test for hierarchical labels in root sheet when running ERC.
Hierarchical labels in the root sheet cannot be attached to a parent sheet
pin.  By definition they are unconnected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20810.
2025-04-29 14:21:54 -04:00
JamesJCode d550e34cf6 Add SELECTION_CANDIDATE flag to EDA_ITEM flags
This is now used when marking selection candidates in the schematic
selection tool. This avoids using CANDIDATE, which can case issues
with connectivity updates if it is not cleared after use.
2025-04-29 18:33:59 +01:00
Alex Shvartzkop b4a14bf681 Update translations 2025-04-29 20:11:47 +03:00
Stian Kristensen 144420f992 Translated using Weblate (Norwegian Bokmål)
Currently translated at 41.1% (4208 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nb_NO/
2025-04-29 19:11:25 +02:00
Marco Ciampa 24db9d7258 Translated using Weblate (Italian)
Currently translated at 99.9% (10232 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-04-29 19:11:25 +02:00
Tokita, Hiroshi d8245faf4b Translated using Weblate (Japanese)
Currently translated at 97.8% (10014 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-04-29 19:11:25 +02:00
Ivan Chuba 04dd88b670 Translated using Weblate (Ukrainian)
Currently translated at 75.2% (7697 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-29 19:11:25 +02:00
Marco Ciampa 7dd564c8bb Translated using Weblate (Italian)
Currently translated at 98.9% (10128 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-04-29 19:11:25 +02:00
Ivan Chuba 2873053c86 Translated using Weblate (Ukrainian)
Currently translated at 74.3% (7609 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-29 19:11:25 +02:00
ZbeeGin 9214716a42 Translated using Weblate (Polish)
Currently translated at 100.0% (10233 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-29 19:11:25 +02:00
Ivan Chuba d4e5ae5af8 Translated using Weblate (Estonian)
Currently translated at 3.4% (354 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2025-04-29 19:11:25 +02:00
Ivan Chuba 06aabc91b7 Translated using Weblate (Ukrainian)
Currently translated at 74.0% (7578 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-29 19:11:25 +02:00
Ivan Chuba 683a498bd9 Translated using Weblate (Ukrainian)
Currently translated at 73.9% (7566 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-29 19:11:25 +02:00
co8 j a7bd2e86bf Translated using Weblate (Japanese)
Currently translated at 97.7% (10002 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-04-29 19:11:25 +02:00
Ivan Chuba db96a60de7 Translated using Weblate (Ukrainian)
Currently translated at 73.8% (7558 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-29 19:11:25 +02:00
Henrik Kauhanen 6dab104f97 Translated using Weblate (Swedish)
Currently translated at 99.9% (10225 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-04-29 19:11:25 +02:00
Ivan Chuba f27a2828d5 Translated using Weblate (Russian)
Currently translated at 97.1% (9944 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-04-29 19:11:25 +02:00
co8 j 646b24558b Translated using Weblate (Japanese)
Currently translated at 97.5% (9986 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-04-29 19:11:24 +02:00
Ettore Atalan 0b0dfba8ca Translated using Weblate (German)
Currently translated at 98.8% (10113 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-29 19:11:24 +02:00
Ivan Chuba 2eaafc75b9 Translated using Weblate (Ukrainian)
Currently translated at 73.6% (7539 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-29 19:11:24 +02:00
dsa-t 691718d2bb Translated using Weblate (Russian)
Currently translated at 97.1% (9944 of 10233 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-04-29 19:11:24 +02:00
Jeff Young fc969ae501 Fix group ownership issue. 2025-04-29 18:10:41 +01:00
Salvador E. Tropea c528f3c605 Add HPGL job support
- kicad-cli pcb export hpgl
- "Export HPGL" job
2025-04-28 23:05:45 +00:00
Jeff Young d384790d47 Don't use line styles for solder masks on shapes in 3D viewer.
Also convert hatched fills to solid for solder masks.

Also give track solder masks their specified
expansion when exporting to STEP.

Also implement solder masks for shapes when
exporting to STEP.
2025-04-28 21:46:10 +01:00
Salvador E. Tropea dcddf16c30 Fixes default --track-width-correction (pcb export ps)
To match its intended type (double)
2025-04-28 16:59:48 +00:00
Salvador E. Tropea d1de8649d8 [CLI][PCB][Postscript] Fix the DNP options 2025-04-28 16:57:49 +00:00
Jeff Young e0e1f73f9e Fix rendering issues with hide-holes-while-moving.
Also fixes the checkbox names to be more accurate.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20775
2025-04-28 17:39:54 +01:00
Jeff Young 9fc60621f6 Fix rendering issues with solderpaste and hide-holes-while-moving. 2025-04-28 17:39:54 +01:00
Jeff Young fb9500a6df Readability (no functional changes). 2025-04-28 17:39:54 +01:00
Jeff Young 66bacb3ea5 Honour template fieldname vis flag when adding fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20575
2025-04-28 17:39:54 +01:00
jean-pierre charras d5cf541974 Gerbview: fix a maximum number (50) of Error messages in report list.
Having a lot of errors can happen when trying to open a non gerber files
(this is easy when loading a zip archive).
With a *lot* of errors (if a large .step file is found) Gerbview can hang.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20799
2025-04-28 17:46:14 +02:00
Seth Hillbrand 38ee4359eb Keep the drill results visible
When clicking "Generate", we want to see if the drill action was
successful so we must avoid closing the window prematurely
2025-04-28 06:10:16 -07:00
Seth Hillbrand 0a547d89b0 Don't pass temporary references
auto will provide an rvalue reference here, which disappears before
being used in CallAfter.  Instead, explicitly form the value and pass
it to the lambda
2025-04-27 16:38:47 -07:00
Jeff Young e067d44dd4 Fixes for SCH_GROUPs. 2025-04-27 23:43:35 +01:00
Jeff Young 2d74e54517 Formatting. 2025-04-27 23:43:35 +01:00
JamesJCode 1400eb7902 Add hasExactNetclass function to DRC condition language
Following changes to the `A.NetClass == '<netclass>'` semantics to
match on exact netclass name OR any constituent netclass names, we
can have conditions where constituent netclass constraints match
before the composite netclass constraints in the DRC engine. This
adds the functionality to match on the exact full netclass name, and
modifies the implicit netclass DRC rules to use this function in
their rule condition.

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

(cherry picked from commit c25264528c)
2025-04-27 22:40:46 +01:00
Seth Hillbrand 3cd3ad34dd Fix stupid compile issue with g++ 2025-04-27 13:35:36 -07:00
Jeff Young 2b33a03954 Make Edit Text & Graphics dialogs more similar.
Also a bunch of cleanup for dialog heading
format and info sizes.

Also fixups for consistency of syntax help
(should be a link, not a button)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20790
2025-04-27 17:34:18 +01:00
dsa-t 00f2b5a263 LTspice import: don't crash on missing symbols.
(cherry picked from commit a8d04d0079)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-27 19:30:51 +03:00
jean-pierre charras 0755ab8ea9 Fix a few Coverity warnings (uninitialized vars) 2025-04-27 18:23:41 +02:00
dsa-t 2fa54615ee Eagle SCH import: fix arcs in symbols after v9 changes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20793


(cherry picked from commit b345dac82b)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-27 18:50:44 +03:00
Graham Keeth 454c95ac51 change title case to sentence case in Git preferences
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20784
2025-04-27 16:20:16 +01:00
Graham Keeth 63c13d2e93 fix typo passvie -> passive in error string 2025-04-27 10:37:06 -04:00
John Beard e604ad9a3c Pcbnew: fix pad snaps on non-F.Cu in high constrast mode 2025-04-27 21:47:32 +08:00
JamesJCode 296ed4a3e9 Deduplicate resolved net classes
Dupliates were possible if the same net class was specified as an
explicit label, and as the result of a pattern assignment

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

(cherry picked from commit 28a7d77f0e4faf5607e21fa24566f975c496d40f)
2025-04-27 12:24:37 +01:00
jean-pierre charras ab8060fa63 FOOTPRINT_CHOOSER_FRAME: fix crash when the 3D view is opened
Commit 6bc96530 fixed an issue, but created an incompatibility with the
dummy board (used in 3D canvas) handling when updating views, especially
if 3D canvas is opened.
2025-04-27 08:32:03 +02:00
Jeff Young 90e17ecabd Make various menu button presentations consistent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20783

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20774
2025-04-26 22:15:30 +01:00
jean-pierre charras 34e49758d0 Footprint chooser frame: fix crash in COMMON_TOOLS::ResetLocalCoords()
The crash was due to a null pointer thta can happens in Footprint chooser,
frame, when hit the space bar if the canvas showing the Fp has the focus.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20780
2025-04-26 18:19:05 +02:00
Jeff Young b01fef5ca8 Update visibility flag when adding fields.
Also removes extra c'tor which fails to set the
ordinal.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20556
2025-04-26 16:37:36 +01:00
Jon Evans 4dd39976a3 API: Add symbol path for footprint instances
See https://gitlab.com/kicad/code/kicad-python/-/issues/37
2025-04-26 09:52:42 -04:00
Lucas Gerads e626799d67 Schematic: LTSpice importer add junctions
- Fixes up all junctions at the end of import
- Fixes https://gitlab.com/kicad/code/kicad/-/issues/20727
2025-04-26 12:45:30 +00:00
Roberto Fernandez Bautista 96d72bed6f Fix variable shadow warning in sch_selection_tool.cpp
Also be consistent in naming for all `RunOnChildren` lambdas
2025-04-26 14:42:52 +02:00
jean-pierre charras c7e4875505 Gerbview: fix a few issues when loading zip files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20779
2025-04-26 10:37:23 +02:00
jean-pierre charras 7309f7049f Fix a collision name (ERROR, replaced by TS_ERROR) in a header on Windows/msys2 2025-04-26 10:33:02 +02:00
JamesJCode eb717d9d86 Add missing cmath include to transline_calculation_base.h 2025-04-26 08:53:59 +01:00
JamesJCode aac9731852 Refactor PCB calcs to common library, and add coupled stripline
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16863
2025-04-25 23:27:52 +01:00
Jeff Young 2fd2fe6e2d Fix compiler warning. 2025-04-25 22:41:59 +01:00
Jeff Young aa5863cb40 Fix selection of table cells in groups.
(Selecting a cell should select the whole group.)
2025-04-25 22:15:10 +01:00
Jeff Young 99b0a3e656 Give SCH_TABLEs uuids.
(Otherwise they can't participate in SCH_GROUPs.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20760
2025-04-25 21:58:21 +01:00
Jeff Young b2f3a2f8ba Export textbox borders to STEP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20763
2025-04-25 13:15:17 +01:00
Jeff Young 524575a595 Allow embedded files to come from components
as well as parent containers, part II.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20210
2025-04-25 12:26:31 +01:00
Jeff Young c2be7fa3e6 Account for aperture & track masks in plated copper calculations. 2025-04-25 12:23:23 +01:00
Jeff Young 6873a75313 Solder masks for teardrops on tracks with solder masks.
Also moves teardrops away from the zone UI: they
are now always filled and their borders never
drawn.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20744
2025-04-25 12:23:23 +01:00
jean-pierre charras 481d282607 JOB_EXPORT_PCB_3D: store export origin option without rely to coord origin value
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20752
2025-04-25 11:41:38 +02:00
JamesJCode 4f08810c33 Remove duplicated length tuning code 2025-04-25 01:29:37 +01:00
Alex Shvartzkop 7d0a001831 Optimize via LOD calculations. 2025-04-25 03:23:45 +03:00
Jeff Young e1e56fb988 ADDED: flag to control update/reset of clearance overrides.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20753
2025-04-24 17:43:45 +01:00
Alex Shvartzkop 7e4fe7cfb7 Update translations 2025-04-23 21:23:56 +03:00
CloverGit 1c93e8c143 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.1% (10138 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-23 20:23:14 +02:00
CloverGit 92f6ba64a5 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.9% (10115 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-23 20:23:14 +02:00
Henrik Kauhanen 737d4b6554 Translated using Weblate (Swedish)
Currently translated at 99.9% (10214 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-04-23 20:23:14 +02:00
Pferd O 91c164961a Translated using Weblate (German)
Currently translated at 98.9% (10113 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-23 20:23:14 +02:00
Oliver0804 61046b1bb4 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 99.1% (10135 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-04-23 20:23:14 +02:00
CloverGit 414f2fea32 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.9% (10114 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-23 20:23:14 +02:00
Hubert Hu 14a76f6a54 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.9% (10114 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-23 20:23:13 +02:00
Ivan Chuba a628e806c1 Translated using Weblate (Ukrainian)
Currently translated at 73.6% (7532 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-23 20:23:13 +02:00
dsa-t 4a00210de4 Translated using Weblate (Russian)
Currently translated at 97.2% (9941 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-04-23 20:23:13 +02:00
ZbeeGin 604db2479c Translated using Weblate (Polish)
Currently translated at 99.8% (10210 of 10222 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-23 20:23:13 +02:00
Jeff Young 4f83674b62 Only add row separator between rows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20494
2025-04-23 18:42:14 +01:00
Jeff Young be4a851186 Allow embedded files to come from components
as well as parent containers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20530
2025-04-23 15:14:58 +01:00
Salvador E. Tropea a590d28c8e ADDED: Postscript job support 2025-04-23 13:41:00 +00:00
Wayne Stambaugh 7fb16260aa Add missing virtual file handler clean up when creating archive files.
This was due to an over zealous clean up of the PROJECT_ARCHIVER and
PROJECT_ARCHIVER_DIR_ZIP_TRAVERSER objects which seems to cause issues
on Windows builds.
2025-04-23 07:56:28 -04:00
Jeff Young 31100451c6 Fill in some missing 3D render code.
1) add footprint graphics and text to copper
polys when differentiating plated from non-plated
copper

2) simplify adding footprint graphics and text
for contour walls

3) add dimension text and shapes for contour walls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20111
2025-04-23 10:41:36 +01:00
Jeff Young 1ec47a053b Don't save UUIDs for teardrop zones.
They're really just a geometry cache.

Also removes writing of filled_areas_thickness,
which hasn't been supported in yonks.

Also cleans up writing of island removal strategy
(the limit is only needed in limit mode).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20717
2025-04-23 10:41:36 +01:00
Seth Hillbrand e75076ab41 Revert "Replace glew with epoxy"
This reverts merge request !2217
2025-04-22 15:16:58 -07:00
Michal Suchánek 0c36e16292 Replace glew with epoxy
Glew has the problem that it has to be selected at build time if GLX or
EGL is supported by the library, and this in not encoded in the library
name, nor ABI, nor anything.

Then it's easy to get into the situation that a binary is built but
cannot run because glew supports an API different from the one used by
wxWidgets, or the binary fails to link in the end after all objects are
compiled.

epoxy can support both with the same library avoiding this problem.

epoxy is not initialized explicitly, replaced initialization with
version check where one was not done already.

It seems to be available as vcpkg https://vcpkg.link/ports/libepoxy

There are problems related to GL context switching on Windows which does
not seem to be used in kicad
https://github.com/anholt/libepoxy#known-issues-when-running-on-windows
There is also a problem related to multithreaded rendering on Windows
https://github.com/anholt/libepoxy/pull/265 It's harder to tell if
threading is used for rendering but it does not look like kicad is doing
anything complex enough to warrant using multiple rendering threads.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20630
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12543
2025-04-22 12:54:39 -07:00
John Beard d2307fdcaa PCB array tool: make it easier to skip renumbering entirely
This was already possible by setting a 0-sized step, but that's
a bit clunky - provide an obvious way to do it via a
"do/do not renumber at all" checkbox.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20470
2025-04-23 00:00:00 +08:00
John Beard 1b1623885c PCB array tool: don't count array source pad as reserving its number
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20722
2025-04-23 23:32:20 +08:00
jean-pierre charras 874fad4846 QA test: Update issue11814.kicad_pcb by removing old teardrops
These teardrops created by a old plugin have all the same priority.
Overlapping zones must avoid using the same priority.
Now replaced by teardrops created by Pcbnew.
2025-04-22 15:46:29 +02:00
Jeff Young a53a639523 Formatting. 2025-04-22 13:15:03 +01:00
Jeff Young 5573dce448 Fix various errors in intersecting zones test.
Also gives a clearer error message, and better
descriptions of named zones.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20718
2025-04-22 13:15:03 +01:00
jean-pierre charras 57102b87ce PCB_PAINTER, mirrored view, texts on non paired layers: keep position
Depending on their horizontal justification, the texts wee moved when
flipping the board view.
2025-04-22 09:28:47 +02:00
JamesJCode 8ef54c3651 Remove delay_profile API parameter until design matures 2025-04-22 00:08:04 +01:00
JamesJCode bd1f6e505c PCB Calcs: Reset default units along with values 2025-04-21 21:28:00 +01:00
Mike Williams f51c5c396f sch groups: add swap data fix
Copied from 199a7a34ea for board items
2025-04-21 15:02:35 -04:00
Mike Williams 9cb0d100e5 sch design blocks: block illegal characters before creation failure
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20676
2025-04-21 14:59:31 -04:00
Seth Hillbrand 9d1142839a After removing items from the conn list, check valid
When cancelling, we mark elements invalid if they are removed from the
connectivity list.  Be cause when iterating through the list again.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20566
2025-04-21 11:44:30 -07:00
Jeff Young 199a7a34ea Don't leak PCB_GROUP internals into BOARD_COMMIT.
(This also fixes a potential bug where the image
group's children didn't get the image as a parent.)
2025-04-21 18:24:30 +01:00
Jeff Young c1b1c689ad Don't double-add/remove items from connectivity.
BOARD::Add()/Remove() already do this.
2025-04-21 18:20:52 +01:00
Jeff Young 519b29472f Remove temporary debugging code. 2025-04-21 17:40:28 +01:00
John Beard 207199fd80 PCB_PICKER_TOOL: avoid popping a dismabiguation menu after point selection completes
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20680
2025-04-22 00:27:25 +08:00
jean-pierre charras 7c56b04436 DIALOG_CREATE_ARRAY_BASE: fix better size of dlg in fp editor.
A panel was set as stretchable (which was not useful) thus creating
a very large dialog in FP editor.
2025-04-21 15:45:39 +02:00
Jeff Young 5a3b2cc8fd Temporary debugging code. 2025-04-21 14:42:41 +01:00
Jeff Young 072932df80 Don't process all items in a move individually. 2025-04-21 14:42:41 +01:00
Damjan af11746cc4 pcbnew and eeschema: Table and textbox rotation / text justification fix 2025-04-21 13:32:46 +00:00
Mike Williams 54681278c5 sch groups: don't double move on paste 2025-04-21 09:28:27 -04:00
Mike Williams 82043e374a sch groups/lines: correctly handle view lifetime and drawing in group 2025-04-21 09:28:27 -04:00
Mike Williams 6a24c5c5a4 sch groups: add delete support 2025-04-21 07:50:05 -04:00
Alex Shvartzkop f72d5c43f3 Update translations 2025-04-21 13:43:28 +03:00
dsa-t 81e2e4e8d2 Translated using Weblate (Russian)
Currently translated at 96.3% (9878 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-04-21 12:42:53 +02:00
ZbeeGin e6c8618386 Translated using Weblate (Polish)
Currently translated at 100.0% (10256 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-21 12:42:53 +02:00
ZbeeGin f3392b5c99 Translated using Weblate (Polish)
Currently translated at 100.0% (10256 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-21 12:42:53 +02:00
Pferd O 7a38e3bf1e Translated using Weblate (German)
Currently translated at 99.0% (10154 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-21 12:42:53 +02:00
Pferd O 254ba394f1 Translated using Weblate (German)
Currently translated at 98.8% (10136 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-21 12:42:53 +02:00
Ivan Chuba 396b7b0054 Translated using Weblate (Estonian)
Currently translated at 3.7% (383 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2025-04-21 12:42:53 +02:00
Ivan Chuba ef594d7bb2 Translated using Weblate (Ukrainian)
Currently translated at 73.7% (7564 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-21 12:42:53 +02:00
Henrik Kauhanen a43956a87b Translated using Weblate (Swedish)
Currently translated at 99.5% (10213 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-04-21 12:42:53 +02:00
Ettore Atalan cfd5846f4e Translated using Weblate (German)
Currently translated at 98.8% (10133 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-21 12:42:53 +02:00
Henrik Kauhanen 6d22d32f46 Translated using Weblate (Swedish)
Currently translated at 99.5% (10205 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-04-21 12:42:53 +02:00
Henrik Kauhanen 64d2fef703 Translated using Weblate (Swedish)
Currently translated at 99.4% (10204 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-04-21 12:42:53 +02:00
Henrik Kauhanen 95b8e1241f Translated using Weblate (Swedish)
Currently translated at 99.0% (10160 of 10256 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-04-21 12:42:52 +02:00
Alex Shvartzkop 8051904211 Un-translate layer names in 3D appearance panel.
(cherry picked from commit 33fad39cf4)
2025-04-21 13:40:59 +03:00
Alex Shvartzkop 4239e706ea LTspice import: don't fail if some symbols are missing.
(cherry picked from commit c2d3c9b292)
2025-04-21 05:42:30 +03:00
Alex Shvartzkop c737bd392e LTspice import: adapt label spin when multiple wires connected
(cherry picked from commit 37103c6e15)
2025-04-21 05:42:30 +03:00
Alex Shvartzkop 496fc3b6bf LTspice import fixes:
- Support UTF-16 LE file encoding
- Support Invisible text justification
- Make added SCH_FIELD invisible by default, like in 8.0
- Adjust label orientations based on wire placements
- Fix arc windings in symbols
2025-04-21 05:42:30 +03:00
Jeff Young 5371312c6f Make auto text thickness active. 2025-04-20 19:59:05 +01:00
JamesJCode b23bd0ed92 Remove files from other branch 2025-04-20 18:00:50 +01:00
JamesJCode 2483ab4d7a Add calculation of unit propagation delay to PCB calculator 2025-04-20 13:04:04 +01:00
jean-pierre charras 1af76a9bef Pad properties dlg: Clearing thermal relief override (gap/spoke) does not work
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20709
2025-04-20 11:05:21 +02:00
jean-pierre charras 86b17f46de QA tests: fix missing initialization. 2025-04-20 10:28:42 +02:00
Alex Shvartzkop 6afedab205 OCCT 3D model export: parallelize fusing shapes and subtracting holes.
(cherry picked from commit aab730abc1)
2025-04-20 02:05:55 +03:00
Alex Shvartzkop 97be2d1ce0 OCCT 3D model export: fix missing soldermask shape when there's no polygons.
(cherry picked from commit ee513f7a8b)
2025-04-20 02:05:46 +03:00
Alex Shvartzkop 80373e90eb OCCT 3D model export: use per-net fusing to improve performance.
It's now possible to export bigger boards without running out of memory (and time).

STEP video -components +silk +mask +all copper:
- this commit: 9 minutes (most of it is STEP transfer)
- 9.0.0: 28 minutes
2025-04-20 02:05:30 +03:00
Alex Shvartzkop ad12fbd2f9 OCCT 3D model export: support different line styles for graphics.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18873
2025-04-20 01:59:45 +03:00
Lucas Gerads 16b4ee92bb Schematic: Fix Ltspice import with minor version number
- Files that contained a minor version number failed
- Now both works "Version X.X" and "Version X"
2025-04-19 19:43:14 +02:00
Wayne Stambaugh f0f6b5a09b Use schematic editor default font setting for plot job.
When the user does not define a font on the CLI or when plotting from a
job set, use the current schematic editor default font setting rather than
always defaulting to the "KiCad Font".

Set the --default-font CLI setting to an empty string so the the schematic
editor default font setting will be used.  Setting the --default-font CLI
option will override the schematic editor default font setting.
2025-04-19 12:56:39 -04:00
Jeff Young f102298eeb Use link icon instead of refresh icon. 2025-04-19 16:53:23 +01:00
jean-pierre charras b5a913e582 Fix a non-existing bitmap issue.
the bitmap BITMAPS::calculator, although in bitmaps_list.h, does not exists.
A suitable bitmap can be BITMAPS::icon_pcbcalculator_24.
So it is now used in ACTIONS::showCalculatorTool()
2025-04-19 16:52:33 +02:00
jean-pierre charras fd2822fb15 French translation update 2025-04-19 14:28:44 +02:00
jean-pierre charras a90e83a699 FOOTPRINT_WIZARD_FRAME: fix tools missing in toolbar (i.e. fix TODO items)
These TODO were to convert missing tools to actions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20694
2025-04-19 14:14:14 +02:00
Jeff Young 49e04d3327 Remove accidental debug code. 2025-04-19 11:31:55 +01:00
Jeff Young 61986ab7c8 Load appearances presets to render job.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20660
2025-04-19 11:08:54 +01:00
JamesJCode 8229d2e915 Remove delay profile cache check only used on board load 2025-04-19 00:54:22 +01:00
JamesJCode f1344e921a Final purge of 'tuning profile' -> 'delay profile' in time-domain code
Only mention remains in the delay profile settings JSON
2025-04-19 00:30:34 +01:00
JamesJCode 80a25764eb Don't allow creation of delay via override if no profiles created 2025-04-19 00:06:36 +01:00
JamesJCode 0331ecb173 Fix stale data crash when updating delay profile data 2025-04-18 23:57:06 +01:00
Jeff Young 846ffa5659 Remove duplicate handling for grid checkboxes.
Also corrects logic of otherRow loop.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18843
2025-04-18 15:26:51 -07:00
Jeff Young ec6af4a5b4 Move Execute() to COMMON_CONTROL.
Also fixes other apps coming up in background.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20426
2025-04-18 13:41:19 -07:00
Jeff Young 920173a197 Make dialog spacing consistent. 2025-04-18 13:41:19 -07:00
Jeff Young 53e509326c Don't put null value in map as a side-effect of using []. 2025-04-18 13:41:19 -07:00
Jeff Young 24cef6d165 ADDED: calculator tools to Tools menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20426
2025-04-18 13:41:19 -07:00
Jeff Young f9011e9e35 Update sample script.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20538
2025-04-18 13:41:18 -07:00
Jeff Young 046f1c916b Reset colors on Reset to Default Settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20624
2025-04-18 13:41:18 -07:00
Jeff Young 8113824f7c Don't conflate generated fields (${DNP}) and fields with variable references.
They're not quite the same thing as the later
can have un-applied values which require expanding.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20417
2025-04-18 13:41:18 -07:00
JamesJCode c2df0951f9 Time domain tuning UI improvements 2025-04-18 13:41:18 -07:00
Alex Shvartzkop 8814d452fe Update translations 2025-04-18 03:09:55 +03:00
Ivan Chuba 30912470cd Translated using Weblate (Estonian)
Currently translated at 3.7% (379 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/et/
2025-04-18 02:07:57 +02:00
Ivan Chuba 15d88aed92 Translated using Weblate (Ukrainian)
Currently translated at 73.8% (7552 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/uk/
2025-04-18 02:07:57 +02:00
Marco Ciampa 27910d0228 Translated using Weblate (Italian)
Currently translated at 99.9% (10216 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-04-18 02:07:57 +02:00
ZbeeGin 00d756ea66 Translated using Weblate (Polish)
Currently translated at 100.0% (10226 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-18 02:07:57 +02:00
2tama3 a088ddd693 Translated using Weblate (Japanese)
Currently translated at 98.3% (10060 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-04-18 02:07:57 +02:00
ZbeeGin fc8e41a0de Translated using Weblate (Polish)
Currently translated at 98.1% (10033 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-18 02:07:57 +02:00
Tokita, Hiroshi 3724789249 Translated using Weblate (Japanese)
Currently translated at 98.1% (10041 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-04-18 02:07:57 +02:00
CloverGit fc158d5d4b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.4% (10174 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-18 02:07:57 +02:00
rsr.private 109c15d22f Translated using Weblate (Catalan)
Currently translated at 41.2% (4217 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-04-18 02:07:56 +02:00
2tama3 b12a4b2650 Translated using Weblate (Japanese)
Currently translated at 98.1% (10037 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-04-18 02:07:56 +02:00
Adolfo Jayme Barrientos ccdb4e7f18 Translated using Weblate (Spanish)
Currently translated at 85.8% (8775 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-04-18 02:07:56 +02:00
Adolfo Jayme Barrientos 8f2707c663 Translated using Weblate (Catalan)
Currently translated at 41.0% (4202 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-04-18 02:07:56 +02:00
CloverGit 661437ba5b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.4% (10171 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-18 02:07:56 +02:00
Adolfo Jayme Barrientos c0e31e278f Translated using Weblate (Spanish)
Currently translated at 85.8% (8775 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-04-18 02:07:56 +02:00
Adolfo Jayme Barrientos c20165b13f Translated using Weblate (Catalan)
Currently translated at 41.0% (4194 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-04-18 02:07:56 +02:00
pominglee e873b85cd2 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 99.9% (10224 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-04-18 02:07:56 +02:00
Adolfo Jayme Barrientos f96372f100 Translated using Weblate (Catalan)
Currently translated at 40.7% (4168 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-04-18 02:07:56 +02:00
ZbeeGin 7fe235cd27 Translated using Weblate (Polish)
Currently translated at 98.0% (10024 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-18 02:07:56 +02:00
ZbeeGin 24f5e1c53a Translated using Weblate (Polish)
Currently translated at 97.7% (10000 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-18 02:07:55 +02:00
Pferd O 7158a9a693 Translated using Weblate (German)
Currently translated at 99.4% (10173 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-18 02:07:55 +02:00
Wellington Terumi Uemura 6f7c98d7d9 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (10226 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-04-18 02:07:55 +02:00
co8 j 2d644aedbe Translated using Weblate (Japanese)
Currently translated at 98.0% (10026 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-04-18 02:07:55 +02:00
CloverGit 04feb955ef Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.4% (10170 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-18 02:07:55 +02:00
pominglee be167c021b Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 99.9% (10224 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-04-18 02:07:55 +02:00
CloverGit 1f1e98a7cf Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.3% (10163 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-04-18 02:07:55 +02:00
Henrik Kauhanen 75f369ece9 Translated using Weblate (Swedish)
Currently translated at 99.5% (10182 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-04-18 02:07:55 +02:00
ZbeeGin d60a0cc27c Translated using Weblate (Polish)
Currently translated at 97.7% (9992 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-04-18 02:07:55 +02:00
Pferd O 1df9195de5 Translated using Weblate (German)
Currently translated at 99.1% (10134 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-18 02:07:55 +02:00
pominglee 6b59655102 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 99.7% (10205 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-04-18 02:07:55 +02:00
Anonymous a4ff701e7a Translated using Weblate (Korean)
Currently translated at 96.2% (9839 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ko/
2025-04-18 02:07:55 +02:00
Pferd O 2ee6c6b133 Translated using Weblate (German)
Currently translated at 98.8% (10104 of 10226 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-04-18 02:07:54 +02:00
JamesJCode eb17ebee4e Implement time-domain length tuning
- Adds time and delay units
- Adds time domain tuning parameters entry and storage
- Adds pad-to-die delay property
- Adds time domain parameter interface for length / delay calculations
- Adds unit tracking for numerical constants through LIBEVAL
   - Will need future work to truly propagate through binary expressions
- Adds time domain tuning to meander placers
- Adds time delay display to net inspector panel
- Modifies DRC to handle time domain constraints
2025-04-17 21:46:56 +01:00
Jeff Young 0820e90c73 Fix button sizing.
Hack appears to be no longer needed, and is causing
the side and bottom to clip (at least on MacOS).
2025-04-17 14:37:16 +01:00
Jeff Young c5093a5df0 ADDED: path info to job destination panel. 2025-04-17 14:37:16 +01:00
Jeff Young 70cbdbff89 ADDED: appearance preset selection to Render Jobs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20682
2025-04-17 14:37:16 +01:00
Damjan df8250fd70 pcbnew: Text box dialog doesn't have -Update Thickness According to Text Size- button 2025-04-17 11:06:55 +00:00
jean-pierre charras e6240f9fbf Fix kicad-cli pcb export gerbers --output argument type in help.
It is a directory name, not a filename

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20298
2025-04-17 11:26:27 +02:00
Jeff Young 194ee9ef25 Move Use45Limit processing to VIEWER_TOOLS.
(We need it for the ruler in footprint preview
widgets.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20668
2025-04-16 18:09:56 +01:00
Jeff Young 6bc9653029 Make sure footprint chooser has correct board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20669
2025-04-16 18:09:56 +01:00
JamesJCode 1c8e20b61f Further chasing of non-standard std::char_traits implementations 2025-04-16 17:48:46 +01:00
Jeff Young f66f2e522f Fix logic error in checking IsErrorLimitExceeded().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20671
2025-04-16 13:02:38 +01:00
Jeff Young 5279cc8767 Use EDA_COMBINED_MATCHER more consistently.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20678
2025-04-16 12:20:15 +01:00
Jeff Young 69bf9894e9 Fields don't currently have any metadata to search. 2025-04-16 11:41:56 +01:00
Jeff Young 0a8d5ea78b Fields don't currently have any metadata to search. 2025-04-16 11:33:16 +01:00
Jeff Young 6befe4badf Toolbars & SetConditions for SCH groups. 2025-04-16 11:31:56 +01:00
Alexander Boehm 70af60c930 multi-channel tool: do not duplicate uuids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20665
2025-04-16 03:20:04 -04:00
JamesJCode a5be581b1b Add char_traits<T> specialisations for wxUniChar and NANODBC_SQLCHAR
when building on Apple with Clang >= 17.

These specialisations are not strictly required by the C++ standard,
and have been removed from LLVM.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20631
2025-04-15 20:57:23 +01:00
JamesJCode 2ee66ccfac Fix compiler warning 2025-04-15 20:40:56 +01:00
Andrej Valek 9364bcdc9e SCH_EDITOR_CONTROL(paste): fix wrong cut behaviour
There was a missing behaviour when explicit removed annotation via specialpaste was requested. Add there a variable to compare the paste options.
2025-04-15 09:38:48 -07:00
wh201906 6d2b728fb1 Exclude brackets at the end of a URL in LinkifyHTML()
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20347
2025-04-15 09:37:23 -07:00
Dmitry Rezvanov a3fae053c4 pcbnew: Add sorting functionality for netclass assignments
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18819
2025-04-15 09:32:16 -07:00
Alexander Boehm 4bc099429c repeat layout: fixup net names of copied vias
When replicating a layout with the multichannel tool
the net names of vias are now updated to reflect the
potentially different connections in the target area.

Fixes https://gitlab.com/kicad/code/kicad/issues/20334
2025-04-15 09:28:27 -07:00
Mike Williams e64eeb0161 sch groups: make copy/paste work
Need to expand selection on copy
2025-04-15 10:19:40 -04:00
Mike Williams a57cd8a207 sch: don't remove/add items to selection while iterating
Likely needs backport
2025-04-15 10:19:40 -04:00
Mike Williams b9013b87d0 sch groups: add test case for loading from file 2025-04-15 10:19:40 -04:00
Mike Williams fd4b18140f group tool: make sure frame specific commits are created 2025-04-15 10:19:40 -04:00
Mike Williams 6ebadf9fbe sch groups: add load/save support 2025-04-15 10:19:40 -04:00
Mike Williams cdac27b2bc sch groups: implement rotate/mirror 2025-04-15 10:19:40 -04:00
Mike Williams 82ec293907 CW rotation: add missing default hotkey in sch/3d to match pcb editor hotkeys 2025-04-15 10:19:40 -04:00
Mike Williams 5eee8f1c5f sch_view: update to handle items with children 2025-04-15 10:19:39 -04:00
Mike Williams 0ba6882c47 commit: when deleting extra copy of double staged item, remove group 2025-04-15 10:14:40 -04:00
Mike Williams 5db091fc79 sch groups: clear group membership on destruction, add tests 2025-04-15 10:14:38 -04:00
Mike Williams 718bf40807 sch groups: add to API 2025-04-15 10:13:52 -04:00
Mike Williams 027b01750c sch view: mark some layers as display only 2025-04-15 10:13:52 -04:00
Mike Williams 05f3c47b4f groups: make selection tool work with groups 2025-04-15 10:13:50 -04:00
Mike Williams 8c9f4e7832 groups: tools/dialogs need commit screens for schematic 2025-04-15 09:59:38 -04:00
Mike Williams d6e7970738 sch: add group tool 2025-04-15 09:59:38 -04:00
Mike Williams f483fcd2d9 schematic: add groups support to undo/redo/commit 2025-04-15 09:59:38 -04:00
Mike Williams fa02c70604 schematic: draw groups 2025-04-15 09:59:38 -04:00
Mike Williams 0c0dbc6271 groups: commonize group tool 2025-04-15 09:59:38 -04:00
Dhineshkumar S fa517a0429 Fix missing change that ensures text is auto-completed.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13508
2025-04-14 19:50:40 -07:00
Damjan c4ff42cb54 Adds dedicated anchor points for table
Allows snapping and easier alignment first tables



Fixes https://gitlab.com/kicad/code/kicad/-/issues/20184
2025-04-14 19:47:35 -07:00
Jeff Young d421af6e4d Rebuild connectivity after append board.
Append board reads the BOARD_ITEMs directly onto
the board and so pushes the commit with CHT_DONE
flags.  However, this means the added items aren't
added correctly to the connectivity system.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20314
2025-04-14 21:38:01 +01:00
Jeff Young adc5523f43 Bounds-check unit and body style from prop inspector.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20649
2025-04-14 21:36:19 +01:00
Jeff Young 10af2f04d3 Make test use the solder-mask healing algo. 2025-04-14 15:38:18 +01:00
Jeff Young ac265926b1 Restore bounds checking (even though its a performance hit). 2025-04-14 15:38:18 +01:00
Damjan 2d2f443aa4 pcbnew: Multi-line text in table cell 2025-04-14 14:07:36 +00:00
Damjan f4107fa4d6 pcbnew: flipping tables makes them walk 2025-04-14 14:06:06 +00:00
Jeff Young 38c822db9c Use individual silk/mask collision checking if solder mask min width is 0.
Using the combinde solder mask doesn't deal well
with exclusions since almost any change will affect
the combined mask.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17429
2025-04-14 14:05:35 +01:00
Jeff Young 8827323361 Remove Help menu hacks which appear to no longer be necessary.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10124
2025-04-14 11:52:07 +01:00
Jeff Young 2a2a73a1e9 Don't allow auto-conversion from double to EDA_ANGLE.
We have no idea if the double is in radians or
degrees.
2025-04-14 11:52:04 +01:00
dsa-t e6c76c6e21 Fix too small angle increment when stroking arcs.
The previous angle increment was about 0.0087 degrees.
Change it to 0.5 degrees.


(cherry picked from commit c5771d8874)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-14 06:45:32 +03:00
dsa-t 352e0035cf OCCT 3D model export: fix copper fusing issues on StickHub GND and #20515
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20515


(cherry picked from commit 2cebea3b04)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-14 00:16:31 +03:00
Jeff Young 8b19777d5d Revert part of name change that affects settings files. 2025-04-13 21:09:07 +01:00
dsa-t 4faa00e262 OCCT 3D model export: don't skip pads with duplicate pad numbers for pad points data.
(cherry picked from commit dfb66e2fdb)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-13 22:42:39 +03:00
dsa-t 6cb690fe6b Remove annoying tooltips in DRC/ERC dialogs.
(cherry picked from commit 58a76a2617)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-13 21:13:04 +03:00
Jeff Young 2d69b6e8ba Update pads connected to any connected tracks.
(Not just those selected.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20628
2025-04-13 18:23:52 +01:00
Jeff Young eece18f4a8 Formatting. 2025-04-13 18:23:52 +01:00
Jeff Young 57d0fa6f2d Handle ref & value proxies as if they were refs and values.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20613
2025-04-13 18:23:52 +01:00
jean-pierre charras 66a7abca09 DRCE_DIFF_PAIR_GAP_OUT_OF_RANGE: use a better position for the marker.
It was put at arc center. Now put on arc middle.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20636
2025-04-13 18:01:44 +02:00
Jeff Young ecb5c5e0d4 Visibility control is for *filled* shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20635
2025-04-13 13:12:43 +01:00
Jeff Young f1718370c4 Tests assume {0,0} sized table cells. 2025-04-13 12:04:14 +01:00
Jeff Young e90a3112f8 "Other" refers to fields other than refdes and value.
It has nothing to do with text items.

Also fixes some breakage with the introduction of
a separate scope item for dimensions.

Also rearranges the dialog a bit to make it fit
on smaller screens.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20633
2025-04-13 11:42:47 +01:00
Jeff Young 191327f7e8 Formatting. 2025-04-13 11:42:47 +01:00
dsa-t 9111a65302 OCCT 3D model export: don't show fusing errors for non-copper pads.
(cherry picked from commit 09da370512)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-04-13 08:18:55 +03:00
Matt Kosman 0890d3f1cb remove text angle reset when rotating multiple fields
The fields were properly rotated by field->rotate and don't need additional setting of the text angle.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19366
2025-04-12 16:11:05 -07:00
Seth Hillbrand 6f54b11431 Remove schematic view size limitation
We don't need to worry about scrollbar button sizes anymore, so we don't
need to limit the viewport size based on the page

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

(cherry picked from commit ff6bee400e)
2025-04-12 14:11:35 -07:00
Andrej Valek 069954fa31 SCH_EDITOR_CONTROL(paste): make the annotation working again
The pasteMode was enforced to UNIQUE_ANNOTATIONS and not respecting the
value in settings. Basically revert the old behavior with respecting the
KIID generation.

Fixes kicad/code/kicad#19828
2025-04-12 14:06:13 -07:00
Jeff Young 159302063a Move board characteristics and stackup to PCB_TABLEs. 2025-04-12 20:41:01 +01:00
Wayne Stambaugh aa1dbcba34 Fix broken label position algorithm in Eagle schematic importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20593
2025-04-12 11:05:49 -04:00
Seth Hillbrand 7d195b73b2 Don't set board layers without board
When loading footprints, we may have undefined layers, they should not
be set unless we have a board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20625
2025-04-11 15:12:55 -07:00
Wayne Stambaugh 9228369617 Code clean up of board GenCAD exporter. 2025-04-11 09:33:44 -04:00
Jeff Young a24f7121d8 Don't show mandatory fields in chooser.
Those we want are already accounted for in the
scoring algorithm.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20541
2025-04-11 12:23:47 +01:00
Jeff Young 598d446a38 Simplify libTree scoring algorithm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20610
2025-04-11 12:23:47 +01:00
jean-pierre charras a661deb0ad BOARD_NETLIST_UPDATER: fix crash related to fields handling.
The crash happened when removing and deleting fields in footprint no
longer existing in netlist.
Crash due to a std::deque<PCB_FIELD*> modified during parsing, invalidating pointer.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20607
2025-04-11 11:16:25 +02:00
Wayne Stambaugh c810ef716d Actually prevent recursion when building connection sub-graph.
Propagating to neighboring connections when not a net will cause an
infinite recursion crash.  Use the wxCHECK2 instead of wxASSERT to
prevent this.

Add a bunch of question comments where the use of wxASSERT is questionable.
2025-04-10 16:31:59 -04:00
Jeff Young 45abc90885 Be explicit about table highlight colors.
(Unsurprisingly, the previous hack had side effects.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20606
2025-04-10 17:32:00 +01:00
Wayne Stambaugh 66fad52331 Update QA JSON files to prevent modified status after running QA test. 2025-04-10 11:47:33 -04:00
Wayne Stambaugh 4ae07d1122 Fix GenCAD arc track export when using board offset. 2025-04-10 10:11:00 -04:00
Brian Lu ea4b2b73bb Pcbnew: VRML Export: Footprint-relative 3D Models
CHANGED: Provide the footprint base path as the working directory to the
3D shape cache such that 3D models relative to the footprint may be
correctly resolved when exporting a PCB as VRML.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14505
2025-04-10 06:55:26 -07:00
Jeff Young 65a49cc3ba Resolve fonts for tablecells.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20605
2025-04-10 14:13:07 +01:00
jean-pierre charras e57bc3304f DIALOG_SIM_MODEL: fix possible crash when no lib loaded (null pointer)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20599
2025-04-10 13:17:30 +02:00
Jeff Young 7232a98b65 Remove redundant performance changes.
(Alex had already moved these to const char, which
avoids wxString's c'tor.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20506
2025-04-10 11:40:37 +01:00
jean-pierre charras 065e9dbf46 PANEL_FP_EDITOR_FIELD_DEFAULTS: Fix incorrect default layer when adding a field
When adding a default field, the associated defaut layer was the layer used by
the previous default field. But it does not work for the first added field.
2025-04-10 09:03:21 +02:00
jean-pierre charras f29c19ef02 DIALOG_RULE_AREA_PROPERTIES: fix incorrect tool-tip
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20592
2025-04-10 09:00:26 +02:00
jean-pierre charras 945c990a53 pcb_group.i: add missing include to use PCB_GROUP. 2025-04-10 08:57:53 +02:00
Wayne Stambaugh 7ce2b2b85f Fix broken GenCAD arc tracks export. 2025-04-09 14:39:55 -04:00
Jeff Young 1d45de0d1d Performance.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20506
2025-04-09 18:21:15 +01:00
Jeff Young 98ec2d7ba2 ADDED: metadata searching.
Symbol and footprint search panels can now optionally
search library links, descriptions and keywords.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10602
2025-04-09 17:46:07 +01:00
Jeff Young ec6bc85a29 No requirement to UNGROUP when we're recording entire parent FP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20589
2025-04-09 12:18:26 +01:00
Jeff Young 702d802b22 Show library info for components in search panels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19721
2025-04-09 11:56:42 +01:00
Julien Serin f381c6e846 Feat add table selection with shift+click
ADDED now user can use shift+click to select multiple cell in a table with two click

Fixes https://gitlab.com/kicad/code/kicad/issues/19878
2025-04-08 11:57:35 -07:00
Jeff Young 60364a9062 Performance improvements for hatched fills (round 2)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20570
2025-04-08 17:35:35 +01:00
Jeff Young ee68280b27 Uninitialised member var. 2025-04-08 17:35:35 +01:00
Wayne Stambaugh cb1e6b62e9 Update QA test json files with latest changes. 2025-04-08 08:17:12 -04:00
Wayne Stambaugh 1176ff4a15 Use symbol line width schematic setting when printing and plotting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20574
2025-04-08 08:11:28 -04:00
Seth Hillbrand 3d29fae7a9 Remove TreeControl call from thread
On Windows, this may use SendMessageW, forcing a wait for UI in the
thread

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20572
2025-04-07 17:05:54 -07:00
Lucas Gerads 82003c8660 Simulator: Error checks for parsing ngspice intermediate file
- verify that the string "Values:" is actually found
- catch exceptions while parsing
- error messages
2025-04-07 15:48:34 -07:00
Alex Shvartzkop c5b132dd27 Altium PCB: fix 3D model opacity variable type.
See https://gitlab.com/kicad/code/kicad/-/issues/20507

(cherry picked from commit de1257abdf)
2025-04-07 23:24:09 +03:00
Alex Shvartzkop f4695081c1 Altium PCB: support 3D models import with duplicate filenames.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20507

(cherry picked from commit 3d36d41ea7)
2025-04-07 23:24:09 +03:00
Alex Shvartzkop 5d70b07c99 Altium PCB: fix padstack shapes import on F.Cu.
(cherry picked from commit 2c74d46d79)
2025-04-07 23:24:09 +03:00
Jeff Young 43aa63c1ec De-duplicate find results.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20569
2025-04-07 21:11:46 +01:00
Jeff Young 845cdb1b25 Performance optimisations for hatching. 2025-04-07 21:11:46 +01:00
Seth Hillbrand bccf365380 Isolate thread pool loops
Now that we are threading things in different frames, we need to watch
that we are not waiting for a process to complete in one frame while
working in another.  To accomplish this, we only wait for our own loop
results

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20572
2025-04-07 12:17:11 -07:00
Jeff Young f0ebf0a7cc Don't assume existence of default FP text items. 2025-04-07 18:19:10 +01:00
Jeff Young 3def4afaec ADDED: menu item to control searching of hidden fields.
Applies to both PCBNew & Eeschema search panels.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20370
2025-04-07 17:00:48 +01:00
Jeff Young 0659290417 Simplify hatch damage/rebuild and move it out of view.
There should be far fewer hatched objects than other
objects, so we're spending too much effort finding
all the possible damage when we probably should
just be auto-regenerating all the hatching.

This also moves it out of being done during redraw,
which was proving problematic.  Plus the refill
zones architecture does it during commit, and has
a lot more miles behind it.
2025-04-07 11:46:02 +01:00
Wayne Stambaugh c5ff61ba9c GenCAD board exporter fixes.
Strip leading zeros from copper layer mask string so the unique pad and
pad stack names are not 128 characters long.

Try a different fix for broken arc track orientations.
2025-04-06 17:53:49 -04:00
jean-pierre charras 848a6b6930 Pcbnew, DIALOG_SHAPE_PROPERTIES: fix an issue noticeable with POLY shapes.
After editing a polygon, the pointers m_parent and m_group where cleared.
They are now restored (like for other shapes).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20564
2025-04-06 14:45:42 +02:00
Jeff Young ac616b8c19 Restore visibility editing for fields.
(It got accidentally thrown out with visibility
for text items.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20560
2025-04-05 22:18:17 +01:00
Jeff Young 7a9db0f8c1 Formatting. 2025-04-05 22:18:17 +01:00
Jeff Young 2745945894 Improve thermal reliefs for hatched zones. 2025-04-05 22:18:17 +01:00
Jeff Young 860f52800e Performance. 2025-04-05 22:18:17 +01:00
Jeff Young 96491132ce Performance. 2025-04-05 22:18:17 +01:00
Wayne Stambaugh 598850b1f0 Fix project archiving.
Use simplified file extension and name checks rather than a regular
expression to determine which files to archive.

Fix incorrect use of wxFileName which generates invalid paths when the
last folder in the path contains dots.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20431
2025-04-05 15:53:59 -04:00
jean-pierre charras 12c82149bf DIALOG_SHAPE_PROPERTIES: fix wxWidgets debug alert. 2025-04-05 18:11:38 +02:00
jean-pierre charras 91d9863cc3 kicad-cli export gerbers: avoid incorrect behavior with a broken layer list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20555
2025-04-05 12:03:29 +02:00
Jeff Young d4cc91f17a Via needs a parent for formatting. 2025-04-04 22:45:52 +01:00
Jeff Young 8b33b25e83 Use thermal reliefs to guarantee connection to hatched zones.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20447
2025-04-04 22:45:52 +01:00
Jeff Young 2c9c607b95 Fix thermal spokes for pad stacks. 2025-04-04 22:45:52 +01:00
Alex Shvartzkop 82f94e9185 Improve GetAppSettings performance.
There's no need to construct a wxString first.

(cherry picked from commit a6d81d019f)
2025-04-04 23:28:02 +03:00
Alex Shvartzkop 7a04389ac2 Improve pan performance when showing a large amount of TH pads.
See https://gitlab.com/kicad/code/kicad/-/issues/20506

(cherry picked from commit a1a710dfed)
2025-04-04 22:49:05 +03:00
Wayne Stambaugh 11edaa6e4a Use arc mid point for footprint library parity DRC testing.
The arc center is a pseudo coordinate which is calculated for drawing
purposes.  This mid point is fixed unless the arc is modified which
should result in more reliable arc parity footprint library DRC testing.

Also change EDA_SHAPE::Compare() to use the arc mid point.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15917
2025-04-04 15:30:44 -04:00
Wayne Stambaugh 642e4d37bc Include arc tracks when exporting to GenCAD. 2025-04-04 13:20:59 -04:00
jean-pierre charras 91dda80530 Pcbnew, printing vias: always print the via hole, even for small holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20546
2025-04-04 16:40:53 +02:00
Jeff Young 200c4a9eae Be explicit about default anchor shape.
(Otherwise it doesn't work for padstack overrides.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20551
2025-04-04 13:28:27 +01:00
Jeff Young 7151d21f0b Performance optimisation.
Reduces board loading for #17820 from 15 seconds
to about 6.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17820
2025-04-04 13:28:27 +01:00
jean-pierre charras 9eea670617 SCH_TEXTBOX: Do not plot twice the textbox shape.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20545
2025-04-04 13:03:07 +02:00
Wayne Stambaugh cf3dae0bb9 Fix assertions when exporting board to GenCAD.
Calling PCB_VIA::Width() without a layer will raise and assertion.  Check
if track is via when looping through a list of tracks and use the correct
width call.
2025-04-03 18:16:51 -04:00
Sean Mollet 380b5160d6 GENCAD export: Fixes to footprint hashing 2025-04-03 13:34:28 -04:00
Jeff Young cf96295fa1 Clipper2 is much faster at intersecting layers for drawing vertical walls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9202
2025-04-03 16:57:45 +01:00
Sean Mollet 185491f2b8 GENCAD Export only produces a single pad - Fix 2025-04-03 11:30:03 -04:00
Jeff Young 661d002234 CHANGED: moved footprint lock shadows to children.
A full bounding hull wash gets overwhelming on
boards with lots of mechanically-constrained
objects.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14007
2025-04-03 14:38:14 +01:00
Jeff Young 2e556d0abc Plot tables in footprints. 2025-04-03 14:38:14 +01:00
jean-pierre charras f8ec23db00 WX_PT_ENTRY_DIALOG: enhancements: fix min size and add reset button.
It is used to enter a point position and a grid origin.
The new button (only in grid origin dialog) allows reset the position.
2025-04-03 13:19:20 +02:00
Mike Williams 40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Jeff Young 8ff0aafbb8 Handle groups in footprints when filtering selection. 2025-04-02 16:22:21 +01:00
Jeff Young a0ec7f59c4 When pulling children out of footprints don't format them wrong.
If we leave a footprint parent pointer then we'll
format as fp_line, fp_arc, etc. instead of gr_line,
gr_arc, etc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20537
2025-04-02 13:22:40 +01:00
Jeff Young 901ad3064d Remove assert that fires when applying preset.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20467
2025-04-02 13:06:40 +01:00
Jeff Young db911c0d91 Improve debugging. 2025-04-02 13:06:40 +01:00
Jeff Young 967bf1d0a1 m_root is not guaranteed to be non-null. 2025-04-02 13:06:40 +01:00
Mike Williams 05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
Mike Williams 8b69ec4761 dialog_group_properties: move to common 2025-04-01 14:34:20 -04:00
Mike Williams 5fd294cad2 eda frame: hoist FocusItem calls up a layer
Prep for SCH_GROUPs
2025-04-01 14:34:20 -04:00
Mike Williams f40b24d04a groups: move actions to common actions 2025-04-01 14:34:20 -04:00
Mike Williams 43e432f9ad sch_group: add basic class implementation + test 2025-04-01 14:34:20 -04:00
jean-pierre charras 76929808d3 PCB_TEXTBOX:: Rotate: fix size change for rotation by not 90deg
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20529
2025-04-01 19:55:53 +02:00
Jeff Young 7f9a277594 Remove unsafe C-style casts. 2025-04-01 18:04:33 +01:00
Jeff Young 0573a32f36 Fix first tab having no effect after changing grid value. 2025-04-01 16:27:35 +01:00
Jeff Young a1fe0f7faf Don't process grid-change events when we're rebuilding the grid.
The selection has already changed and it's too
late to update any values.

Also regularises the event.Skip() handling from
8a1347d2c8.
2025-04-01 15:26:56 +01:00
Jeff Young 6f6ef8e626 Reset status popup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20489
2025-04-01 14:36:02 +01:00
Jeff Young 5e0beb97ee Nullptr safety.
KICAD-7DX
2025-04-01 12:19:56 +01:00
Jeff Young 7b76aa4992 Move HasMessageOfSeverity to base class.
KICAD-HPP
2025-04-01 12:19:53 +01:00
Jeff Young 2ce7535318 Stack objects should not have parents or groups.
KICAD-KXY
2025-04-01 12:19:50 +01:00
Jeff Young 22769b9159 Once the selection has changed, we can't commit changes.
KICAD-6Y9, among others.
2025-04-01 12:19:46 +01:00
JamesJCode 9920751eb7 Fix net inspector thaw location to not break selection on MSW 2025-03-31 21:06:52 +01:00
JamesJCode 1202838135 Freeze net inspector data view when rebuilding the list of nets
Attempt to fix #20521 but it is very hard to reproduce

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20521
2025-03-31 20:47:03 +01:00
Jeff Young 6e566b2819 Remove shadowed type (DRILL_MARKS).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20522
2025-03-31 20:00:16 +01:00
Steven A. Falco 688448f9ab Fedora 43 will need python 3.14 support 2025-03-31 19:46:55 +01:00
Wayne Stambaugh ef5cd6bb28 Merge PAD::addPadPrimitivesToPolygon() into PAD::MergePrimitivesAsPolygon().
It was only used in MergePrimitivesAsPolygon() and it was only a few lines
long.
2025-03-31 14:25:01 -04:00
jean-pierre charras c8b57c50dc DIALOG_SYMBOL_FIELDS_TABLE: fix a ugly look issue specific to wxMSW
The recent change use a two lines title in a widget. It works fine on Linux
and MAC, but is not supported on Windows.
So, on Windows, a one line title is used.
2025-03-31 18:46:47 +02:00
Jeff Young 822e188d55 Knockout entire hatched shape when filling zones.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20510
2025-03-31 17:31:35 +01:00
Wayne Stambaugh d52d0d0aad Don't clobber SCH_SCREEN paths when adding new sheet from existing file.
The screen path will always be the correct absolute path.  Otherwise it
would not be possible to load it.

Don't reset the first sheet file path to relative if the user did not
request it.

Don't use results of a failed call to wxFileName::MakeRelative() to set
sub-sheet file paths.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20502
2025-03-31 11:22:33 -04:00
Jeff Young 9b71102dd8 Don't presume there are at least two footprint text
defaults.

Yes, we ship that way, but a user could delete one
or edit their json file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20398
2025-03-31 15:34:46 +01:00
Jeff Young 14ca6e7b08 Clearer column titles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20509
2025-03-31 15:14:59 +01:00
Jeff Young 4ae4f9ea87 Wait for wxWidgets to destroy window. 2025-03-31 15:14:59 +01:00
JamesJCode 141097549c Fix incorrect iterator container comparison
Fixes Coverity warning CID 548258
2025-03-31 14:39:28 +01:00
Jeff Young 582aef0220 Don't assume a hypertext link is a cross-sheet reference.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20511
2025-03-30 21:55:28 +01:00
Wayne Stambaugh 2b0d082df5 Move all PAD object methods to into PAD object source file.
No functional changes.  Just make it easier to find all of the PAD object
methods.
2025-03-30 11:35:06 -04:00
jean-pierre charras d729b34986 Eeschema, DIALOG_FIELD_PROPERTIES: fix a strange bug specific to wxMSW.
wxStyledTextCtrl, SetExtraAscent() + SetExtraDescent() methods, when set
to a value not 0 generate a strange bug: the text is not always shown
(when enter a char, once the text is shown, once the text is not shown)
(Perhaps a wxMSW bug) and this call is not needed on WXMSW
2025-03-30 17:29:03 +02:00
Jeff Young 9066ad3620 Report global physical_clearance issues before moving on to layers.
Also fixes a bug in reading m_LayerSource.

Also simplifies Edge_Cuts handling to better match
actual DRC checks.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20498
2025-03-30 14:22:56 +01:00
Carsten Presser 33ee9e99fe Improve rectifier demo
This demo project used old symbols that don't match the current style of
the library. Replace them with the correct ones.
But also move them to the project library again.
Add a workbook that has the simulation traces selected.
2025-03-30 06:53:21 -04:00
jean-pierre charras 79fbae00ce FP editor preferences: Fix crash when closing (by OK) the dialog if no FP loaded.
After opening the PANEL_FP_EDITOR_FIELD_DEFAULTS panel, due to a null pointer
when no FP loaded in FP editor, closing the dialog by OK button crashed Pcbnew.
2025-03-30 11:19:37 +02:00
jean-pierre charras 97e1c107c9 PANEL_FP_EDITOR_FIELD_DEFAULTS: fix incorrect behavior.
One could not change the default layers for new fp texts

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20505
2025-03-30 11:19:37 +02:00
JamesJCode 906c24bc6d Unify length calculation between router, board / frame, and DRC 2025-03-30 09:18:41 +01:00
Jon Evans 12861345d3 API: Brute-force fix for footprint modifications 2025-03-29 23:53:55 -04:00
JamesJCode 7a4325e610 Net inspector groups should be case insensitive 2025-03-30 00:04:37 +00:00
Jeff Young 60a26308ae COMMIT lifetime safety.
If we pass a COMMIT to a posted action, the COMMIT
may no longer exist when the action is run.
Equally problematic, if another COMMIT is pushed
in between we'd probably also run into trouble.

We still allow the API to do this because we don't
have a better solution at present.  But we need
one.
2025-03-29 21:24:08 +00:00
Jeff Young 4f115b12a4 Fix format string. 2025-03-29 21:24:08 +00:00
Jeff Young b62f00912e Remove debug assert that's clogging up Sentry. 2025-03-29 21:24:08 +00:00
Jeff Young 408d3a0170 Code clarity. 2025-03-29 21:24:08 +00:00
Jeff Young baaf341d0d Remove debug assert.
Yes, it does indeed fire (a lot, as Sentry can
tell us).
2025-03-29 21:24:08 +00:00
Jeff Young 4783bc4cfd Don't respond to net navigator events while we're updating the wxTreeCtrl. 2025-03-29 21:24:08 +00:00
Jon Evans 31f3c44520 API: Clear footprint caches when making changes 2025-03-29 16:47:13 -04:00
jean-pierre charras 313cc15fd3 French translation update 2025-03-29 12:54:43 +01:00
Jon Evans dc9fa2e2ac More functional fix for IPC API item modifications
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20206
2025-03-28 20:27:45 -04:00
Jon Evans 3bac9344d2 Revert "Switch to operator= for item updates"
This reverts commit d0b22d21bb.
2025-03-28 20:27:45 -04:00
Seth Hillbrand 6d0e0312b2 Update translations 2025-03-28 16:28:56 -07:00
pominglee 175a326307 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 99.0% (10100 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-03-29 00:27:42 +01:00
Adolfo Jayme Barrientos a4ad5dc773 Translated using Weblate (Spanish)
Currently translated at 85.3% (8704 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-29 00:27:42 +01:00
pominglee 1437e66741 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 98.3% (10031 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-03-29 00:27:42 +01:00
Adolfo Jayme Barrientos 7f32b2452d Translated using Weblate (Spanish)
Currently translated at 85.2% (8701 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-29 00:27:42 +01:00
Wellington Terumi Uemura 1bed76bed8 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (10201 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-03-29 00:27:42 +01:00
CloverGit 3990c61ea8 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.6% (10170 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-29 00:27:42 +01:00
Henrik Kauhanen 11ba582d87 Translated using Weblate (Swedish)
Currently translated at 99.5% (10156 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-29 00:27:41 +01:00
CloverGit e6f4b02e9c Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.6% (10163 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-29 00:27:41 +01:00
Adolfo Jayme Barrientos 560e91880e Translated using Weblate (Spanish)
Currently translated at 85.0% (8675 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-29 00:27:41 +01:00
pominglee c187c098ae Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 88.7% (9051 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-03-29 00:27:41 +01:00
Adolfo Jayme Barrientos be4b25026d Translated using Weblate (Spanish)
Currently translated at 85.0% (8673 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-29 00:27:41 +01:00
Ettore Atalan 286518e926 Translated using Weblate (German)
Currently translated at 99.1% (10116 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-29 00:27:41 +01:00
Marco Ciampa 49b145a6a0 Translated using Weblate (Italian)
Currently translated at 99.9% (10191 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-29 00:27:41 +01:00
lylythechosenone 8f9a6fde98 Translated using Weblate (Spanish (Mexico))
Currently translated at 83.9% (8559 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es_MX/
2025-03-29 00:27:41 +01:00
yanzhen zhu 5107bd43e7 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.2% (10126 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-29 00:27:41 +01:00
Pferd O 01936b1683 Translated using Weblate (German)
Currently translated at 99.1% (10113 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-29 00:27:41 +01:00
Henrik Kauhanen 5d49f4a3e9 Translated using Weblate (Swedish)
Currently translated at 98.5% (10054 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-29 00:27:41 +01:00
dsa-t 7c5ce03a93 Translated using Weblate (Russian)
Currently translated at 97.4% (9936 of 10201 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-29 00:27:41 +01:00
Seth Hillbrand deb14110aa Remove accident call to default SSHKey
The sshkey should not be reset when changing to https protocol.
2025-03-28 16:25:32 -07:00
Jeff Young 629a12ab2e Don't obliterate user data when syncing copper layer count.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20484
2025-03-28 19:24:58 +00:00
Michael712 d59f624001 Don't use transform coordination for height/width property display of rectangles
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20468
2025-03-28 16:38:12 +00:00
Ian McInerney fd94488289 Mark ODB++ as export-only
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20493
2025-03-28 15:32:03 +00:00
Jeff Young 151cb01795 Mirror pad numbers when appropriate.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20459
2025-03-27 23:28:30 +00:00
Mike Williams 659c783e5e API: unbreak the build (SwapData -> SwapItemData) 2025-03-27 14:11:06 -04:00
Jeff Young 7ba07a3bb0 Use action to change current sheet.
That way it gets into the navigation hierarchy,
the current zoom gets saved, etc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20466
2025-03-27 17:56:53 +00:00
Mike Williams c67924ccac schematic: convert RunOnChildren to also take recursion mode argument
Prepping for SCH_GROUPS, making consistent with the PCB code.
2025-03-27 13:16:09 -04:00
Mike Williams a90b8ec57a pcb: merge RunOnChildren/Descendants into one function with a mode 2025-03-27 13:16:09 -04:00
Mike Williams 7cf699bc9d eeschema: move SwapData to SwapItemData/swapData paradigm
Used by BOARD_ITEM to support groups, which we are adding to the
schematic. Also adds an unused group pointer for now.
2025-03-27 13:16:09 -04:00
Jeff Young 79924b5dfd Don't gate drill mark plotting on unenabled copper layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20460
2025-03-27 16:57:10 +00:00
Quentin Freimanis 78b6ca8256 clear itemByIdCache in IncrementTimestamp 2025-03-27 11:50:54 -04:00
Jeff Young 8076bfa3c7 Use std::optional to better flag presence of arguments.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20460
2025-03-27 13:58:11 +00:00
Jeff Young 96835cbfcf Job layersets come in already parsed.
Only CLI argments need parsing at the handler level.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20460
2025-03-27 12:01:22 +00:00
Jeff Young 07eda5d57e ADDED: report copper area for current selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20439
2025-03-27 10:14:30 +00:00
Jeff Young d16a5bf87d Formatting. 2025-03-27 10:14:30 +00:00
Seth Hillbrand 937f225df0 Update tree based on elements not map
Rather than updating the tree with all elements in the map (some of
which may have changed), we iterate over the tree and set those elements
that we find in the map.  This ensures that all elements updated in the
tree exist there

(cherry picked from commit 579c08155f)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20464
2025-03-26 13:11:58 -07:00
Seth Hillbrand 22e1f70a7e Remove requirement for name
Name is not needed for new git repos and is hidden, so can't be set
2025-03-26 12:36:31 -07:00
Jeff Young 88267c4a47 Formatting. 2025-03-26 16:49:36 +00:00
jean-pierre charras 99e65afa1f Pcbnew, plot F&B Fab: ensure the DNP mark is plotted only on the right layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20458
2025-03-26 16:26:30 +01:00
Jeff Young 01c1ff47ad Don't generate hatched fills for connectivity, etc.
(And in particular, don't regenerate them from
within the multi-threaded connectivity algo.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20451
2025-03-26 14:50:34 +00:00
Jeff Young 2ca09457b0 Formatting. 2025-03-26 14:50:34 +00:00
jean-pierre charras 3dfd164e2b Fix typo 2025-03-26 14:55:25 +01:00
jean-pierre charras 3e51b2c647 Pcbnew, performance fix: rebuild the pad view only when mandatory.
The LAYER_PAD_HOLEWALLS shape needs a rebuild only when the zoom level changes.
So keep trace of the last GAL zoom level to rebuild the shape, and only rebuild
the view when needed
2025-03-26 13:19:00 +01:00
jean-pierre charras 7bd4fa3fa6 Fix a Coverity and a compil minor warning 2025-03-26 13:19:00 +01:00
Jeff Young 34f12dc4be ADDED: fieldname template reordering.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20420
2025-03-26 11:11:09 +00:00
Tomasz Wlostowski 5f620f0fa1 router: don't try to lock the first vertex of a zero-vertex line. Might crash (sometimes).
Fixes https://gitlab.com/kicad/code/kicad/issues/20440
2025-03-26 00:12:43 +01:00
Seth Hillbrand 2dfe4d4716 Cleanup noisy assert
When undoing the addition of a symbol to the schematic, the symbol does
not originally have a parent, so we can't find the current sheet in
order to find the correct pins.  But we know the sheet in the undo list,
so we can just pass it in
2025-03-25 16:02:31 -07:00
Mike Williams cdbf71a562 eeschema: remove old source file 2025-03-25 14:06:37 -04:00
Jeff Young da05ad93ac Fix being able to delete custom layer names.
(Or anything in a PARAM_MAP, but layer names appear
to be the only current use of it.)
2025-03-25 18:06:00 +00:00
Jeff Young 3380afd9fd Auto-enable user layers that have custom FPEditor names. 2025-03-25 17:34:43 +00:00
Wayne Stambaugh 1b40ddaba5 Update default schematic when creating a new project.
Adding the missing default page number ("1") allows the CLI plotting and
printing by page number to work correctly even if the schematic hasn't been
saved in the schematic editor.

This also adds a default new schematic UUID and embedded font setting.

Use the fancy new file formatting style.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20448
2025-03-25 11:13:33 -04:00
Tomasz Wlostowski 1638322649 KIGIT: fix crash when the repo has no remote set 2025-03-25 16:06:52 +01:00
Wayne Stambaugh 69f758dbcd Update QA configuration files to the latest changes.
This prevents having to revert the changes to these files every time the
QA tests are run.
2025-03-25 10:56:33 -04:00
Wayne Stambaugh 7bc1404956 Fix broken Eeschema QA test when building jumper connectivity.
Don't attempt to access the library symbol jumper pin information when the
symbol doesn't have a valid library symbol reference.
2025-03-25 10:44:30 -04:00
Jeff Young b5cd5d2e27 Remove performance disclaimers from Render Job Options. 2025-03-25 13:25:00 +00:00
Jeff Young 6181fa5a91 Code clarity. 2025-03-25 13:22:24 +00:00
Jeff Young 4cd007cb6d Don't cover STL types. 2025-03-25 13:09:14 +00:00
Jeff Young 6e2914b990 Update terminology. 2025-03-25 12:05:54 +00:00
Jeff Young ab43c3c6b5 Process non-copper keepouts in footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20405
2025-03-25 11:52:34 +00:00
Jeff Young e48ad06cab Footprint editor doesn't need grid overrides for tracks/vias. 2025-03-25 11:13:13 +00:00
Jeff Young 9a7b82a8c0 MOVED: fp editor layer names to Display Options.
(It was on Footprint Defaults, which didn't make
any sense.  Probably just ended up there because
there was similar code there.)

Also fixed a bug with accepting the dialog with
a grid cell editor open.

Also fixed a bug where the number of copper layers
would get set back to 2.

Also fixed a bug where the layer names weren't
getting updated in the Appearances tab.
2025-03-25 10:34:01 +00:00
Jon Evans 1c83f0a70b Implement jumpers for footprints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2558
2025-03-24 22:17:46 -04:00
Jon Evans 805ca0c791 ADDED: Jumpers for symbols
Support explicit jumper symbols, defined either by a
flag that all pins with the same number are connected,
or by explicit groups of jumpered pins

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2558
2025-03-24 22:08:46 -04:00
Seth Hillbrand cf93cdf13f Respect user preference for rebase/merge 2025-03-24 15:40:25 -07:00
Seth Hillbrand 074b511fab Adjust OBJECT_DEPENDS for MacOS
It appears that MacOS only sees the last key/value for the
source_file_property whereas Linux/Windows see all depends.  This works
around the different by getting the value first, accumulating in the
loop and setting once at the end
2025-03-24 14:07:23 -07:00
Jeff Young d2b3f8ba28 ADDED: some individual flags for render jobs.
Also fixes bug where error code wasn't returned.

Also fixes bug where user's preferences were being
overwritten with each job.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20436
2025-03-24 20:00:13 +00:00
Seth Hillbrand 9113651076 Update translations 2025-03-24 12:08:07 -07:00
Håvard Syslak 5422cff30b Translated using Weblate (Norwegian Bokmål)
Currently translated at 40.1% (4078 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/nb_NO/
2025-03-24 19:59:32 +01:00
Viktor Döme 2fb0fd8de1 Translated using Weblate (Hungarian)
Currently translated at 5.8% (597 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/hu/
2025-03-24 19:59:32 +01:00
Adolfo Jayme Barrientos d8f37ff86a Translated using Weblate (Spanish)
Currently translated at 85.1% (8654 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-24 19:59:32 +01:00
Pferd O b57d1f9ab5 Translated using Weblate (German)
Currently translated at 99.5% (10119 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-24 19:59:32 +01:00
Adolfo Jayme Barrientos 09e34d2b58 Translated using Weblate (Catalan)
Currently translated at 41.0% (4172 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-03-24 19:59:32 +01:00
Adolfo Jayme Barrientos 65e1e12eaf Translated using Weblate (Spanish)
Currently translated at 84.5% (8589 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-24 19:59:32 +01:00
co8 j 51ddfa359f Translated using Weblate (Japanese)
Currently translated at 98.8% (10046 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-24 19:59:32 +01:00
Adolfo Jayme Barrientos 6f0350c761 Translated using Weblate (Spanish)
Currently translated at 84.4% (8578 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-24 19:59:32 +01:00
Adolfo Jayme Barrientos 7562f6a804 Translated using Weblate (Catalan)
Currently translated at 40.9% (4165 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-03-24 19:59:32 +01:00
ZbeeGin 3eef769de5 Translated using Weblate (Polish)
Currently translated at 98.3% (9993 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-03-24 19:59:32 +01:00
Marco Ciampa ea62ece5a4 Translated using Weblate (Italian)
Currently translated at 99.9% (10153 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-24 19:59:32 +01:00
Marco Ciampa e167bd8782 Translated using Weblate (Italian)
Currently translated at 99.2% (10083 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-24 19:59:31 +01:00
Marco Ciampa fccddf8330 Translated using Weblate (Italian)
Currently translated at 98.7% (10040 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-24 19:59:31 +01:00
Marco Ciampa 63d5b2bea9 Translated using Weblate (Italian)
Currently translated at 98.5% (10020 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-24 19:59:31 +01:00
Marco Ciampa ef76fbbd94 Translated using Weblate (Italian)
Currently translated at 97.8% (9946 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-24 19:59:31 +01:00
CloverGit 4ab1964a1c Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.6% (10123 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-24 19:59:31 +01:00
Adolfo Jayme Barrientos 84d6ee94c7 Translated using Weblate (Spanish)
Currently translated at 83.5% (8492 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-24 19:59:31 +01:00
Pferd O 95f99c2731 Translated using Weblate (German)
Currently translated at 99.5% (10117 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-24 19:59:31 +01:00
Adolfo Jayme Barrientos 60f331862a Translated using Weblate (Spanish)
Currently translated at 83.5% (8491 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-24 19:59:31 +01:00
ZbeeGin 67b8226960 Translated using Weblate (Polish)
Currently translated at 98.1% (9979 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-03-24 19:59:31 +01:00
Adolfo Jayme Barrientos b678e73e71 Translated using Weblate (Spanish)
Currently translated at 83.3% (8468 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-24 19:59:31 +01:00
co8 j 750956da7b Translated using Weblate (Japanese)
Currently translated at 98.8% (10044 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-24 19:59:30 +01:00
Tokita, Hiroshi 30fc350550 Translated using Weblate (Japanese)
Currently translated at 98.8% (10043 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-24 19:59:30 +01:00
Adolfo Jayme Barrientos 0ee47a3492 Translated using Weblate (Spanish)
Currently translated at 82.7% (8414 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/es/
2025-03-24 19:59:30 +01:00
Marco Ciampa b618cd353b Translated using Weblate (Italian)
Currently translated at 97.8% (9943 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-24 19:59:30 +01:00
Marco Ciampa cfc3364b58 Translated using Weblate (Italian)
Currently translated at 97.1% (9875 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-24 19:59:30 +01:00
co8 j 66f670ca18 Translated using Weblate (Japanese)
Currently translated at 98.7% (10039 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-24 19:59:30 +01:00
Tokita, Hiroshi ab27d41dfe Translated using Weblate (Japanese)
Currently translated at 98.7% (10039 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-24 19:59:30 +01:00
Wellington Terumi Uemura 8dc2733a33 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (10163 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-03-24 19:59:30 +01:00
Niyazi 76eee9be4a Translated using Weblate (Turkish)
Currently translated at 65.0% (6606 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-24 19:59:30 +01:00
Pferd O ba782e5bed Translated using Weblate (German)
Currently translated at 98.6% (10026 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-24 19:59:30 +01:00
Henrik Kauhanen c5804bebde Translated using Weblate (Swedish)
Currently translated at 98.9% (10056 of 10163 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-24 19:59:30 +01:00
Seth Hillbrand f83e607e6e Enable/disable git tracking in user prefs
Don't require advanced config for people who want to disable
2025-03-24 11:52:50 -07:00
Mike Williams 6d0a8cd346 pcb design blocks: fix net code mismatch when saving selection 2025-03-24 10:21:27 -04:00
Jeff Young 9c375581ff Don't assert (or crash) on shutdown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20433
2025-03-24 12:36:44 +00:00
Jeff Young 0a4533703c Performance. 2025-03-24 10:28:41 +00:00
Jon Evans d205a136a9 Ignore KiCad lock files 2025-03-23 20:08:05 -04:00
Jon Evans 8921824128 Mark pad as dirty when changing layerset
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20435
2025-03-23 20:08:05 -04:00
Ethan Chien 52514e1bfe Update CMake presets to version 9 and enhance build configurations for Windows 2025-03-23 03:51:38 +08:00
Seth Hillbrand 36366e254d Ignore autogenerated files 2025-03-22 08:04:31 -07:00
Seth Hillbrand ea36110980 Trying again to fix Mac build 2025-03-21 17:07:28 -07:00
Seth Hillbrand b65ceb60b2 Fix builds for newer libgit2 (1.8.0 and newer) 2025-03-21 17:03:28 -07:00
Seth Hillbrand faf6243d1a Fix build on Windows 2025-03-21 14:42:52 -07:00
Seth Hillbrand b8225ba2d6 Fix some regressions in git handling
Set default to rebase for pull
Update error string on auth failure
Improve trace logging
2025-03-21 11:55:44 -07:00
Jeff Young 0d6838b803 Add support for mixed-state checkboxes in grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17730
2025-03-21 13:49:07 +00:00
Jeff Young 5e61a5193f Fix misleading cast. 2025-03-21 13:49:07 +00:00
Seth Hillbrand e6843cde64 Don't re-read tokens on error
If the data were empty, there is no token, so curTok will represent the
right paren, not the next token

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

(cherry picked from commit d2550138bc)
2025-03-20 13:12:44 -07:00
Mike Williams e11cf94a3e design blocks: add PCB design blocks behind advanced config
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2508
2025-03-20 15:13:52 -04:00
JamesJCode e64239969a Fix compiler warnings 2025-03-20 18:42:20 +00:00
Jeff Young 9a1e42f228 Autocomplete for Execute Command job.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19735
2025-03-20 16:59:40 +00:00
Wayne Stambaugh f5cae044d0 Fix Coverity issue #545159 and all related issues.
Don't use fmt::format() when formatting wxString objects.  It will throw
an exception on an argument type mismatch which isn't handled in most
code paths.

This also prevents the conversion of the fmt::format() arguments from
wxString to std::string and the result from std::string back to wxString
for the return value.

https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=545159
2025-03-20 11:16:02 -04:00
Seth Hillbrand b567532af7 Add minimum libgit2 version
Crashes have been reported with libgit2 1.3.2 and ssh key handling

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20204
2025-03-20 06:56:34 -07:00
Jeff Young 59e77e977e Don't use net/netclass colors for label graphic shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19589
2025-03-20 13:52:21 +00:00
Jeff Young 1b7f92f4c5 Refresh search when showing pane.
(Events will have been ignored while it is
hidden.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20009
2025-03-20 12:25:58 +00:00
Jeff Young b366204824 Handle home dir shortcut in jobset destinations.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20032
2025-03-20 10:45:53 +00:00
Brendan Hickey 33a8cd942f Increase GerbView max DCode Id to 2^31-1
I (charrasjp) fixed the compil issues of the Brendan Hickey's initial work and some other minor issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20323
2025-03-20 11:27:53 +01:00
Jeff Young 86e1d4c684 Shorten opt-in text and improve Yes/No button labels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20027
2025-03-20 10:24:02 +00:00
Jeff Young 5ec526fe4f Don't write out empty footprint filters.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20394
2025-03-20 10:02:26 +00:00
Jeff Young d3f57fac5a Must assign extension to keep from stripping last '.' section.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20065
2025-03-20 09:48:08 +00:00
Jeff Young 0aa4f11970 Fix format string. 2025-03-20 09:48:08 +00:00
jean-pierre charras 21725eeef3 ~EDA_DRAW_PANEL_GAL(): Fix crash: ensure a onShowEvent is not fired.
Due to changes in EDA_DRAW_PANEL_GAL (a wxEVT_SHOW event was added) when
destroyed a dialog using it (namely the PAD editor) a wxEVT_SHOW event was fired
during Dtor process (at least on Windows). It is now disabled in Dtor.
2025-03-20 10:12:59 +01:00
Mike Williams a648fccbb3 schematic editor: remove 10ms OnShow timer to reduce CPU load
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20385
2025-03-19 15:05:54 -04:00
Jeff Young 19d1b6ec52 Don't let legacy overbar processing mess up empty-string test. 2025-03-19 18:14:30 +00:00
Jeff Young eb4a52f372 Remove debugging code accidentally left in. 2025-03-19 17:44:17 +00:00
Jeff Young f0c81e972f Fix accidental ingoring of rotation angle.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20271
2025-03-19 17:16:55 +00:00
Jeff Young 7e046e6c8b Remove '~' == empty_string.
It has long outlived its usefulness (which was
to preserve token sequence in pre-sexpr files).

This will no doubt turn up latent issues....
2025-03-19 17:16:55 +00:00
Wayne Stambaugh bc4a40de76 Fix Coverity issue #543091.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=543091
2025-03-19 12:38:50 -04:00
Wayne Stambaugh 4cb234862c Fix Coverity issue #542006.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=542006
2025-03-19 12:07:05 -04:00
Mike Williams 18010b1104 selection: sort box selection by rows and columns by default
Some tools can take a selection order and it is nice to provide a
sane human-oriented default sorting when box selecting.
2025-03-19 10:25:35 -04:00
Mike Williams 7578439b0c PCB editor: extend create array functionality to arrange existing items
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19919
2025-03-19 10:23:15 -04:00
jean-pierre charras b7fd26e026 PANEL_DESIGN_BLOCK_CHOOSER: use the same draw engine type as in main frame.
This is not always the Opengl GAL_TYPE

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20386
2025-03-19 11:33:53 +01:00
Jeff Young 8994f6abd7 Leave navigation controls active.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20378
2025-03-19 10:20:43 +00:00
Jeff Young 3328dc48be Don't leave dangling event handler.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20380
2025-03-19 10:14:24 +00:00
Jeff Young b4640cdc55 Search all fields, hidden or not.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20370
2025-03-19 08:55:32 +00:00
Jeff Young 0a3ddd33ee Use ERROR_INSIDE for knockout text (and a 0 gap). 2025-03-19 08:55:32 +00:00
Jeff Young 824c7ecfa7 Improve readability.
Also drops a parameter that hasn't been implemented
since early 2022.
2025-03-19 08:55:32 +00:00
JamesJCode 983d14d371 Fix compiler warning 2025-03-18 23:46:09 +00:00
JamesJCode 0f1f6b23a8 Test symbol outline collisions for rule areas, not just bounding boxes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20383
2025-03-18 23:04:48 +00:00
JamesJCode 24a8c2a684 Ensure PNS length tuning calculation uses correct layer ID context
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20372
2025-03-18 12:37:16 +00:00
Jon Evans 4ef0d3554e Handle duplicate entries in BOM presets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20342
2025-03-17 18:37:52 -04:00
Jon Evans 2ef123d9e1 Code style 2025-03-17 18:27:33 -04:00
Wayne Stambaugh 7645f05962 Change code formatter configuration files from 100 to 120 characters. 2025-03-17 17:34:15 -04:00
Jeff Young 6307f0aee8 Use board layer names when available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20360
2025-03-17 21:23:56 +00:00
Jeff Young 142f8265c5 Simplify (and fix) plated copper differentiation.
Also a few fixes for 3D rendering textboxes and
tables.
2025-03-17 20:11:20 +00:00
Jeff Young 683444733a Formatting. 2025-03-17 20:11:20 +00:00
Wayne Stambaugh cf4369a2ef Fix Coverity issue #545180.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=545180
2025-03-17 15:16:49 -04:00
Wayne Stambaugh 19b0ac6ec4 Revert "Fix Coverity issue #545181."
This reverts commit 31d3c17d99.
2025-03-17 15:12:48 -04:00
Wayne Stambaugh 31d3c17d99 Fix Coverity issue #545181.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=545181
2025-03-17 15:09:30 -04:00
Wayne Stambaugh 8fa48c7be2 Fix Coverity issue #514495.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=514495
2025-03-17 14:43:43 -04:00
Wayne Stambaugh 62cb67d854 Fix Coverity issue #541995.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=541995
2025-03-17 14:04:40 -04:00
Jeff Young 5094f750df Adjust GTK STC margins. Yes, again.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16685
2025-03-17 17:33:23 +00:00
Wayne Stambaugh dd806aa902 Fix Coverity issue #542006.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=542006
2025-03-17 13:30:41 -04:00
Wayne Stambaugh 5783623c50 Add code to test if schematic file belongs to another project. 2025-03-17 13:12:35 -04:00
Jeff Young 858f6b0fc2 Adjust GTK STC margins.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16685
2025-03-17 17:00:25 +00:00
Wayne Stambaugh f53d1a5356 Fix Coverity issue #543084.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=543084
2025-03-17 12:55:54 -04:00
Wayne Stambaugh 47984b6793 Coding policy house keeping. 2025-03-17 12:45:25 -04:00
Wayne Stambaugh 4131089260 Fix Coverity issue #544154.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=543084
2025-03-17 12:21:02 -04:00
Wayne Stambaugh b364f5dbde Properly prevent duplicate sheet names on paste.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20357
2025-03-17 12:02:01 -04:00
JamesJCode 4a99a3060d Add new DRC expression function isMemberOfSheetOrChildren
This allows the multichannel tool to search for footprints that are in nested
hierarchical sheets.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20339
2025-03-17 15:55:59 +00:00
Alex Shvartzkop d0518c96b2 Update translations 2025-03-17 18:42:55 +03:00
Marco Ciampa 32e3570758 Translated using Weblate (Italian)
Currently translated at 96.7% (9749 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-17 16:42:09 +01:00
Pferd O 1dfc09a39d Translated using Weblate (German)
Currently translated at 99.2% (10000 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-17 16:42:09 +01:00
ZbeeGin 2230fd2518 Translated using Weblate (Polish)
Currently translated at 98.8% (9962 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-03-17 16:42:09 +01:00
Jan Straka 3e838bce5b Translated using Weblate (Czech)
Currently translated at 76.8% (7737 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2025-03-17 16:42:09 +01:00
Pferd O b6b5c4be54 Translated using Weblate (German)
Currently translated at 99.2% (9999 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-17 16:42:09 +01:00
Marco Ciampa 6fdad6c799 Translated using Weblate (Italian)
Currently translated at 96.3% (9708 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-17 16:42:09 +01:00
Marco Ciampa a06fd8a97e Translated using Weblate (Italian)
Currently translated at 96.3% (9706 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-17 16:42:09 +01:00
Ertuğrul Reisoğlu 5a732b7b9f Translated using Weblate (Turkish)
Currently translated at 65.0% (6556 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-17 16:42:09 +01:00
Henrik Kauhanen 2ac2bffa9e Translated using Weblate (Swedish)
Currently translated at 99.7% (10047 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-17 16:42:09 +01:00
NAXSISFLYBY df02aec8a5 Translated using Weblate (Turkish)
Currently translated at 65.0% (6548 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-17 16:42:09 +01:00
NAXSISFLYBY 627d9e5e50 Translated using Weblate (Turkish)
Currently translated at 65.0% (6548 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-17 16:42:09 +01:00
NAXSISFLYBY 36255b90e4 Translated using Weblate (Turkish)
Currently translated at 64.9% (6546 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-17 16:42:09 +01:00
dsa-t 25f883cf63 Translated using Weblate (Russian)
Currently translated at 98.4% (9920 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-17 16:42:08 +01:00
Jan Straka 403c9055ed Translated using Weblate (Czech)
Currently translated at 75.4% (7605 of 10073 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/cs/
2025-03-17 16:42:08 +01:00
Jeff Young 17712ba321 Improve text alignment in grids and one-line Scintilla controls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16685
2025-03-17 13:56:10 +00:00
Jeff Young 6c97a40b8c Attempt to fix lack of initialisation on GTK/MSW.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20050
2025-03-17 11:42:11 +00:00
jean-pierre charras 60f65e68c1 Step export: handle castellated pads.
Only pads having the fab property "Castellated" are handled.
2025-03-17 11:14:53 +01:00
Jeff Young 1848401d5b Update layer per page.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20352
2025-03-17 09:51:53 +00:00
Jeff Young dd921354fc Cleanup. 2025-03-17 09:50:06 +00:00
Jeff Young 413d6747c5 Collapse SCH_TABLE border drawing into shared code.
Also pushes GetCornersInSequence() into EDA_SHAPE
so it can be shared between SCH_TABLE and PCB_TABLE.

Also fixes bug in drawing column rulings over the
right external border.

Also fixes a bug with dialog control enabling.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20350
2025-03-16 20:21:49 +00:00
Jeff Young 1333c4c305 Move layer arg parsing up so we can handle user-defined layer names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18773
2025-03-16 17:28:44 +00:00
Jon Evans 77747aa41e Use UI order for drill report stackup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20069
2025-03-16 11:13:14 -04:00
Jon Evans fe22166d9f Use stable sort ordering in ERC reports
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20333
2025-03-16 10:25:29 -04:00
Jeff Young 6708f7b10c Fix off-by-one error when dragging to the left.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20307
2025-03-16 12:16:47 +00:00
Jeff Young 533551f014 Don't bleed settings between 3D viewer and 3D footprint preview.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17353
2025-03-16 11:52:56 +00:00
Seth Hillbrand 676dd4ceec Fix inheritance for git_common
Avoids repo type pointer issues when casting from void
2025-03-15 13:05:45 -07:00
Jeff Young f4a5404e0a Resolve variables in hrefs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20340
2025-03-15 19:31:46 +00:00
Jeff Young f9b19bbb5b Fix is-same logic in updateFootprintParameters.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19988
2025-03-15 18:42:02 +00:00
Jeff Young f33f10bb38 User-defined layers for 3D viewer. 2025-03-15 16:14:33 +00:00
Alex Shvartzkop 29c0c35f5f Update translations 2025-03-15 19:00:51 +03:00
Marco Ciampa 13c295e141 Translated using Weblate (Italian)
Currently translated at 96.3% (9684 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-15 16:58:21 +01:00
İclal Gör d9a0c001b2 Translated using Weblate (Turkish)
Currently translated at 65.1% (6544 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-15 16:58:21 +01:00
Marco Ciampa e526c5b988 Translated using Weblate (Italian)
Currently translated at 96.3% (9681 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-15 16:58:21 +01:00
İclal Gör 6df678a227 Translated using Weblate (Turkish)
Currently translated at 65.0% (6540 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-15 16:58:21 +01:00
Marco Ciampa e5a275038d Translated using Weblate (Italian)
Currently translated at 96.2% (9675 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-15 16:58:21 +01:00
İclal Gör e6200bb5eb Translated using Weblate (Turkish)
Currently translated at 63.0% (6342 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-15 16:58:21 +01:00
Shuwn Hsu c7bfe02382 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 89.8% (9031 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-03-15 16:58:20 +01:00
Pferd O 6ddd5ae050 Translated using Weblate (German)
Currently translated at 99.3% (9988 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-15 16:58:20 +01:00
Henrik Kauhanen da267aed7e Translated using Weblate (Swedish)
Currently translated at 99.9% (10047 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-15 16:58:20 +01:00
dsa-t dfd81c7521 Translated using Weblate (Russian)
Currently translated at 98.6% (9913 of 10051 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-15 16:58:20 +01:00
JamesJCode ede5faee72 Implement dynamic assignment of component classes 2025-03-15 14:33:47 +00:00
aris-kimi bb62444fe9 Fix a git2 related crash when closing KiCad
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20202
2025-03-14 20:00:17 -07:00
Seth Hillbrand de09403b10 Fix mistake in arc circle collision
Need to test nearest point from the circle center to the arc.  Add QA to
prevent regression

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20336
2025-03-14 18:06:09 -07:00
Seth Hillbrand 2c52f98da4 Add ability for git to negotiate with agents
Updates the git connection dialog to reflect default agentic behavior,
followed by default keys and only then reverting to a custom selection
if the user desires

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20204
2025-03-14 17:01:03 -07:00
Seth Hillbrand 26c331a837 Adjust git handling
- Utilize scoped deletion for individual git_*_free() calls
- Protect against multiple usage when updating icons
- Reduce frequency of git update calls
2025-03-14 17:01:03 -07:00
JamesJCode 078a01976f Include child SCH_PINs in SCH_RULE_AREA item caches
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20332
2025-03-14 20:57:17 +00:00
Jeff Young 10237c4270 Remove extraneous parameter and fix error dialog title.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20061
2025-03-14 20:00:43 +00:00
Jeff Young 1ee3131e4a Check silk/soldermask collisions in FP checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19707
2025-03-14 19:45:26 +00:00
Jeff Young be183c94c0 Make sure color gets set on background layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20241
2025-03-14 15:35:05 +00:00
Jeff Young 8894c470ef Don't modify selection in the middle of a move/drag.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20239
2025-03-14 14:52:49 +00:00
jean-pierre charras 7f1b412203 plot mask layers: do not skip mask on track when solder mask min web is not 0
When solder mask min web is not 0, PlotSolderMaskLayer() uses GenerateLayerPoly(),
that skipped tracks (not updated since tracks can be on a mask layer)
2025-03-14 15:17:04 +01:00
jean-pierre charras 2210fc3518 minor compil warning fix 2025-03-14 15:01:01 +01:00
jean-pierre charras d3c05c7ccd minor additional fix to commit ddd27f28 2025-03-14 14:58:58 +01:00
Jeff Young 521b411090 Init checkboxes after reading prefs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20309
2025-03-14 13:26:55 +00:00
Jeff Young 3c32f4d31d Refresh preview after rotate/flip/mirror during move.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19561
2025-03-14 13:17:52 +00:00
Lucas Gerads 313232c9f3 Simulator: Fix line offset in intermediate ngspice file
- Fixes issue #20268
- Replace the hard coded line numbers
- Search for "Value:" string instead
2025-03-13 18:29:56 -04:00
Seth Hillbrand 54be62b8fa Allow unprintable characters in LIB_ID
We were allowing people to paste lower-level ASCII characters into a
symbol name, but not load them.  The characters don't print but they
don't break anything either, so allowing them is the most compatible
method
2025-03-13 11:39:11 -07:00
Jeff Young 2304d10879 Fix failure to increment job number.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20034
2025-03-13 16:37:27 +00:00
Jeff Young e48a2b5ee4 Don't report non-meeting line-pairs.
We're called on each line pair, so a rect would otherwise
always report to failures for the two pairs of opposite
sides.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20326
2025-03-13 16:32:25 +00:00
dsa-t 18b5046fae Fix Eagle PCB layers handling after v9 layer changes.
(cherry picked from commit 2bf369793c)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-03-13 17:48:56 +03:00
Jeff Young f3f9730f2c Render tables & their borders to 3D view.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19981
2025-03-13 14:04:31 +00:00
Jeff Young 93ea523eec De-duplicate table border drawing code.
Also cleans up a misconception about table header borders,
and renames the getter/setter to be clearer.

Also makes sure that table cells are updated when the table
layer changes.

And another bug where we were writing the grey color value
back to the cell for hidden cells.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20319
2025-03-13 13:15:47 +00:00
Jeff Young 5996cffabc EE -> SCH (no functional changes) 2025-03-13 13:15:47 +00:00
Alex Shvartzkop d5f02ba7bc Update translations 2025-03-13 15:25:56 +03:00
Marco Ciampa 61a89f1c83 Translated using Weblate (Italian)
Currently translated at 96.1% (9661 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-13 13:23:25 +01:00
co8 j f8a1de4945 Translated using Weblate (Japanese)
Currently translated at 99.0% (9950 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-13 13:23:25 +01:00
Pferd O 7167faaab6 Translated using Weblate (German)
Currently translated at 99.4% (9989 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-13 13:23:25 +01:00
dsa-t 1ac75d2c04 Translated using Weblate (Russian)
Currently translated at 98.6% (9913 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-13 13:23:25 +01:00
İclal Gör df1c7802d7 Translated using Weblate (Turkish)
Currently translated at 59.9% (6026 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:25 +01:00
İclal Gör 7c8187cb56 Translated using Weblate (Turkish)
Currently translated at 59.8% (6013 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:25 +01:00
İclal Gör 37dca5b2e6 Translated using Weblate (Turkish)
Currently translated at 58.3% (5862 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:24 +01:00
Argeolog 423ea8deae Translated using Weblate (Turkish)
Currently translated at 57.7% (5802 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:24 +01:00
2tama3 dc8ad32e92 Translated using Weblate (Japanese)
Currently translated at 99.0% (9948 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-13 13:23:24 +01:00
co8 j 02c9336de1 Translated using Weblate (Japanese)
Currently translated at 99.0% (9948 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-13 13:23:24 +01:00
Marc de Miguel 6fdd2cc119 Translated using Weblate (Catalan)
Currently translated at 41.2% (4148 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-03-13 13:23:24 +01:00
Ahmet Saygın ÖĞÜLMÜŞ fd4871409b Translated using Weblate (Turkish)
Currently translated at 57.7% (5803 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:23 +01:00
Marc de Miguel 37249d0fd1 Translated using Weblate (Catalan)
Currently translated at 41.0% (4127 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-03-13 13:23:23 +01:00
İclal Gör 087cd06deb Translated using Weblate (Turkish)
Currently translated at 57.6% (5791 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:23 +01:00
Marc de Miguel d6cfd3e41c Translated using Weblate (Catalan)
Currently translated at 40.9% (4119 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-03-13 13:23:23 +01:00
dsa-t 48fc765a38 Translated using Weblate (Turkish)
Currently translated at 56.8% (5715 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:23 +01:00
İclal Gör 8c700eac1b Translated using Weblate (Turkish)
Currently translated at 56.8% (5715 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:23 +01:00
Marc de Miguel 62fc117473 Translated using Weblate (Catalan)
Currently translated at 40.9% (4115 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-03-13 13:23:23 +01:00
İclal Gör 039b03cd7a Translated using Weblate (Turkish)
Currently translated at 54.7% (5505 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:23 +01:00
Argeolog 487afaad96 Translated using Weblate (Turkish)
Currently translated at 54.4% (5471 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:23 +01:00
İclal Gör 442fa8f511 Translated using Weblate (Turkish)
Currently translated at 54.4% (5471 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:23 +01:00
CloverGit f6d4815c8a Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (10028 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-13 13:23:22 +01:00
CloverGit 3a087b5baf Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 89.8% (9027 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hant/
2025-03-13 13:23:22 +01:00
CloverGit ed29c73763 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.6% (10010 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-13 13:23:22 +01:00
Ahmet Saygın ÖĞÜLMÜŞ 9cdaa7848a Translated using Weblate (Turkish)
Currently translated at 54.3% (5459 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:22 +01:00
Henrik Kauhanen fc264aaa60 Translated using Weblate (Swedish)
Currently translated at 99.9% (10047 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-13 13:23:22 +01:00
Ettore Atalan 9a04c1ce37 Translated using Weblate (German)
Currently translated at 99.3% (9982 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-13 13:23:22 +01:00
Pferd O ea0a26b8a8 Translated using Weblate (German)
Currently translated at 99.3% (9982 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-13 13:23:22 +01:00
dogukansahil 76243ef2c9 Translated using Weblate (Turkish)
Currently translated at 53.9% (5423 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:21 +01:00
Ahmet Saygın ÖĞÜLMÜŞ 99adcbb1ed Translated using Weblate (Turkish)
Currently translated at 53.9% (5423 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-13 13:23:21 +01:00
dsa-t d5ad5f7c81 Translated using Weblate (Russian)
Currently translated at 98.6% (9913 of 10048 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-13 13:23:21 +01:00
jean-pierre charras ddd27f2869 Eeschema printing: ensure the flag "is first page" is correctly set.
It is mainly used to draw page layouts having different objects drawn on
first page and other pages.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20318
2025-03-13 11:01:06 +01:00
Seth Hillbrand de4d7882e6 Fix compile 2025-03-12 18:34:22 -07:00
Zenn Geeraerts d31eeb5c1b Use case insensitivity when loading Altium files
Altium is case insensitive, so our match for internal names should be also
2025-03-12 18:23:01 -07:00
JamesJCode 7d8b385a72 Fix compiler warning 2025-03-12 20:03:32 +00:00
Seth Hillbrand 1c245ad01e Be sure to clear hit cache
When re-running the DRC creepage check, we need to ensure that the
element-element hittest set is cleared to report the same errors again

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20048
2025-03-12 11:48:21 -07:00
Seth Hillbrand 96794e94e3 Correct layerset calls
The Board layerset (because BOARD is a BOARD_ITEM) should return the
layers that the board contains instead of just the F.Cu.  This assigns
the common function to map to the board-specific functions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20317
2025-03-12 11:48:21 -07:00
jean-pierre charras dd604361d3 LISTBOX_TRICKS::listBoxDeleteSelected(): fix crash when trying to remove 0 entries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20320
2025-03-12 16:03:01 +01:00
Jeff Young 6df9c90440 Add textOnEdgeCuts to global DRC items list.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20308
2025-03-12 11:30:48 +00:00
Jeff Young e5bedd937c Formatting. 2025-03-12 10:21:59 +00:00
Jeff Young 63435df77d Don't wait for mouse move to draw selection shadows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20309
2025-03-12 09:41:10 +00:00
jean-pierre charras ccc396a6c2 BOARD::BulkRemoveStaleTeardrops(): fix bug that prevent removing a teardrop.
When a teardrop is the first zone (or the only one) in list (i.e. last tested)
it was ignored, and therefore not removed.
2025-03-12 09:44:45 +01:00
Jon Evans 95e6ca44c6 Don't use size events for persistence
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20060
2025-03-11 22:36:46 -04:00
Jon Evans 5774338af2 Fix build with protobuf 30
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20300
2025-03-11 17:33:17 -04:00
Jeff Young b7ef57a97d Apply Damjan's rotated table fixes to PCB_TABLE::GetEffectiveShape().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20143
2025-03-11 20:12:32 +00:00
Jeff Young 459cf030b8 Don't disable first internal layer in footprint editor.
It's used as a proxy for all internal layers.

Also fixes LAYER_RANGE_ITERATOR so that it works with an odd
number of copper layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20246
2025-03-11 19:11:11 +00:00
Seth Hillbrand a6fbf4bbdb Don't write empty data tags
Also avoid throwing if a data stream is empty so that you can still read
the schematic/pcb/library

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20301
2025-03-11 09:44:58 -07:00
Jeff Young 31b788c04f Add a bit of protection from integer overflows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19660
2025-03-11 15:11:31 +00:00
Jeff Young 4a64aa9816 Fix wrapping of text in infobar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19171
2025-03-11 14:47:26 +00:00
Jeff Young d527ce92ca Formatting. 2025-03-11 11:02:27 +00:00
Jeff Young 7401b57fcb Warning messages for simulation tuning.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20274
2025-03-11 11:02:20 +00:00
Jeff Young b11b1a6f72 Ease in a bit more fmt::format(). 2025-03-11 10:08:04 +00:00
Jeff Young b569d919ea No more invisible (non-field) text. 2025-03-10 21:58:30 +00:00
Jeff Young 9ac851b314 Fixes for CLI input and output directories.
Plot functions use an output directory.

Those functions that support an input directory also support
input files.
2025-03-10 20:11:39 +00:00
Jeff Young 567da3de91 Tables support for router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20295
2025-03-10 15:45:42 +00:00
Jeff Young 6ac64d290b Check parent footprint as well for component class.
Also output more descriptive text when checking inherited
rules on parent footprint.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20281
2025-03-10 13:34:01 +00:00
Alex Shvartzkop c4655da4e6 Don't translate wxFileDialog "All Files" filter.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20297
2025-03-10 16:05:56 +03:00
Lucas Dumont 3ddaa24775 Change deleting for-range loop to while loop
It seem that the iterator may be invalidated in the loop.
By always taking the first element and looping until empty, we avoid the issue

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20283
2025-03-09 19:34:13 -07:00
Tomasz Wlostowski c05cc345f3 multichannel: possible fix for ghosting footprints when using grouping 2025-03-09 23:36:54 +01:00
Tomasz Wlostowski b1bf5127fa connectivity: treat empty FPIDs as matching in TOPO_MATCH 2025-03-09 23:36:54 +01:00
Tomasz Wlostowski 8192ba73d9 connectivity: TOPO_MATCH now orders reference components by the lowest matching candidate count.
This heuristic seems to make the algorithm reject non-isomorphic mappings much earlier on and converges faster on a solution for typical circuits.
2025-03-09 23:36:53 +01:00
Tomasz Wlostowski 91ee987cfe connectivity: TOPO_MATCH now prioritizes component candidates by the ratio of matching pad nets.
This improves cloning of circuits with numerous of matching component mappings (e.g. LED matrices) by
taking preference for mappings with same order of net connections.
2025-03-09 23:36:27 +01:00
Jeff Young a468c486eb DRC for tables. (And some fixes for dimensions.) 2025-03-09 17:59:32 +00:00
Jeff Young 4b38932129 Group members are still children of the board (not
the group).
2025-03-09 17:59:32 +00:00
Alex Shvartzkop b13318b854 Update translations 2025-03-09 19:04:34 +03:00
dsa-t e72c5e9e82 Translated using Weblate (Turkish)
Currently translated at 53.0% (5330 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-09 17:04:08 +01:00
Argeolog f5629f04e3 Translated using Weblate (Turkish)
Currently translated at 53.0% (5331 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-09 17:04:08 +01:00
Argeolog 8caa051e8b Translated using Weblate (Turkish)
Currently translated at 52.8% (5312 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-09 17:04:07 +01:00
Argeolog cd0cbb5acb Translated using Weblate (Turkish)
Currently translated at 52.7% (5304 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-09 17:04:07 +01:00
Wellington Terumi Uemura e674827255 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (10047 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-03-09 17:04:07 +01:00
Argeolog c6fee328e2 Translated using Weblate (Turkish)
Currently translated at 52.7% (5303 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/tr/
2025-03-09 17:04:07 +01:00
Ettore Atalan 569d38c39e Translated using Weblate (German)
Currently translated at 99.3% (9977 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-09 17:04:07 +01:00
ZbeeGin b47b04b795 Translated using Weblate (Polish)
Currently translated at 98.9% (9945 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-03-09 17:04:07 +01:00
Pferd O 2335fa7708 Translated using Weblate (German)
Currently translated at 99.2% (9974 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-09 17:04:07 +01:00
Rigo Ligo 97753e8208 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.4% (9995 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-09 17:04:07 +01:00
CloverGit 456e2e18b4 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.4% (9995 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-09 17:04:07 +01:00
co8 j 2d81ba665a Translated using Weblate (Japanese)
Currently translated at 98.8% (9936 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-09 17:04:07 +01:00
Marco Ciampa a7b9d1cabe Translated using Weblate (Italian)
Currently translated at 96.1% (9664 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-09 17:04:07 +01:00
Henrik Kauhanen 35eaef151c Translated using Weblate (Swedish)
Currently translated at 99.9% (10046 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-09 17:04:07 +01:00
Henrik Kauhanen 6de078ffad Translated using Weblate (Finnish)
Currently translated at 97.8% (9829 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-03-09 17:04:06 +01:00
CloverGit 17eb1f0558 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.3% (9977 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-09 17:04:06 +01:00
dsa-t 7e7b78707d Translated using Weblate (Russian)
Currently translated at 98.6% (9913 of 10047 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-09 17:04:06 +01:00
Jeff Young 2ed2d733c3 Revert 1f620e9cca.
(A group member is still a child of the board; it's just
also a member of the group.)
2025-03-09 16:01:08 +00:00
Alex Shvartzkop dc961d37ad Optimize SHAPE_LINE_CHAIN_BASE::EdgeContainingPoint. 2025-03-09 16:27:07 +03:00
Alex Shvartzkop b91e005277 Pre-fetch segments in SHAPE_LINE_CHAIN::SelfIntersecting. 2025-03-09 16:27:04 +03:00
Alex Shvartzkop a82916f4db Improve performance of SEG::Contains. 2025-03-09 16:27:01 +03:00
Alex Shvartzkop 18d836ef8b Reduce CSegment calls in SHAPE_LINE_CHAIN::SelfIntersecting. 2025-03-09 16:26:57 +03:00
Jeff Young 0a3f14c855 Sync selection & selection flags after replacing fields. 2025-03-09 11:47:31 +00:00
Jeff Young 1f620e9cca forAllGeometryItems must account for PCB_GROUP descendants. 2025-03-09 11:47:31 +00:00
Jeff Young e163c40e54 Formatting. 2025-03-09 11:47:31 +00:00
JamesJCode 85e6978aa2 Mirror netclass DRC expression semantics for component classes
With this change, "A.Component_Class == 'SOME_CLASS'" will return
true if either SOME_CLASS exists in the list of component classes
attached o the footprint, or if SOME_CLASS is the full component
class name.
2025-03-08 22:18:22 +00:00
Jeff Young 50174ec528 Beware of infinite recursion on colliding hatched shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20264
2025-03-08 21:23:14 +00:00
Marek Roszko ab6ee168cf Convert PDF_PLOTTER to fmtlib 2025-03-08 14:29:20 -05:00
Jeff Young 241962a84d When following board or plot settings, write results to current config.
Also adds migration from older layer numbers to strings.
This may require users to dump their 9.0 settings files
(which will have the wrong layer numbers in them), but
those files are often useless anyway as they'll already
have messed up colours if they were migrated from 8.0.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18709
2025-03-08 19:11:23 +00:00
jean-pierre charras 6729e313a5 Pcbnew, DIALOG_DRC: fix incorrect behavior of Shaw All checkbox. 2025-03-08 18:23:08 +01:00
jean-pierre charras 4ef627edb9 GERBER_PLOTTER: fix missing separator (comma) after ADDxxOutlinexP
It was missing after commit 2cdc1ed8
2025-03-08 16:36:49 +01:00
Marek Roszko 2cdc1ed88e Move GERBER_PLOTTER to fmtlib 2025-03-08 07:56:54 -05:00
jean-pierre charras 9a1cf81ca6 Pcbnew: remove dead code.
The export SVG dialog was removed some time ago (merged with plot svg).
But some settings of this removed dialogs were not removed.
2025-03-08 10:09:47 +01:00
jean-pierre charras 9d1b320896 Fix compil warnings 2025-03-08 09:40:23 +01:00
Seth Hillbrand 641e06e67c Removed shared_ptr circular references
When A references B and B references A, the shared pointer reference
count will never go to zero by just removing the parent container.  We
need to explicitly clear the shared pointer references when we are done

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20272
2025-03-07 17:31:02 -08:00
Seth Hillbrand 4ef81ee3ea Revert "Remove prototype zone fill option"
This reverts commit 3f17aabcd0.
2025-03-07 15:25:13 -08:00
Seth Hillbrand 4f6a73d83c Prevent ERC error with NC pin+NC marker
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20222
2025-03-07 15:24:30 -08:00
Seth Hillbrand 3f17aabcd0 Remove prototype zone fill option
This option is not exposed in the UI or advanced config and duplicates
the action of changing the zone fill type and creates additional ways
that boards can be modified by local, non-board settings.
2025-03-07 13:45:40 -08:00
Damjan bded181ad0 pcbnew: table rotation: table jumps if rotation ends at 180° 2025-03-07 20:38:56 +00:00
Jeff Young 95d8634401 Fix drawing of selected/highlighted local power port labels.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20262
2025-03-07 20:33:19 +00:00
Jeff Young eedd811c0a Fix bad static_cast. 2025-03-07 18:42:45 +00:00
Jeff Young 880442e8ed Propagate damage from footprint children. 2025-03-07 17:52:53 +00:00
Jeff Young b532a849b8 Don't attempt to knockout self from hatching. 2025-03-07 17:52:53 +00:00
Seth Hillbrand b401505259 Fix previous commit 2025-03-07 08:42:35 -08:00
Seth Hillbrand 1157b5b0b3 Add missing arch directory to appimage plugin 2025-03-07 08:42:12 -08:00
Seth Hillbrand 2b557c5497 Revert "Allow a no-connect to connect to a single pin (but not multiple pins)."
This reverts commit ee4a6127c6.
2025-03-07 08:10:04 -08:00
Jeff Young 0fae6a0db0 Initialize field ordinals for LIB_SYMBOLs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20263
2025-03-07 15:52:31 +00:00
Jeff Young 727fc9bd06 Fix merge mess-up. 2025-03-07 13:23:57 +00:00
Marek Roszko dd4c9af265 Move HPGL_PLOTTER to fmtlib 2025-03-07 08:02:13 -05:00
Jeff Young 877c6bce89 Printing is not zoom-specific.
(Some of these items don't currently get printed, but
there's no sense in leaving a latent bug around in case
we ever change our minds.)
2025-03-07 13:01:00 +00:00
Jeff Young ce5469b95e Support ctrl-delete for delete word forward.
(On non-Macs, anyway.  Mac doesn't appear to use this
paradigm.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20248
2025-03-07 13:01:00 +00:00
Marek Roszko a1e897c245 Move PS_plotter to fmtlib
Also we wrote %Page but the postscript standard wants %%Page
2025-03-07 07:05:13 -05:00
Seth Hillbrand 7558b49afd Ensure all via layers are printed 2025-03-06 17:57:34 -08:00
Seth Hillbrand ca51b0f37d Ensure imported schematic sheet names are unique
Altium doesn't require sheet names to be unique but KiCad does, so we
disambiguate the names when importing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19281
2025-03-06 16:08:04 -08:00
Seth Hillbrand 81fcc16cc9 Fix multi-unit symbol import in Altium sch
Set the library symbol equal to total unit count so that we can assign
elements to the correct unit in the SCH_SYMBOL
2025-03-06 15:18:51 -08:00
JamesJCode 54540f9e82 Don't dereference null COMPONENT_CLASS in testFootprintSelector
This can happen when running standalone, where component classes
have not been resolved.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20235
2025-03-06 21:43:52 +00:00
Seth Hillbrand c24832f72b Fix IsEffectiveLine calculation
We sometimes represent circles as 360° arcs.  These are approximately
colinear but are definitely not a line
2025-03-06 12:45:10 -08:00
JamesJCode 57952a7a86 Fix Specctra export for multiple netclasses 2025-03-06 20:24:56 +00:00
Seth Hillbrand 8e048d0c42 Printing should never hide small elements
Since it is effectively infinite resolution, pass the vectors to the
printer and let it decide if there should be a dot there or not.  Hiding
based on perspective is a screen optimization

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20226
2025-03-06 12:18:38 -08:00
Wayne Stambaugh a1b78d170d Use case insensitive comparison in symbol footprint filter match DRC.
This keeps the DRC test in line with the ERC test which is also case
insensitive.
2025-03-06 15:12:57 -05:00
Jeff Young 413468cd04 Resolve hotkey conflicts.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18201
2025-03-06 16:53:11 +00:00
Seth Hillbrand 8ee263b341 Ensure that layers are set prior to assigning nets
Zones will have their net code cleared if they are non-copper items, so
we need to ensure that the zone exists on a copper layer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20219
2025-03-06 08:49:25 -08:00
Seth Hillbrand 4b07565d35 Remove debug printing 2025-03-06 08:13:57 -08:00
JamesJCode 68b6c2d1da Add Orientation DRC property QA check 2025-03-06 15:56:39 +00:00
Jeff Young 52648497b2 Formatting. 2025-03-06 15:47:18 +00:00
Jeff Young 5c91a7fa3a Don't treat version-bumped file as modified.
But do allow Save to still work.
2025-03-06 15:37:18 +00:00
Jeff Young 124eccb710 Move arrow direction to more appropriate section.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20208
2025-03-06 14:26:25 +00:00
JamesJCode 671d84562b Enable use of double properties in DRC rules expression parser
Also removes previous special-casing of FOOTPRINT Orientation
property as this is now supported natively

Also fixes name clash with Orientation property for footprints
2025-03-06 14:24:47 +00:00
JamesJCode 3d41eca856 Fix use of footprint Orientation property in DRC expression parser 2025-03-06 13:08:03 +00:00
Marek Roszko c92014f759 Move DXF_PLOTTER to fmtlib 2025-03-06 07:26:47 -05:00
Alex Shvartzkop c6ccb195a1 Update translations 2025-03-06 13:54:17 +03:00
Marco Ciampa f104ded1d5 Translated using Weblate (Italian)
Currently translated at 96.0% (9646 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-06 11:53:12 +01:00
Marco Ciampa c738bc9f37 Translated using Weblate (Italian)
Currently translated at 95.6% (9605 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-06 11:53:12 +01:00
CloverGit 95dd38c3e8 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.3% (9978 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-06 11:53:12 +01:00
Henrik Kauhanen 985a62aad2 Translated using Weblate (Swedish)
Currently translated at 99.9% (10039 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-06 11:53:12 +01:00
Henrik Kauhanen f6aa8a0e3d Translated using Weblate (Finnish)
Currently translated at 97.9% (9830 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-03-06 11:53:12 +01:00
Kliment 02b603af50 Translated using Weblate (Finnish)
Currently translated at 97.9% (9830 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-03-06 11:53:11 +01:00
Henrik Kauhanen 72a832175e Translated using Weblate (German)
Currently translated at 99.3% (9973 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-06 11:53:11 +01:00
Pferd O 378e1765a0 Translated using Weblate (German)
Currently translated at 99.3% (9973 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-06 11:53:11 +01:00
Kliment 8907937e94 Translated using Weblate (German)
Currently translated at 99.3% (9973 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-06 11:53:11 +01:00
Henrik Kauhanen de49ba63c1 Translated using Weblate (Swedish)
Currently translated at 99.9% (10039 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-06 11:53:11 +01:00
Kliment fdfc28c034 Translated using Weblate (Finnish)
Currently translated at 97.5% (9790 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/fi/
2025-03-06 11:53:11 +01:00
Kliment 80753f2f6e Translated using Weblate (German)
Currently translated at 99.3% (9970 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-06 11:53:11 +01:00
Wellington Terumi Uemura 727bae947a Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (10040 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-03-06 11:53:11 +01:00
CloverGit cff5888751 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.3% (9978 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-06 11:53:11 +01:00
Henrik Kauhanen 22f4b6bad5 Translated using Weblate (Swedish)
Currently translated at 99.9% (10039 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-06 11:53:11 +01:00
co8 j c22ed9aa39 Translated using Weblate (Japanese)
Currently translated at 98.8% (9927 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-06 11:53:11 +01:00
Pferd O f80c52f0af Translated using Weblate (German)
Currently translated at 99.2% (9964 of 10040 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-06 11:53:11 +01:00
Jeff Young ee4a6127c6 Allow a no-connect to connect to a single pin (but not multiple pins).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20222
2025-03-06 10:27:11 +00:00
Jeff Young 38cf86cb09 Don't flag double no-connect annotations.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20222
2025-03-06 10:27:07 +00:00
jean-pierre charras e54c73b516 SCH_IO_MGR::GuessPluginTypeFromLibPath(): fix issue for new .kicad_sym files
GuessPluginTypeFromLibPath() was previously testing the type, but also the
existence of the lib file of *.kicad_sym filename, but when creating a new lib,
its existence obviously must not be tested
2025-03-06 09:52:26 +01:00
jean-pierre charras af3aba3c46 Revert "SCH_IO_MGR::GuessPluginTypeFromLibPath(): fix incorrect behavior"
This reverts commit 3051a40376.
It was incorrect for non Kicad lib files.
2025-03-06 08:18:57 +01:00
Marek Roszko 086b9907c2 Convert fputs to fmt::print to get exceptions on io fail 2025-03-05 21:28:56 -05:00
Marek Roszko 237953fd55 Move SVG_PLOTTER to {fmt} to punt locale issues 2025-03-05 19:03:25 -05:00
Seth Hillbrand ff6eb9c091 Apparently, despite documentation, this was missing
Only APPDIR is set.  We also set some APPRUN_* variables that we could
use if this ends up being too similar to other elements
2025-03-05 15:35:31 -08:00
Jon Evans 984041f57e Fix accidental removal of properties pane 2025-03-05 17:44:47 -05:00
Seth Hillbrand 4a3b33df4e Map a full hierarchy during PDF plotting
Re-create the schematic hierarchy in PDF plots to ease navigation
relative to the on screen schematic

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12154
2025-03-05 13:28:01 -08:00
JamesJCode f0e287a87b Check for constituent netclasses in DRC netclass equality checks
This reverts previous behaviour whereby 'A.Netclass == x' compared
the full name of an effective netclass (e.g. 'Class1,Default'). This
was found to be unexpected behaviour to users, who were expecting
the equality to compare single netclasses. The equality check now
first checks for a constituent class with the given name, and then
falls back to a check of the full class name.

Inequality requires the netclass name being tested to not be a
constituent netclass and to not be the full class name.
2025-03-05 20:30:54 +00:00
Seth Hillbrand c108b20616 Cleanup unused code 2025-03-05 11:33:38 -08:00
JamesJCode a091b6c1c9 Fix incorrect inequality in component class expression evaluation 2025-03-05 19:10:48 +00:00
JamesJCode c7cec5f21a Fix broken placement of SCH_DIRECTIVE_LABELs 2025-03-05 19:10:48 +00:00
Seth Hillbrand 8e10c539f5 Remove dependency on Visual lib for OCC 2025-03-05 11:03:07 -08:00
Jeff Young 9856cb2210 An arbitrary layer flip can not be done without the board.
(User-defined layers can be sided or not.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20169
2025-03-05 17:59:22 +00:00
Jeff Young 305bb6302b User layer bug fixes.
1) Don't set user layer count right after we've
cleared the enabled user layers.  (It will
always be 0 by then.)

2) Allow un-enabled layers in some layer
selectors.  (Currently this is just the private
layers selector.

3) Reset the appearance panel layers each time a
footprint is loaded.  Also, auto-enable any user
layers that the footprint already has.

4) Footprint editor layer visibility is stored in
the view, not in the boars (as is usual).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20022
2025-03-05 17:59:22 +00:00
jean-pierre charras 3051a40376 SCH_IO_MGR::GuessPluginTypeFromLibPath(): fix incorrect behavior
GuessPluginTypeFromLibPath() was previously testing the tye, but also the
existence of the lib file, but we only need to know the plugin type of
the given file, regardless it exists or not.
2025-03-05 18:24:37 +01:00
jean-pierre charras b0c42362b6 French translation update 2025-03-05 18:20:42 +01:00
Jon Evans 50507212fd Fix pad edit fighting with active group
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20129
2025-03-05 00:04:47 -05:00
Marek Roszko 4f4ece61bb Move the fp svg cli to more similar plot code 2025-03-04 23:01:00 -05:00
Seth Hillbrand fdcfa8f354 Add additional OCCT search path 2025-03-04 20:00:40 -08:00
Jon Evans a6ef2d97fb Improve 259e249a for macOS 2025-03-04 22:56:24 -05:00
Jon Evans 259e249aed Improve default sizes of right panels
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19965
2025-03-04 21:54:31 -05:00
Jon Evans 32b5cf6221 Fix broken build 2025-03-04 21:32:42 -05:00
Jon Evans d0b22d21bb Switch to operator= for item updates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20206
2025-03-04 21:12:21 -05:00
Seth Hillbrand 49a4699d5a ADDED: Local power symbol option
Local power symbols work like regular power symbols except that they are
scoped only the the sheet in which they are instantiated

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2075
2025-03-04 17:07:46 -08:00
Jeff Young 699fd2b3ac Implement severity checking for CLI_REPORTER. 2025-03-05 00:12:08 +00:00
Jeff Young 9be7464681 Keep user-defined common layers order.
(And use it when plotting.)

(And don't shadow it with a second variable.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20214
2025-03-04 23:39:19 +00:00
Marek Roszko 4248fba976 Add back custom add_choices function to argparse 2025-03-04 18:31:53 -05:00
Marek Roszko 9eb2b13833 Update argparse to latest 2025-03-04 18:31:53 -05:00
Mark Roszko 7a7dfdc043 Edit CODEOWNERS 2025-03-04 23:23:45 +00:00
Tomasz Wlostowski 6a0efe6883 IO_BASE: don't try to modify the case of a temporary string in-place, work on a copy 2025-03-05 00:23:04 +01:00
Wayne Stambaugh 251a6ea8cb Update GitLab CODEOWNERS information. 2025-03-04 14:54:09 -05:00
Jeff Young d9c952d90c Don't add CONSTRUCTION_GEOM to the selection.
We'll crash later after it gets freed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20211
2025-03-04 14:12:54 +00:00
Jeff Young b0e2e9e35e Report errors from jobset plotting.
Also fixes an out-of-scope smart-pointer access.
2025-03-04 13:27:31 +00:00
Jeff Young ea9cece5fe Button margins.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20207
2025-03-04 13:26:46 +00:00
Wayne Stambaugh 001d3dfd88 Test full LIB_ID in symbol footprint filter match DRC.
Apparently newer symbol libraries are using the library nickname in the
footprint filter string.  The symbol footprint filter match DRC was only
checking the footprint name against the new filter which would always
fail.  A test against the full LIB_ID string is now performed when the
filter string contains the library separator character ':'.  The ERC test
already performed this check.
2025-03-04 07:59:45 -05:00
Damjan b419058df3 pcbnew: Plotting tables with non-90 degree rotation angles is not working 2025-03-04 12:08:18 +00:00
Jeff Young c61b6b8bdd Initialize props of fields created by BOM table.
We use the same algorithm as the Symbol Properties
dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20212
2025-03-04 11:57:24 +00:00
Jeff Young f00947266f Don't render thickness walls of text we're not going to draw.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20200
2025-03-04 11:29:05 +00:00
Marek Roszko b6743653f3 Restore the page size mode behavior
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20014
2025-03-03 23:15:32 -05:00
Alex Shvartzkop 28ce3c2e7d Update translations 2025-03-04 06:36:23 +03:00
Pferd O 56997e75e9 Translated using Weblate (German)
Currently translated at 99.7% (9970 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-04 04:35:51 +01:00
Arnau Llovet Vidal 8e5d2e18e7 Translated using Weblate (Catalan)
Currently translated at 41.0% (4106 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ca/
2025-03-04 04:35:51 +01:00
Henrik Kauhanen 0f92164f29 Translated using Weblate (Swedish)
Currently translated at 99.9% (9990 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-04 04:35:51 +01:00
Pferd O 48e5de1a50 Translated using Weblate (German)
Currently translated at 99.6% (9956 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-04 04:35:51 +01:00
Henrik Kauhanen 9f4b242713 Translated using Weblate (Swedish)
Currently translated at 99.7% (9971 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-04 04:35:51 +01:00
Henrik Kauhanen 16b8649969 Translated using Weblate (Swedish)
Currently translated at 99.3% (9929 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-04 04:35:51 +01:00
dsa-t 60889bebd4 Translated using Weblate (Russian)
Currently translated at 99.1% (9907 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-04 04:35:51 +01:00
Pferd O 51ee5c97ff Translated using Weblate (German)
Currently translated at 99.5% (9946 of 9991 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-04 04:35:51 +01:00
Seth Hillbrand aff0ad971f Update search dialog
Allow regular expression in search and replace
Allow searching netnames including nets contained in buses

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17102
2025-03-03 16:57:49 -08:00
Seth Hillbrand 1e9cf4e3d7 Add ability to quickly move through nets
After highlighting a net (`), press Tab to quikcly move to the next item
on the net and Shift-Tab to move to the previous

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10911
2025-03-03 14:02:43 -08:00
Jeff Young 7cfa826c9a Put non-sided layers on front, not back of board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20201
2025-03-03 21:38:14 +00:00
Jeff Young 3960480819 Fix SCH plot to PDF for jobsets.
(Fix for CLI bug #19522 broke it for jobsets.)
2025-03-03 21:38:14 +00:00
Jeff Young 92b4b7187e Fix job run-log sizing issues.
wxLIST_AUTOSIZE_USEHEADER doesn't work on
some
platforms, and using OnSize was having seizures
on Mac.
2025-03-03 21:38:14 +00:00
Jeff Young 1808fcec78 Fix job run log sizing issues.
wxLIST_AUTOSIZE_USEHEADER doesn't work on
several platforms, and dynamic sizing of the
list columns falls apart on Mac.
2025-03-03 21:38:14 +00:00
JamesJCode d9ab3a6228 Fix unused variable compiler warning 2025-03-03 20:51:03 +00:00
Seth Hillbrand 2afa67f946 Allow AppImages to pick out different location
Don't assume that libraries are located in the CMAKE lib install
directory as AppImage will relocate them based on the mount point
2025-03-03 12:34:31 -08:00
jean-pierre charras a32c0a8687 Fix compil issue on mingw (missing change from OUTPUT to DESTINATION) 2025-03-03 20:02:28 +01:00
Jeff Young d8cdb69831 Jobset Output -> Destination. 2025-03-03 18:34:33 +00:00
Seth Hillbrand 6f6ca2a35f Allow multi label input
This is a re-implementation of 39c2745f55
that was removed by e5089d783d

This implementation works in the tool, containing side effects
(hopefully) better than the initial implementation.  The multiple labels
are input as multiple lines instead of labels with spaces, allowing for
copy/paste between spreadsheets of labels

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10950
2025-03-03 09:03:02 -08:00
Jeff Young afa4ebcc84 Handle exporting symbols into libraries already under LIB_MGR.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17840
2025-03-03 14:00:57 +00:00
Jeff Young 6b146874c1 Restore "Export Symbol".
The workflow turns out to be slightly different
than a Save As to a new library.

(We don't assume it goes in a library table; we
flatten the symbol; and we pre-load the library
name.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20070
2025-03-03 12:37:36 +00:00
Jeff Young 1c48e97cd7 Formatting. 2025-03-03 12:31:33 +00:00
Jeff Young d0e86cad7c Disable multi-via dragging.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20150
2025-03-03 11:01:33 +00:00
Jeff Young 46378dc760 Dirty hatching from SwapShape().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20180
2025-03-03 10:35:05 +00:00
Jeff Young bb074f73aa Fix alignment issues in Track & Via properties. 2025-03-03 10:35:05 +00:00
Kreijstal c2685ef76f Fix compilation on mingw 2025-03-03 01:56:30 +00:00
Daniel Treffenstädt 27edf0b949 ADDED: Per layer properties of zones used for control over zone hatching position 2025-03-02 20:31:04 +00:00
Jeff Young b0eef3ee28 Persist some missing jobset arguments.
Also adds some missing CLI arguments.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20116
2025-03-02 19:27:15 +00:00
Jeff Young 3fc87a841d Yet another static line issue. 2025-03-02 18:43:12 +00:00
Jeff Young 559a966ef7 Yet another static line issue. 2025-03-02 18:43:09 +00:00
Jeff Young 164eff1a3b Handle circular holes with y==0.
(Because legacy code assumed this.)
2025-03-02 17:51:44 +00:00
Jeff Young 7d9dd50b08 Remove extra divider from Pad Properties. 2025-03-02 17:28:44 +00:00
Jeff Young dc12fdfc33 Remove extra divider from Pad Properties. 2025-03-02 17:25:44 +00:00
Jeff Young f5d2b40c9e Compiler warnings. 2025-03-02 17:12:05 +00:00
Jeff Young 163a26111a Introduce lambda to improve readability. 2025-03-02 16:05:35 +00:00
Jeff Young b1a4b77291 Solid fill mode is FILL_T::FILLED_WITH_COLOR for SCH_SHAPE.
(It can also be FILL_T::FILLED_WITH_BACKGROUND_COLOR
for symbol items, but those have their own getters/
setters.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20168
2025-03-02 16:05:35 +00:00
Jeff Young 833bcba06c Simplify background colour handling. 2025-03-02 16:05:35 +00:00
jean-pierre charras 925f2f9bc1 class TOOLBAR_ITEM_TYPE: replace GROUP by TB_GROUP (collision with a Windows header) 2025-03-02 14:49:03 +01:00
jean-pierre charras b0fe4df3c5 More fixes about use of IN versus INCH 2025-03-02 13:59:25 +01:00
jean-pierre charras 2890500f4c PANEL_TOOLBAR_CUSTOMIZATION: fix sizer issues. 2025-03-02 12:53:59 +01:00
jean-pierre charras 0acdabd1eb Fix other places where "IN" is used instead of INCH (mainly QA tests) 2025-03-02 12:52:16 +01:00
Jeff Young 1a10b5fb64 Don't generate -1 width non-filled splines.
They serve no purpose, and will get replaced with
default-line-width non-filled splines.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20138
2025-03-02 11:34:21 +00:00
Jeff Young 8d096590dc Windows compiler doesn't like the trailing ','? 2025-03-02 11:34:21 +00:00
jean-pierre charras 5694c90ae9 Fix a compil issue on msys2 / gcc 14.2.0 2025-03-02 11:36:38 +01:00
jean-pierre charras eaa1e6d594 Fix a collision with a Windows define and our use of the same var name.
We use IN for INCH as units, but IN is defined in a Windows header
2025-03-02 11:34:30 +01:00
Jeff Young 307798ac92 Deprecate (instead of remove) --plot-invisible-text
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20171
2025-03-01 21:58:31 +00:00
Jeff Young f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Jeff Young 481e467968 Formatting; code brevity. 2025-03-01 21:58:31 +00:00
Jeff Young ef75f63f10 Consistent spacing. 2025-03-01 21:58:31 +00:00
Jon Evans 547a063981 Make sure to fully repaint pads when loading a board
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19896
2025-03-01 16:54:27 -05:00
Jeff Young 8b541f03e9 Edit CODEOWNERS 2025-03-01 21:53:29 +00:00
Seth Hillbrand b21814b973 Global labels are labels too
And without knowing that they are labels, we might accidentally think
that they are text items, crashing KiCad.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20174
2025-03-01 13:34:32 -08:00
JamesJCode 93549a649b Fix unused variable compiler warnings 2025-03-01 18:32:18 +00:00
Daniel Treffenstädt 3768221d9c ADDED: Support for IPC-4761 Via protection features
Fixes https://gitlab.com/kicad/code/kicad/-/work_items/18837
2025-03-01 18:02:54 +00:00
jean-pierre charras 5bdeb40d66 French translation update 2025-03-01 17:45:33 +01:00
Jon Evans 10cb0592ee Fix SCH_SHEET field layer settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20128
2025-03-01 11:19:47 -05:00
jean-pierre charras 00dca4edb3 Pcbnew, hatched fill shapes: fix 2 issues:
- Ensure the hatched fill polygon is fractured in all cases
- ensure the filled polygon only, not the outline, is drawn
2025-03-01 16:59:09 +01:00
Jon Evans 49a5b44220 Fix usage of CmpNoCase in SymbolNameInUse
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20165
2025-03-01 10:56:13 -05:00
Jon Evans e44eed6e6b Remove unused CN_ITEM m_visited
Visited flag should not be stored in the item itself
since these items are used in parallelized code and
the visited state should remain local to the thread
2025-03-01 10:43:04 -05:00
Jon Evans 51f56ab31c Fix inadvertent logic bug in SearchClusters
The safety changes in 3d526edc introduced a subtle
bug where aExcludeZones was not actually excluding
zones anymore because its behavior depended on the
item visited flag being set to true by a previous
call to the function.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20090
2025-03-01 10:39:35 -05:00
Alex Shvartzkop 8762f7e5e6 Update translations 2025-03-01 18:34:32 +03:00
Henrik Kauhanen c5c368af6c Translated using Weblate (Swedish)
Currently translated at 99.9% (9947 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-03-01 16:32:43 +01:00
co8 j a3b5c209d8 Translated using Weblate (Japanese)
Currently translated at 99.8% (9940 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-03-01 16:32:43 +01:00
ZbeeGin e8aad579ec Translated using Weblate (Polish)
Currently translated at 100.0% (9951 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-03-01 16:32:43 +01:00
Pferd O 72a2ae5fa1 Translated using Weblate (German)
Currently translated at 100.0% (9951 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-01 16:32:43 +01:00
Wellington Terumi Uemura 2f7a4518b6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9951 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-03-01 16:32:43 +01:00
Marco Ciampa 6d7f958026 Translated using Weblate (Italian)
Currently translated at 96.2% (9578 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-03-01 16:32:43 +01:00
CloverGit 344d501d82 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.8% (9939 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-03-01 16:32:43 +01:00
dsa-t 8050cb614d Translated using Weblate (Russian)
Currently translated at 99.7% (9922 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-03-01 16:32:43 +01:00
Pferd O 3d43e026af Translated using Weblate (German)
Currently translated at 99.8% (9937 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-03-01 16:32:43 +01:00
109247019824 92eb945a46 Translated using Weblate (Bulgarian)
Currently translated at 8.2% (823 of 9951 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/bg/
2025-03-01 16:32:43 +01:00
Jon Evans 99cdb6238c Mark the entire file as optional 2025-03-01 09:48:10 -05:00
Jon Evans 47b955b187 Add CODEOWNERS file for suggesting MR reviewers 2025-03-01 09:44:51 -05:00
Fabien Corona 81428e14a6 iec60664-1 : preferred values 2025-03-01 08:27:42 +01:00
Jeff Young c0e4c6a865 Persist generate-gerber-job-file setting.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20158
2025-02-28 22:10:24 +00:00
Dhineshkumar S 6e66b22a13 Fix cell selecting instead of table dragging in schematic editor
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17380
2025-02-28 19:14:56 +00:00
Jeff Young 7f935e290a Fracture hatched fill polygon.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20125
2025-02-28 18:52:56 +00:00
Jeff Young 2aa0c15b41 FOOTPRINT::GetBoundingHull(): don't crash on non-copper layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20124
2025-02-28 18:49:41 +00:00
Jeff Young 26871b56f0 Provide easier on-ramp for jobsets.
1) Perform initial save of new jobset.
2) Add default output folder to new jobset.
2025-02-28 18:49:26 +00:00
Seth Hillbrand 18ac99d838 Prevent fetch without repo
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20152
2025-02-28 08:34:24 -08:00
jean-pierre charras 75bed91789 BRDITEMS_PLOTTER::PlotFootprintTextItems(): fix a typo about Value layer.
The typo was using the reference layer to plot the value field

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20144
2025-02-28 09:42:07 +01:00
Ian McInerney e202b00a74 Rework the toolbar settings storage and panel
This format is more extendable in the future, should separator and
spacer support be added to groups.

Also, this now has a working UI for modifying the toolbars.
2025-02-28 02:05:50 +00:00
Ian McInerney 18e5a16040 Improve the toolbar customization UI 2025-02-28 01:57:37 +00:00
Ian McInerney 85810510f4 Tweak toolbar settings a bit
* Manage the settings using the settings manager for better lifetimes
* Better architect the internals and JSON to make it easier to identify
  the various tool types
2025-02-28 01:57:37 +00:00
Ian McInerney ab114c4159 Put preferences panes for toolbars, but hide behind an advanced config
There is still more work to do to make this feature actually
user-friendly and make it so people can't break their UI config too
easily.
2025-02-28 01:57:37 +00:00
Ian McInerney e53c155b8c Initial dialog work 2025-02-28 01:57:37 +00:00
Ian McInerney 548334b4e2 Load toolbar configuration from settings 2025-02-28 01:57:37 +00:00
Ian McInerney caa03ab59e Add setting for custom toolbar and read custom toolbar config 2025-02-28 01:57:37 +00:00
Ian McInerney 7e2a81da15 Initial JSON work 2025-02-28 01:57:37 +00:00
Ian McInerney 29c62e9d9a Move project manager actions to the tool framework 2025-02-28 01:57:37 +00:00
Ian McInerney ea2f8a63c1 Actionize more PCB actions 2025-02-28 01:57:37 +00:00
Ian McInerney 784246575b Move footprint viewer/cvpcb actions to tool framework 2025-02-28 01:57:37 +00:00
Ian McInerney 04ab369a49 Make the PCB layerbox not needed in pcbcommon 2025-02-28 01:57:37 +00:00
Ian McInerney 9e9db8bd4d Make tool framework assert more useful 2025-02-28 01:57:37 +00:00
Ian McInerney c18bc2472b Actionize more 3D viewer actions 2025-02-28 01:57:37 +00:00
Ian McInerney 384ca6bf98 Actionize more toolbar items 2025-02-28 01:57:37 +00:00
Ian McInerney fc6f3f2332 Formatting tweak 2025-02-28 01:57:37 +00:00
Ian McInerney f0a76f62b6 Cleanup PCB/fpeditor layer box handling 2025-02-28 01:57:37 +00:00
Ian McInerney 7ad1103f55 Move toolbars to a serializable storage format 2025-02-28 01:57:37 +00:00
Ian McInerney df15db3236 Initial toolbar reconfigurability settings 2025-02-28 01:57:37 +00:00
Ian McInerney c24dbc17bf Move toolbar setup flags into the action definition
This makes them centrally defined, and removes the need to specify them
when creating the toolbar.
2025-02-28 01:57:37 +00:00
Jan Wichmann 7eb07c00a2 Fix MSVC build error for VC 17.13+ 2025-02-27 23:41:08 +00:00
Jon Evans 268094320b Remove accidental commented-out block 2025-02-27 18:17:34 -05:00
Jon Evans 1205464472 More safety against corrupted visibility settings 2025-02-27 18:16:51 -05:00
Dhineshkumar S 46db959074 Add autocomplete for label names in label properties dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13508
2025-02-27 22:56:02 +00:00
Tomasz Wlostowski b4d29a98f9 router: refine the endpoint moving logic so that it doesn't block shoving 2025-02-27 23:51:12 +01:00
Ethan Chien 007db5f957 Improve string clarity in Zone Manager and DIALOG_COPPER_ZONE for "Minimum island size"
- Renamed "Minimum island size" to "Area limit" in Zone Manager and DIALOG_COPPER_ZONE to align with terminology used in the dropdown.
- The change aims to make the connection between the dropdown choice and the field more intuitive, reducing ambiguity for users.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17255
2025-02-27 22:45:58 +00:00
aris-kimi e80780d3ad Added more simulation cursors at will.
Added m_signalsGrid context menu entries, Create a new cursor from every cell but Delete only from Cursor 3 and above

New entries are saved into their *.wbk files. Loading of current files should not be affected, as tested,
and on save they get the new property added.

Updates *.wbk file version to "7".

If the tab has more cursors than the loaded file, extra cursors should not be affected, otherwise new cursors shown up.
CursorD left hopefully untouched and kept the legacy behavior close to Cursors 1 & 2.

No more known bugs. It is now working as expected as tested on win11 and Debian 12.

m_cursorsGrid events also work.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15211
2025-02-27 22:42:11 +00:00
Daniel Treffenstädt 5e467a969d Added check for custom thermal spoke count
When using custom thermal spoke templates, the user can create templates with fewer, or more, thermal spokes than 4.
2025-02-27 22:40:40 +00:00
Seth Hillbrand e81956f292 Import Altium Projects
Handle Altium project file format

Parse individual schematic files and layout files
Create top-level schematic file
Link imported UUIDs between schematic symbol and footprints based on
refdes
Create KiCad project
Map Altium layout layers between KiCad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2117
2025-02-27 14:36:24 -08:00
Jeff Young 320a298394 Clarifying comments. 2025-02-27 17:53:06 +00:00
jean-pierre charras a414cb0a17 EDA_SHAPE: fix crash when trying to create a hatch pattern inside a circle. 2025-02-27 18:03:24 +01:00
Damjan 230a976742 pcbnew: Drag-selecting while creating a Text breaks PCB editor tools
CHANGED: drawing_tool.cpp: DRAWING_TOOL::PlaceText method ignores events when mouse drag is detected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20010
2025-02-27 16:47:21 +00:00
Jeff Young 144e660684 Treat changes in solder mask like a width change.
Also in theory keeps from losing tenting properties
on vias that are shoved, though I can't get via
shoving to work at all right now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20085
2025-02-27 15:24:30 +00:00
Jeff Young 8e461941c0 Formatting. 2025-02-27 15:24:30 +00:00
Wayne Stambaugh a9cea9fbb7 Show the correct footprint name on footprint filter mismatch ERC warning.
The lower case variant used for internal comparison was being used which
is confusing because it doesn't match the footprint name capitalization.
2025-02-27 09:48:13 -05:00
jean-pierre charras ba85c54f81 Eeschema: fix incorrect plot of SCH_TABLE items. 2025-02-27 13:59:24 +01:00
Seth Hillbrand 9211136953 Fix windows build 2025-02-26 18:15:17 -08:00
Seth Hillbrand 5027a562e4 Adjust git timing parameters
Move most of the update firing to the file system watcher (except for
windows network shares that still need timed updated).  Gate the repo
status for sync

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20133
2025-02-26 15:56:38 -08:00
Jon Evans 52e86303c0 Fix export SVG mode logic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20089
2025-02-26 17:31:18 -05:00
Dhineshkumar S 20c72504c3 Eeschema: Import and auto place all sheet pins
https://gitlab.com/kicad/code/kicad/-/issues/6736
2025-02-26 21:24:02 +00:00
Jeff Young 797de67c6c Apply EEschema fixes to PCBNew and Footprint Editor.
(Symbol Editor doesn't have the issue of the properties
being overwritten.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20066
2025-02-26 20:06:30 +00:00
Jeff Young f510cce2da Apply List Hotkeys fix to Edit Hotkeys.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19989
2025-02-26 19:17:53 +00:00
Jeff Young 53e784caef Better alignment betweeen controls in Pad Properties. 2025-02-26 19:17:53 +00:00
Jeff Young 500962b3a4 There is no support (as yet) for layer-specific soldermask expansions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20053
2025-02-26 19:17:53 +00:00
Jeff Young 23528425ef Formatting. 2025-02-26 19:17:53 +00:00
Wayne Stambaugh f538908f62 Fix git clone project dialog layout issues.
Use enable/disable instead of show/hide to prevent large areas of blank
space in the dialog.

Set the minimum dialog size after the initial launch to prevent controls
from being cut off when resizing dialog to less than the initial size.

Fix static and dialog title bar string capitalization.

Add colons (:) to the end of description static text controls as is done
elsewhere in KiCad.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20045
2025-02-26 14:04:50 -05:00
jean-pierre charras 7c067e25d9 PCB_DIM_XXX::updateGeometry(): protect against re-entrance.
After calling updateText(), updateGeometry() was sometimes re-run before the
current updateGeometry() was finished, thus creating a incorrect geometry
(duplicate items)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20076
2025-02-26 20:01:29 +01:00
Alex Shvartzkop 7faee6acc2 Update translations 2025-02-26 20:12:47 +03:00
An Nguyen ef9fc7841a Translated using Weblate (Vietnamese)
Currently translated at 24.0% (2387 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/vi/
2025-02-26 18:12:30 +01:00
CloverGit 50d976be35 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (9936 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/zh_Hans/
2025-02-26 18:12:30 +01:00
Marco Ciampa f13f8f788f Translated using Weblate (Italian)
Currently translated at 95.8% (9524 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-02-26 18:12:30 +01:00
Marco Ciampa caf99cc3b4 Translated using Weblate (Italian)
Currently translated at 95.5% (9490 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/it/
2025-02-26 18:12:30 +01:00
Wellington Terumi Uemura c2bcb36369 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (9936 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pt_BR/
2025-02-26 18:12:30 +01:00
ZbeeGin f2205e0c83 Translated using Weblate (Polish)
Currently translated at 100.0% (9936 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/pl/
2025-02-26 18:12:30 +01:00
Henrik Kauhanen 638d6bbf2a Translated using Weblate (Swedish)
Currently translated at 99.9% (9935 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/sv/
2025-02-26 18:12:30 +01:00
dsa-t 0ae37c0f60 Translated using Weblate (Russian)
Currently translated at 100.0% (9936 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ru/
2025-02-26 18:12:30 +01:00
co8 j b7401a5087 Translated using Weblate (Japanese)
Currently translated at 99.9% (9934 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/ja/
2025-02-26 18:12:29 +01:00
Pferd O e029537739 Translated using Weblate (German)
Currently translated at 100.0% (9936 of 9936 strings)

Translation: KiCad EDA/master source
Translate-URL: https://hosted.weblate.org/projects/kicad/master-source/de/
2025-02-26 18:12:29 +01:00
Jeff Young b85c5eb8cc Fix wxWidgets assertion.
(I also increased the spacing between the left
and right columns at the top.)
2025-02-26 13:06:51 +00:00
Jeff Young fde4aac075 Don't exit DRC when one test passes.
Also adds handling for table cells.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20049
2025-02-26 12:50:57 +00:00
Jeff Young 956875e2f4 DRC_LAST is the last index, not the size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20049
2025-02-26 12:50:49 +00:00
Jeff Young 6ccacd232e Formatting. 2025-02-26 12:16:51 +00:00
Jeff Young 20f40c1030 Replace GetConnectedItems() type list with an EXCLUDE_ZONES flag.
The type list kept atrophying when various new
items were added (arcs, shapes).

And god knows what the purpose of putting PCB_FOOTPRINT_T
in some of them was.  As far as I can tell a CN_ITEMs
parent can never be a footprint.

(Also moves IGNORE_NETS to a flag so that we don't
end up with two booleans and the potential to have
them out-of-order.)
2025-02-26 11:02:10 +00:00
Jeff Young 888cbf8e7a Don't use connectivity system for Track & Via Properties dialog.
It will propagate through zones, and since we haven't
yet done a refill it will pick up a bunch of false
stuff any time the track was widened more than the
clearance.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20084
2025-02-26 11:02:10 +00:00
Jeff Young 931b1b0231 Cleanup. 2025-02-26 11:02:10 +00:00
Eric 92cdca69b3 ODB++:Fix date format in misc/info file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20103
2025-02-26 15:30:36 +08:00
Jon Evans de160e4af6 Add missing change from previous commit
See b6aac93
2025-02-25 23:42:00 -05:00
Marek Roszko 9d5e143d08 ADDEDL: gencad job support to jobsets 2025-02-25 22:44:24 -05:00
Seth Hillbrand aa1baec062 Fix git flicker on Windows 2025-02-25 19:38:01 -08:00
Jon Evans b6aac9369e Fix creation of Altium compound files from IntLibs
A previous change introduced an invalid cast from
base to derived class.  To clean this up, changed
DecodeIntLibStream to have an out param and allow
two-step initialization of ALTIUM_COMPOUND_FILE

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20099
2025-02-25 22:34:26 -05:00
Jon Evans 41f5750be7 Fix logic in via high contrast LOD calculation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20093
2025-02-25 20:59:26 -05:00
Jon Evans 5cec2fac9d API: Add board origin setter/getter
See https://gitlab.com/kicad/code/kicad-python/-/issues/20
2025-02-25 20:13:16 -05:00
Seth Hillbrand 72411af9de Update fp properties even when can't update fp
When updating the footprint, we may encounter a missing footprint.  We
should still modify the netlist against the existing footprint (if one
does exist) to match the netlist.  This matches the behavior of updating
the netlist when fp are not selected for update

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18249
2025-02-25 17:03:52 -08:00
Seth Hillbrand 0877467384 Don't worry about generated spice files 2025-02-25 16:56:15 -08:00
Marek Roszko 59b297dcdc Fix missing change 2025-02-25 19:29:22 -05:00
Seth Hillbrand 2c54ab277b Thread git checks
Push the git checks from the main thread into child threads to prevent
resource contention in some cases where Windows machines might have many
files in git that are _also_ being managed by Google Drive

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20078
2025-02-25 16:07:19 -08:00
Marek Roszko 42e448dbf6 Elems clear should be private 2025-02-25 18:03:26 -05:00
dsa-t 71fdc9b199 Simplify layer list update in PANEL_SETUP_LAYERS.
(cherry picked from commit bdd4a88127)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-02-25 20:44:07 +00:00
dsa-t d2edf6796c Fix scrollbars not appearing in Appearance layers panel after board import.
(cherry picked from commit f60313367c)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-02-25 20:40:27 +00:00
dsa-t 62b208e0a5 Fix scrollbars not appearing initially in PANEL_SETUP_LAYERS.
(cherry picked from commit a4e2d54221)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-02-25 20:23:27 +00:00
dsa-t b6a0a7cd14 Auto-size PANEL_SETUP_LAYERS_BASE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20106


(cherry picked from commit 8ef8ca4d39)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2025-02-25 20:23:17 +00:00
Marek Roszko bc5fca1daa Make schematic and project inherit from PROJECT::ELEM
Just to see if anything weird happens first.
2025-02-24 22:22:56 -05:00
Marek Roszko dbab601c0a Bump cmake minimum
This is so we can use the ENVIRONMENT_MODIFICATION feature across all platforms and simplify some QA cmake. Right now MSVC is special cased to use it since the other PATH variable editing doesn't work due to semicolon/colon issues in cmake parsing.
2025-02-24 19:48:58 -05:00
Jon Evans c4c1842bc4 API: Add new user layers
See https://gitlab.com/kicad/code/kicad-python/-/issues/23
2025-02-24 19:27:13 -05:00
Jon Evans f928b6b7e0 Fix typo that broke simulation field extraction 2025-02-24 19:12:44 -05:00
Jeff Young 8f40feedbb m_ordinal has no meaning for mandatory fields.
... but it should still be initialised.
2025-02-24 23:42:56 +00:00
Seth Hillbrand 141d50f0c1 Initialize m_orginal 2025-02-24 15:11:08 -08:00
Jeff Young 7db3ccd98a Better algorithm for knocking out footprints.
(Though anything would have been as the previous
one didn't work at all.)
2025-02-24 23:01:07 +00:00
Tomasz Wlostowski 78fc95fd6d router: fix regression in post-shove optimization
Note to self: we keep track of the formerly pushed vias in the line stack, but pruning one from the optimizer queue should not prune the lines attached to it.
2025-02-24 23:45:19 +01:00
Tomasz Wlostowski 9e4947ed36 router: prevent assertion fail in MULTI_DRAGGER
Fixes https://gitlab.com/kicad/code/kicad/issues/20075
2025-02-24 23:42:20 +01:00
Tomasz Wlostowski 29a4ec0fde router: prevent disconencting via fanout traces when shoving
Note to self: move-endpoints fallback mode must check for vias connected at the obstacle LINE's ends - fallback is only applicable for unconnected ends.
2025-02-24 23:42:20 +01:00
Tomasz Wlostowski bfbdfcf872 router: improved shove litter fix
Note to self: managing the shove stack is quite challenging and there were a few corner cases
where reverse via/segment collisions would cause a head segment (or a via) to have multiple clones in the stack.
As SHOVE::removeHeads() took only complete head lines, sometimes it resulted with stray vias/segments.

Fixes https://gitlab.com/kicad/code/kicad/issues/19045
2025-02-24 23:42:20 +01:00
Jon Evans 6be2468e05 Fix uninitialized member in non-user fields 2025-02-24 17:39:38 -05:00
Seth Hillbrand 3b24b5b74b Fix SWIG QA 2025-02-24 14:13:36 -08:00
Seth Hillbrand ea520da1c8 Protect search from mis-attributed LIB/SCH instance
The parent of fields might be a LIB_SYMBOL, not SCH_SYMBOL.  We need to
watch for and avoid these in the search/replace for schematics

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20079
2025-02-24 10:13:38 -08:00
Jeff Young 907f21e739 Hatching knockout fixes. 2025-02-24 17:35:43 +00:00
Jeff Young 0de8d75dec Fixup parent after blasting it. 2025-02-24 17:35:43 +00:00
Jeff Young f5cee2ee0a Formatting. 2025-02-24 17:35:43 +00:00
Jeff Young 86e9f47875 Minor cleanup to table dialogs, take 2. 2025-02-24 17:35:43 +00:00
jean-pierre charras ddcf3f9855 Fix compil warning and issue. 2025-02-24 14:35:10 +01:00
Jeff Young 8fd175dd22 Minor cleanup to table dialogs. 2025-02-24 11:53:50 +00:00
Jeff Young 29b8066473 Minor dialog cleanup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20047
2025-02-24 11:08:29 +00:00
Jeff Young 562ff37314 Mirror location of textbox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20021
2025-02-24 11:08:29 +00:00
Jeff Young 1691d8d2b2 Fix plot dialog layout. 2025-02-24 11:08:29 +00:00
Jeff Young 3f15b0d75b ADDED: hatched fills for shapes. 2025-02-24 11:08:29 +00:00
Jeff Young 59d6152cf0 Cleanup stale comment. 2025-02-24 11:08:29 +00:00
Jeff Young 34db9ed245 Better namespacing.
Also fixes a bug with calculating eagle annular
ring sizes.
2025-02-24 11:08:29 +00:00
Jeff Young 01a19bf3d0 Filled shapes can still have a border width. 2025-02-24 11:08:29 +00:00
Jeff Young 7b80e93a4b Auto-recognize URLs in SCH_FIELD and PCB_FIELD grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17066

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17745
2025-02-24 11:08:29 +00:00
Jeff Young 675624b926 ADDED: Knockout text boxes. 2025-02-24 11:08:29 +00:00
Jeff Young 7583c0e69d Retire DIALOG_FOOTPRINT_CHOOSER. 2025-02-24 11:08:29 +00:00
Jeff Young c5bb59468d Get rid of assumptions about field order. 2025-02-24 11:08:29 +00:00
Jeff Young 9d901188cb Use specific thickness for mask layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19024
2025-02-24 11:08:29 +00:00
Jeff Young f2da0c791f Retire non-cairo printing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19323
2025-02-24 11:08:29 +00:00
Jeff Young f9c41d70d1 No-connect pins aren't endpoints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18316
2025-02-24 11:08:29 +00:00
Jeff Young e7652685f0 Always report all track keepout violations.
(Regardless of report-all-errors-per-track setting.
There's no clear rule here, but to do otherwise just
feels wrong.  Keepout areas are distinct, it's not
like tracks too close together reporting lots of
clearance errors.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13219
2025-02-24 11:08:29 +00:00
Jeff Young 79eeb1492c Improve grid settings layout. 2025-02-24 11:08:29 +00:00
Jeff Young 3a4aec7267 Account for solder mask thickness from board stackup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19024
2025-02-24 11:08:29 +00:00
Jeff Young 28684cfeba Formatting. 2025-02-24 11:08:29 +00:00
Jeff Young 7eb75720b5 Start to retire "alias" in favour of "symbol" and "derived symbol".
Note: terminology changes only.  No (intentional)
functional changes.
2025-02-24 11:08:29 +00:00
Jeff Young aaca66351e Case-insensitive collision detection for symbol names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19370
2025-02-24 11:08:29 +00:00
Jeff Young 85c4319185 Formatting. 2025-02-24 11:08:29 +00:00
Jeff Young b74c2791f4 Allow context menus in footprint chooser when called from Eeschema.
Also moves several RAII utility classes (some of which
were duplicated in open code) to a common header file.
2025-02-24 11:08:29 +00:00
Jeff Young 9d051d096e Add tool framework to fp preview widget.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17107

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19651
2025-02-24 11:08:28 +00:00
Jeff Young 97a0ec504b Search Panel hint in Find Dialogs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19722
2025-02-24 11:08:28 +00:00
Jeff Young 3b3fd95430 MOVED subtract-mask-from-silk to general section.
(Was Gerber-specific.)
2025-02-24 11:08:28 +00:00
Jeff Young 0c9f08742c REMOVED force-plot-invisible-items.
It's dangerous as the router and DRC will have been
run without regard to invisible items.

(See #19420.)
2025-02-24 11:08:28 +00:00
Jeff Young e483c48fe6 Re-balance file sizes. 2025-02-24 11:08:28 +00:00
Damjan 76a3d1c845 Eeschema and pcbnew: Table Cell Properties 2025-02-24 11:07:58 +00:00
Damjan 5771467ca3 pcbnew: Table Rotation 2025-02-24 11:00:29 +00:00
Jon Evans 4123f75d5a Re-add accidentally removed increment
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20069
2025-02-23 22:41:44 -05:00
Seth Hillbrand 03af293683 Unify embedded file writing
For unknown reasons, one method of writing was not working on Windows.
This is an attempt to write using the common wxFFileOutputStream to see
if that results in better output for Windows clients

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20006
2025-02-23 15:38:39 -08:00
Jon Evans 3525731a4e PCM: Prompt to enable IPC API when required
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20062
2025-02-23 18:07:02 -05:00
Dmitry Rezvanov 58d2b34304 Prevent overwriting alias members when adding new rows in panel setup.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/20040
2025-02-23 22:21:28 +00:00
Damjan 9c6ebb44b6 pcbnew: Table Cell Text Justification 2025-02-23 21:27:57 +00:00
Jon Evans bacb6bf40f Clear render cache for hole walls on zoom change 2025-02-23 13:03:54 -05:00
Jon Evans 0e8934f887 Do not persist canvas type fallback due to OpenGL failure
If the user wants to always use fallback,
they can set this option explicitly
2025-02-23 12:50:43 -05:00
Graham Keeth 89a5fadcdc improve tooltips in sync sheet pins dialog 2025-02-22 23:16:39 +00:00
Seth Hillbrand 157c7422b0 Allow sim models to reference embedded files
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20024
2025-02-22 14:53:59 -08:00
Seth Hillbrand b02a449be8 Limit the size of the PTH hole walls
Should always be at least 2px thick but no larger than the minimum
thickness of the pad (walls do not extend beyond the pad itself)
2025-02-22 14:53:59 -08:00
Graham Keeth c57088a60c Add ellipses for sheet/sheet pin actions 2025-02-22 21:33:24 +00:00
Graham Keeth 812a3ff83e Add ellipses in net inspector menus 2025-02-22 21:33:24 +00:00
Graham Keeth 2e7db39751 Add ellipsis for zone manager 2025-02-22 21:33:24 +00:00
Jon Evans d29025ef78 API: Refresh screen after changing selection
Required on Linux/Windows

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20008
2025-02-22 16:00:40 -05:00
Connor Goss 5a5759c41a Add IPC-D-356 Export to kicad-cli
ADDED: Added IPC-D-356 exporting to kicad-cli.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13951
2025-02-22 21:00:54 +00:00
Wayne Stambaugh 4e4ebe536e Fix zone manager dialog layout issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20046
2025-02-22 15:48:00 -05:00
Jon Evans 5abfdac639 Remove accidentally-added tree 2025-02-22 14:43:49 -05:00
Jon Evans 8082d6ffa9 Remove debug output 2025-02-22 14:02:52 -05:00
Jon Evans 78d117bf3b Attempt a better fix for CI paths in kicad-cli tests
Also check in other default configs
2025-02-22 13:37:48 -05:00
Jon Evans 8d7d769bb6 Prevent assertion running on wx 3.3 2025-02-22 12:15:46 -05:00
Jon Evans cc1f513a6e Add some env debug output to kicad-cli tests 2025-02-22 12:01:35 -05:00
jean-pierre charras fc9795e95d pcb_calculator, STRIPLINE: fix incorrect formula for conductor loss. 2025-02-22 17:02:09 +01:00
Eli Hughes e972fb42ee Seeding a simple python script to create a test server for http libs. 2025-02-22 15:47:56 +00:00
Dmitry Rezvanov c7aaf8b6e1 Enhance library pinning functionality to support pin/unpin multiple libraries in the library editor 2025-02-22 15:41:35 +00:00
Jon Evans ca21a35bfc Improvements to kicad-cli test repeatability 2025-02-22 10:35:27 -05:00
JamesJCode 1e84d1e496 Fix m_zoneLayerOverrides data race in pad.h
From Coverity issue 542093
2025-02-22 14:58:11 +00:00
Dmitry Rezvanov ee614161d7 Added enum COL_ORDER for jobset panel's columns 2025-02-22 14:07:08 +00:00
Dmitry Rezvanov 0c2a5b72ec Fixed description column number in PANEL_JOBSET::OnGridCellChange.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20030
2025-02-22 14:07:08 +00:00
Daniel Treffenstädt 255f4aee76 Make sure drill layer pairs are created in odb++
fixes #20039
2025-02-22 10:58:14 +01:00
Seth Hillbrand 878cf768d6 Quiet down the Exclude from Sim marks in Schematic
The big grey X and dimming the component made it look like the component
was no longer a part of the circuit, rather than just being excluded for
a single purpose.

The changes the display to make a more subtle grey outline with an icon
in the corner to indicate that this refers to simulation.
2025-02-21 12:38:23 -08:00
Seth Hillbrand 2e93fb7a24 Prevent crash when importing over existing project
If the hierarchy navigator is open and expanded, we have references to
the existing sheets.  These need to be cleared when importing a new
sheet over top

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20004
2025-02-21 10:34:25 -08:00
Graham Keeth ac9f41baaa Embedded files: standardize on "embedded reference" 2025-02-21 12:46:43 -05:00
jean-pierre charras aafe6157e2 kicad-cli pcb export SVG: ensure the "C" locale is used.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20023
2025-02-21 17:44:02 +01:00
jean-pierre charras 22a2cca312 PANEL_FP_EDITOR_FIELD_DEFAULTS: fix hang when creating the panel (Windows only)
PANEL_FP_EDITOR_FIELD_DEFAULTS::loadFPSettings() was trying to add 0 rows to a
table which hang on Windows (but not on linux)
2025-02-21 17:08:22 +01:00
Graham Keeth 68869f6439 capitalize Git in display strings 2025-02-21 15:18:16 +00:00
Jeff Young 0885d48d6b parseMaybeAbsentBool's param is the naked token value, not the absent value.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20017
2025-02-21 11:17:45 +00:00
jean-pierre charras a9fb475cf2 PCB_TABLE: fix incorrect plot of tables rotated +-90 (missing segments).
This change was missing in commit 276029ee

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19985
2025-02-21 09:47:45 +01:00
Jon Evans b932487f2e API: Add serialization of footprint mounting style
See https://gitlab.com/kicad/code/kicad-python/-/issues/19
2025-02-20 17:46:23 -05:00
Jeff Young a8a1b08013 Make sure protobuf API stays consistent. 2025-02-20 17:47:40 +00:00
Jeff Young 9ca9d7120a Cleanup. 2025-02-20 17:47:40 +00:00
jean-pierre charras 1748c3c893 PANEL_PREVIEW_3D_MODEL_BASE: fix opacity slider.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19990
2025-02-20 18:21:24 +01:00
jean-pierre charras 8a5b71a01b Print dlgs: add panel printer to select the current printer. Windows only
Other platforms show the available printers in print dialog.
2025-02-20 17:04:47 +01:00
Alex Shvartzkop 0201e7286c Vertically center text in cells in jobsets table. 2025-02-20 14:23:35 +03:00
John Beard f24c8d7410 Pcbnew: add a tooltop for always-on layers 2025-02-06 22:45:32 +08:00
Marek Roszko 3d15317282 Add missing demo installs 2025-02-19 23:07:10 -05:00
Ian McInerney 0954f8ff76 Ensure vme-wren demo is installed 2025-02-20 03:00:10 +00:00
Jeff Young 6b3d01ead9 Load actions from frame's actionmanager, not from singleton.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19989
2025-02-19 23:43:53 +00:00
Jeff Young a00aeb7876 Fix comment. 2025-02-19 23:43:53 +00:00
Jeff Young e018a33628 Formatting. 2025-02-19 23:43:53 +00:00
Jeff Young 61efe5be18 Resolve field references in symbol text items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19983
2025-02-19 23:43:53 +00:00
Jeff Young bf34fe625c Reduce cover types.
Also, don't use _ITEM for things that aren't EDA::ITEMs.
2025-02-19 23:43:53 +00:00
Jeff Young fea659a002 Remove prohibition from clearing Value field in Symbol Fields Table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19745
2025-02-19 23:43:53 +00:00
Jeff Young 426ac96bb7 ADDED: 'Name' property for fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19706
2025-02-19 23:43:53 +00:00
Jeff Young be58dddcab Don't special case output directory label for jobsets.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19868
2025-02-19 23:43:53 +00:00
Jeff Young 6a3f52dbaf Ignore negative layers when exporting Gerbers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16871
2025-02-19 23:43:53 +00:00
Jeff Young 3c71e7ab09 Auto-recognize URLs in SCH_FIELD and PCB_FIELD grids.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17066

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17745
2025-02-19 23:43:53 +00:00
Jeff Young c136df247f Better way of determining if we're reporting from the footprint editor. 2025-02-19 23:43:53 +00:00
Jeff Young 006d8b290a Save copy of AUI config before applying it.
(It's going to do a bunch config saves, which
will otherwise overwrite all the user's preferences
with the defaults.)
2025-02-19 23:43:53 +00:00
Jeff Young 072d8d55fe ADDED: support naked hyperlinks in tablecells and textboxes.
Also fix flickering due to IS_ROLLOVER flag getting
nuked.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18832
2025-02-19 23:43:53 +00:00
Jeff Young c8f56f24a8 Write flipBoard boolean to JSON.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19852
2025-02-19 23:43:53 +00:00
Jeff Young 4e08afd517 Improve control spacing. 2025-02-19 23:43:53 +00:00
Jeff Young 1ff0dfb052 No connections AND no-net is not an error
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19737
2025-02-19 23:43:53 +00:00
Jeff Young c28039556d Check for duplicate footprints.
Also fixes a bug where we were running Validate()
twice.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19857
2025-02-19 23:43:53 +00:00
Jeff Young 42acb62f6e Don't disable line styles on filled shapes.
It's too much trouble to figure out what the
user wants, and not always right even then.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19946
2025-02-19 23:43:53 +00:00
Jeff Young f65d260961 Pretty-print cross references in Symbol Fields Table.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19941
2025-02-19 23:43:53 +00:00
Jeff Young d921a4e916 Switch to using unit names in property inspector. 2025-02-19 23:43:53 +00:00
Jeff Young 56b8fec74b Update instance reference from property inspector.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19932
2025-02-19 23:43:53 +00:00
Jeff Young 1c848bb9fb Improve code clarity.
(No functional change.)
2025-02-19 23:43:53 +00:00
Jeff Young 80e7698131 MOVED subtract-mask-from-silk to general section.
(Was Gerber-specific.)
2025-02-19 23:43:53 +00:00
Jeff Young 4fa02690f8 REMOVED force-plot-invisible-items.
It's dangerous as the router and DRC will have been
run without regard to invisible items.

(See #19420.)
2025-02-19 23:43:53 +00:00
Jeff Young b44261c2bd Handle clipping silk to mask when there is more than one layer. 2025-02-19 23:43:53 +00:00
Jeff Young 4959b480c3 Cleanup stale comments. 2025-02-19 23:43:53 +00:00
Jeff Young 9c0214afc0 Cleanup. 2025-02-19 23:43:53 +00:00
Jeff Young 281aa74f30 Performance improvements for teardrop regeneration.
Avoid O(n^2) behaviour when deleting many
zones from the board zones list.
2025-02-19 23:43:53 +00:00
Jeff Young 5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
Jeff Young 40daacbeeb IPC-2581 has a hyphen in it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19770
2025-02-19 23:43:52 +00:00
Jeff Young 3fff89820d Fix inconsistent capitalisation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19770
2025-02-19 23:43:52 +00:00
Jeff Young cedb97c4c3 Formatting. 2025-02-19 23:43:52 +00:00
Jeff Young 759bfbca99 Don't allow creation of design blocks in recently used tree node. 2025-02-19 23:43:52 +00:00
Jeff Young 2a1b93a254 Fix bugs in library existence checking, and add for symbol libs. 2025-02-19 23:43:52 +00:00
Jeff Young 4a35468301 LIB_TREE_MODEL_ADAPTER is not symbol-specific. 2025-02-19 23:43:52 +00:00
Andrej Valek 5e64f56d54 KiwayPlayer(FRAME_FOOTPRINT_CHOOSER): set window parent
The FRAME_FOOTPRINT_CHOOSER dialog is always a modal window, so it
requires to have an parent. Set parent in dialog_field_properties.
2025-02-19 18:16:55 +00:00
lucas 2559ac50a3 Simulator: Bug fix quoting netnames for user defined signals
- Fixes issue: #18598
- Netnames that contained other netnames weren't quoted correctly
- E.g. /out1 and /out were in conflict in previous method
- Fixed formatting afted review
2025-02-19 18:15:57 +00:00
Dmitry Rezvanov 663f00da25 Add "Route Selected From Other End" action to edit context menu 2025-02-19 18:12:04 +00:00
Seth Hillbrand cf2827c6ec Properly handle Altium harnesses
Altium harnesses are imported as buses in KiCad, using bus aliases to
represent the harness elements

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16852
2025-02-19 18:06:57 +00:00
Seth Hillbrand 9781da51e1 Speed up the time it takes to GeneratePaths
The loop processes nodes but skips those nodes that share the same
parent.  Because of this, we can get strong performance improvement from
caching gains by sorting the vector first by the parents so that the
inner loop is able to skip ahead without invalidating its cache
2025-02-19 18:05:07 +00:00
Seth Hillbrand d2f780dfb4 Prevent image duplication
Duplicate ancillary clipboard needs to be tested with the existence of
an image when pasting

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19973
2025-02-19 18:02:27 +00:00
2112 changed files with 882860 additions and 635831 deletions
-57
View File
@@ -1,57 +0,0 @@
# minimum clang-format 10
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true
AlignOperands: true
AlignTrailingComments: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: InlineOnly
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: true
BinPackParameters: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakConstructorInitializersBeforeComma: false
BreakStringLiterals: true
ColumnLimit: 100
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
ForEachMacros: [ BOOST_FOREACH ]
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 2
NamespaceIndentation: Inner
PointerAlignment: Left
ReflowComments: false
SortIncludes: false
SpaceAfterCStyleCast: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInParentheses: true
SpacesInSquareBrackets: false
Standard: c++11
TabWidth: 4
UseTab: Never
+7
View File
@@ -24,6 +24,7 @@ common/template_fieldnames_lexer.h
eeschema/schematic_keywords.*
pcbnew/pcb_plot_params_keywords.cpp
pcbnew/pcb_plot_params_lexer.h
pcbnew/dialogs/panel_setup_rules_help_*.h
Makefile
CMakeUserPresets.json
CMakeCache.txt
@@ -51,6 +52,7 @@ common/pcb_keywords.cpp
include/pcb_lexer.h
fp-info-cache
qa/tests/output/**
qa/tests/cli/output/**
# demo project auxiliary files
demos/**/*-bak
@@ -87,6 +89,9 @@ pcbnew/Info.plist
*.orig
*.patch
# _clang-format is used, .clang-format is not
.clang-format
# These CMake files are wanted
!cmake/**/*.cmake
@@ -125,9 +130,11 @@ i18n_status.csv
# Project local settings files and backups (in demos and qa tests)
*.kicad_prl
*-backups
~*.lck
# QA dataoutput
qa/data/**/*.csv
qa/data/**/*.spice
# Don't actually ignore any of these files, since we need them in the tree
!resources/linux/icons/hicolor/**/**/*
+58
View File
@@ -0,0 +1,58 @@
# Despite the unfortunate naming convention of this file, KiCad does not have code "owners".
# All parts of KiCad are worked on by all developers, and we do not require explicit approval
# from any particular person in order to accept contributions or fixes to sections of KiCad.
# This file is used to generate suggested reviewers for pull requests that touch certain parts
# of the KiCad codebase based on the development history of those parts. Most of KiCad does not
# have a particular set of reviewers defined in this file, and in general, it is a good thing if
# entries can be removed from this file over time, because it indicates that expertise about
# parts of the codebase that once were only familiar to one or two developers is now shared among
# a wider set of the core development team.
# Contributors: despite this file, the KiCad team still primarily matches up new merge requests
# with reviewers based on developer availability. If a change you propose touches files that
# are covered by entries in this file, the relevant developer(s) may or may not be the final
# reviewer(s) for your merge request.
# Core team developers: consider adding yourself to places where you are commonly asked for
# review feedback by the rest of the team. Consider removing yourself if you are stepping back
# from participating in KiCad code review, or if you notice that an area you were previously
# listed as a reviewer because not many others were familiar with it is now familiar with the
# larger team.
^[Suggested Reviewers]
/vcpkg*.json @mroszko
/api/ @craftyjon
/cmake/InstallSteps/*MacOS.cmake @craftyjon
/common/api/ @craftyjon
/common/git/ @sethhillbrand
/common/database/ @craftyjon
/common/io/eagle/ @stambaughw
/common/jobs/ @mroszko
/cmake/KiCadVersion.cmake @stambaughw
/eeschema/api/ @craftyjon
/eeschema/erc/ @jeffyoung
/eeschema/connection_graph.* @craftyjon @sethhillbrand
/eeschema/sch_io/database/ @craftyjon
/eeschema/sch_io/kicad_sexpr/ @stambaughw
/eeschema/sch_io/eagle/ @stambaughw
/libs/kinng/ @craftyjon
/pcbnew/api/ @craftyjon
/pcbnew/drc/ @jeffyoung
/pcbnew/pcb_io/easyeda* @dsa-t
/pcbnew/pcb_io/ipc2581/ @sethhillbrand
/pcbnew/pcb_io/odbpp/ @SYSUeric66 @sethhillbrand @craftyjon
/pcbnew/router/ @twlostow @craftyjon @sethhillbrand
/pcbnew/zone_filler* @jeffyoung
/scripting/ @craftyjon @sethhillbrand
/thirdparty/nanodbc/ @craftyjon
+2
View File
@@ -37,6 +37,8 @@ win64_build:
../../
- cmake --build . 2>&1 | tee compilation_log.txt
- cd ../../
after_script:
- Get-Content -Path C:\builder\vcpkg\buildtrees\wxpython-33\python3-tool-post-install-err.log
artifacts:
# Only save the artifacts that are needed for running the tests in the next stage
# and the compilation log. The entire build directory is too large to save as an
+7 -6
View File
@@ -141,12 +141,13 @@ S3D_CACHE::~S3D_CACHE()
SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, const wxString& aBasePath,
S3D_CACHE_ENTRY** aCachePtr, const EMBEDDED_FILES* aEmbeddedFiles )
S3D_CACHE_ENTRY** aCachePtr,
std::vector<const EMBEDDED_FILES*> aEmbeddedFilesStack )
{
if( aCachePtr )
*aCachePtr = nullptr;
wxString full3Dpath = m_FNResolver->ResolvePath( aModelFile, aBasePath, aEmbeddedFiles );
wxString full3Dpath = m_FNResolver->ResolvePath( aModelFile, aBasePath, std::move( aEmbeddedFilesStack ) );
if( full3Dpath.empty() )
{
@@ -212,9 +213,9 @@ SCENEGRAPH* S3D_CACHE::load( const wxString& aModelFile, const wxString& aBasePa
SCENEGRAPH* S3D_CACHE::Load( const wxString& aModelFile, const wxString& aBasePath,
const EMBEDDED_FILES* aEmbeddedFiles )
std::vector<const EMBEDDED_FILES*> aEmbeddedFilesStack )
{
return load( aModelFile, aBasePath, nullptr, aEmbeddedFiles );
return load( aModelFile, aBasePath, nullptr, std::move( aEmbeddedFilesStack ) );
}
@@ -548,10 +549,10 @@ void S3D_CACHE::ClosePlugins()
S3DMODEL* S3D_CACHE::GetModel( const wxString& aModelFileName, const wxString& aBasePath,
const EMBEDDED_FILES* aEmbeddedFiles )
std::vector<const EMBEDDED_FILES*> aEmbeddedFilesStack )
{
S3D_CACHE_ENTRY* cp = nullptr;
SCENEGRAPH* sp = load( aModelFileName, aBasePath, &cp, aEmbeddedFiles );
SCENEGRAPH* sp = load( aModelFileName, aBasePath, &cp, std::move( aEmbeddedFilesStack ) );
if( !sp )
return nullptr;
+7 -5
View File
@@ -95,11 +95,12 @@ public:
*
* @param aModelFile is the partial or full path to the model to be loaded.
* @param aBasePath is the path to search for any relative files
* @param aEmbeddedFiles is a pointer to the embedded files list.
* @param aEmbeddedFilesStack is a list of pointers to the embedded files list. They will
* be searched from the front of the list.
* @return true if the model was successfully loaded, otherwise false.
*/
SCENEGRAPH* Load( const wxString& aModelFile, const wxString& aBasePath,
const EMBEDDED_FILES* aEmbeddedFiles );
std::vector<const EMBEDDED_FILES*> aEmbeddedFilesStack );
FILENAME_RESOLVER* GetResolver() noexcept;
@@ -128,11 +129,12 @@ public:
*
* @param aModelFileName is the full path to the model to be loaded.
* @param aBasePath is the path to search for any relative files.
* @param aEmbeddedFiles is a pointer to the embedded files list.
* @param aEmbeddedFilesStack is a stack of pointers to the embedded files lists. They will
* be searched from the bottom of the stack.
* @return is a pointer to the render data or NULL if not available.
*/
S3DMODEL* GetModel( const wxString& aModelFileName, const wxString& aBasePath,
const EMBEDDED_FILES* aEmbeddedFiles );
std::vector<const EMBEDDED_FILES*> aEmbeddedFilesStack );
/**
* Delete up old cache files in cache directory.
@@ -174,7 +176,7 @@ private:
// the real load function (can supply a cache entry pointer to member functions)
SCENEGRAPH* load( const wxString& aModelFile, const wxString& aBasePath,
S3D_CACHE_ENTRY** aCachePtr = nullptr,
const EMBEDDED_FILES* aEmbeddedFiles = nullptr );
std::vector<const EMBEDDED_FILES*> aEmbeddedFilesStack = {} );
/// Cache entries.
std::list< S3D_CACHE_ENTRY* > m_CacheList;
+3 -1
View File
@@ -752,7 +752,9 @@ bool SGSHAPE::Prepare( const glm::dmat4* aTransform, S3D::MATLIST& materials,
for( unsigned int i = 0; i < nvidx; ++i )
{
mit = indexmap.find( lv[i] );
lvidx[i] = mit->second;
if( mit != indexmap.end() )
lvidx[i] = mit->second;
}
m.m_FaceIdxSize = (unsigned int )nvidx;
+140 -104
View File
@@ -91,7 +91,6 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
m_IsPreviewer( false ),
m_board( nullptr ),
m_3dModelManager( nullptr ),
m_colors( nullptr ),
m_layerZcoordTop(),
m_layerZcoordBottom()
{
@@ -114,6 +113,8 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
m_frontCopperThickness3DU = DEFAULT_COPPER_THICKNESS * m_biuTo3Dunits;
m_backCopperThickness3DU = DEFAULT_COPPER_THICKNESS * m_biuTo3Dunits;
m_nonCopperLayerThickness3DU = DEFAULT_TECH_LAYER_THICKNESS * m_biuTo3Dunits;
m_frontMaskThickness3DU = DEFAULT_TECH_LAYER_THICKNESS * m_biuTo3Dunits;
m_backMaskThickness3DU = DEFAULT_TECH_LAYER_THICKNESS * m_biuTo3Dunits;
m_solderPasteLayerThickness3DU = SOLDERPASTE_LAYER_THICKNESS * m_biuTo3Dunits;
m_trackCount = 0;
@@ -137,13 +138,14 @@ BOARD_ADAPTER::BOARD_ADAPTER() :
m_ECO1Color = SFVEC4F( 0.70, 0.10, 0.10, 1.0 );
m_ECO2Color = SFVEC4F( 0.70, 0.10, 0.10, 1.0 );
for( int ii = 0; ii < 45; ++ii )
m_UserDefinedLayerColor[ii] = SFVEC4F( 0.70, 0.10, 0.10, 1.0 );
m_platedPadsFront = nullptr;
m_platedPadsBack = nullptr;
m_offboardPadsFront = nullptr;
m_offboardPadsBack = nullptr;
m_frontPlatedPadAndGraphicPolys = nullptr;
m_backPlatedPadAndGraphicPolys = nullptr;
m_frontPlatedCopperPolys = nullptr;
m_backPlatedCopperPolys = nullptr;
@@ -225,16 +227,11 @@ BOARD_ADAPTER::~BOARD_ADAPTER()
void BOARD_ADAPTER::ReloadColorSettings() noexcept
{
wxCHECK( PgmOrNull(), /* void */ );
PCBNEW_SETTINGS* cfg = GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" );
COLOR_SETTINGS* cs = ::GetColorSettings( cfg ? cfg->m_ColorTheme : DEFAULT_THEME );
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
PCBNEW_SETTINGS* cfg = mgr.GetAppSettings<PCBNEW_SETTINGS>( "pcbnew" );
if( cfg )
{
m_colors = Pgm().GetSettingsManager().GetColorSettings( cfg->m_ColorTheme );
GetBoardEditorCopperLayerColors( cfg );
}
for( int layer = F_Cu; layer < PCB_LAYER_ID_COUNT; ++layer )
m_BoardEditorColors[ layer ] = cs->GetColor( layer );
}
@@ -262,7 +259,15 @@ bool BOARD_ADAPTER::Is3dLayerEnabled( PCB_LAYER_ID aLayer,
case Cmts_User: return aVisibilityFlags.test( LAYER_3D_USER_COMMENTS );
case Eco1_User: return aVisibilityFlags.test( LAYER_3D_USER_ECO1 );
case Eco2_User: return aVisibilityFlags.test( LAYER_3D_USER_ECO2 );
default: return m_board && m_board->IsLayerVisible( aLayer );
default:
{
int layer3D = MapPCBLayerTo3DLayer( aLayer );
if( layer3D != UNDEFINED_LAYER )
return aVisibilityFlags.test( layer3D );
return m_board && m_board->IsLayerVisible( aLayer );
}
}
}
@@ -313,7 +318,7 @@ unsigned int BOARD_ADAPTER::GetCircleSegmentCount( int aDiameterBIU ) const
{
wxASSERT( aDiameterBIU > 0 );
return GetArcToSegmentCount( aDiameterBIU / 2, ARC_HIGH_DEF, FULL_CIRCLE );
return GetArcToSegmentCount( aDiameterBIU / 2, m_board->GetDesignSettings().m_MaxError, FULL_CIRCLE );
}
@@ -372,6 +377,8 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
m_frontCopperThickness3DU = DEFAULT_COPPER_THICKNESS * m_biuTo3Dunits;
m_backCopperThickness3DU = DEFAULT_COPPER_THICKNESS * m_biuTo3Dunits;
m_nonCopperLayerThickness3DU = DEFAULT_TECH_LAYER_THICKNESS * m_biuTo3Dunits;
m_frontMaskThickness3DU = DEFAULT_TECH_LAYER_THICKNESS * m_biuTo3Dunits;
m_backMaskThickness3DU = DEFAULT_TECH_LAYER_THICKNESS * m_biuTo3Dunits;
m_solderPasteLayerThickness3DU = SOLDERPASTE_LAYER_THICKNESS * m_biuTo3Dunits;
g_BevelThickness3DU = pcbIUScale.mmToIU( ADVANCED_CFG::GetCfg().m_3DRT_BevelHeight_um / 1000.0 )
@@ -383,7 +390,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
if( bds.GetStackupDescriptor().GetCount() )
{
int thickness = 0;
int body_thickness = 0;
for( BOARD_STACKUP_ITEM* item : bds.GetStackupDescriptor().GetList() )
{
@@ -391,31 +398,44 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
{
case BS_ITEM_TYPE_DIELECTRIC:
for( int sublayer = 0; sublayer < item->GetSublayersCount(); sublayer++ )
thickness += item->GetThickness( sublayer );
body_thickness += item->GetThickness( sublayer );
break;
case BS_ITEM_TYPE_COPPER:
{
// The copper thickness must be > 0 to avoid draw issues (divide by 0 for
// instance). We use a minimal arbitrary value = 1 micrometer here:
int copper_thickness = std::max( item->GetThickness(),
pcbIUScale.mmToIU( 0.001 ) );
int copper_thickness = std::max( item->GetThickness(), pcbIUScale.mmToIU( 0.001 ) );
if( item->GetBrdLayerId() == F_Cu )
m_frontCopperThickness3DU = copper_thickness * m_biuTo3Dunits;
else if( item->GetBrdLayerId() == B_Cu )
m_backCopperThickness3DU = copper_thickness * m_biuTo3Dunits;
else if( item->IsEnabled() )
thickness += copper_thickness;
}
body_thickness += copper_thickness;
break;
}
case BS_ITEM_TYPE_SOLDERMASK:
{
// The mask thickness must be > 0 to avoid draw issues (divide by 0 for
// instance). We use a minimal arbitrary value = 1 micrometer here:
int mask_thickness = std::max( item->GetThickness(), pcbIUScale.mmToIU( 0.001 ) );
if( item->GetBrdLayerId() == F_Mask )
m_frontMaskThickness3DU = mask_thickness * m_biuTo3Dunits;
else if( item->GetBrdLayerId() == B_Mask )
m_backMaskThickness3DU = mask_thickness * m_biuTo3Dunits;
}
default:
break;
}
}
m_boardBodyThickness3DU = thickness * m_biuTo3Dunits;
m_boardBodyThickness3DU = body_thickness * m_biuTo3Dunits;
}
}
@@ -449,8 +469,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
};
m_layerZcoordBottom[layer_id] = m_boardBodyThickness3DU / 2.0
- ( m_boardBodyThickness3DU * layer_pos
/ ( m_copperLayersCount - 1 ) );
- ( m_boardBodyThickness3DU * layer_pos / ( m_copperLayersCount - 1 ) );
if( layer_pos < (m_copperLayersCount / 2) )
m_layerZcoordTop[layer_id] = m_layerZcoordBottom[layer_id] + m_frontCopperThickness3DU;
@@ -465,26 +484,14 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
const float zpos_copperTop_back = m_layerZcoordTop[B_Cu];
const float zpos_copperTop_front = m_layerZcoordTop[F_Cu];
// Fill not copper layers zpos with a dummy position
// (m_layerZcoordTop[B_Cu]with a small margin)
// Some important layer position will be set later
// Fill not copper layers zpos
for( int layer_id = 0; layer_id < PCB_LAYER_ID_COUNT; layer_id++ )
{
if( IsCopperLayer( (PCB_LAYER_ID)layer_id ) )
continue;
m_layerZcoordBottom[(PCB_LAYER_ID)layer_id] = zpos_copperTop_back - 2.0f * zpos_offset;
m_layerZcoordTop[(PCB_LAYER_ID) layer_id] =
m_layerZcoordBottom[(PCB_LAYER_ID) layer_id] - m_backCopperThickness3DU;
}
// calculate z position for each technical layer
// Solder mask and Solder paste have the same Z position
for( PCB_LAYER_ID layer_id :
{ B_Adhes, B_Mask, B_Paste, F_Adhes, F_Mask, F_Paste, B_SilkS, F_SilkS } )
{
float zposTop = 0.0;
float zposBottom = 0.0;
float zposBottom = zpos_copperTop_front + 2.0f * zpos_offset;
float zposTop = zposBottom + m_frontCopperThickness3DU;
switch( layer_id )
{
@@ -500,7 +507,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
case B_Mask:
zposBottom = zpos_copperTop_back;
zposTop = zpos_copperTop_back - m_nonCopperLayerThickness3DU;
zposTop = zpos_copperTop_back - m_backMaskThickness3DU;
break;
case B_Paste:
@@ -510,7 +517,7 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
case F_Mask:
zposBottom = zpos_copperTop_front;
zposTop = zpos_copperTop_front + m_nonCopperLayerThickness3DU;
zposTop = zpos_copperTop_front + m_frontMaskThickness3DU;
break;
case F_Paste:
@@ -532,14 +539,13 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
break;
}
m_layerZcoordTop[layer_id] = zposTop;
m_layerZcoordBottom[layer_id] = zposBottom;
m_layerZcoordTop[(PCB_LAYER_ID)layer_id] = zposTop;
m_layerZcoordBottom[(PCB_LAYER_ID)layer_id] = zposBottom;
}
m_boardCenter = SFVEC3F( m_boardPos.x * m_biuTo3Dunits, m_boardPos.y * m_biuTo3Dunits, 0.0f );
SFVEC3F boardSize = SFVEC3F( m_boardSize.x * m_biuTo3Dunits, m_boardSize.y * m_biuTo3Dunits,
0.0f );
SFVEC3F boardSize = SFVEC3F( m_boardSize.x * m_biuTo3Dunits, m_boardSize.y * m_biuTo3Dunits, 0.0f );
boardSize /= 2.0f;
SFVEC3F boardMin = ( m_boardCenter - boardSize );
@@ -580,6 +586,9 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
m_UserCommentsColor = to_SFVEC4F( colors[ LAYER_3D_USER_COMMENTS ] );
m_ECO1Color = to_SFVEC4F( colors[ LAYER_3D_USER_ECO1 ] );
m_ECO2Color = to_SFVEC4F( colors[ LAYER_3D_USER_ECO2 ] );
for( int layer = LAYER_3D_USER_1; layer <= LAYER_3D_USER_45; ++layer )
m_UserDefinedLayerColor[ layer - LAYER_3D_USER_1 ] = to_SFVEC4F( colors[ layer ] );
}
@@ -602,28 +611,15 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetDefaultColors() const
colors[ LAYER_3D_USER_ECO1 ] = BOARD_ADAPTER::g_DefaultECOs;
colors[ LAYER_3D_USER_ECO2 ] = BOARD_ADAPTER::g_DefaultECOs;
COLOR_SETTINGS* settings = ::GetColorSettings( DEFAULT_THEME );
for( int layer = LAYER_3D_USER_1; layer <= LAYER_3D_USER_45; ++layer )
colors[ layer ] = settings->GetColor( layer );
return colors;
}
void BOARD_ADAPTER::GetBoardEditorCopperLayerColors( PCBNEW_SETTINGS* aCfg )
{
m_BoardEditorColors.clear();
if( m_copperLayersCount <= 0 )
return;
COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings( aCfg->m_ColorTheme );
LSET copperLayers = LSET::AllCuMask();
for( auto layer : LAYER_RANGE( F_Cu, B_Cu, m_copperLayersCount ) )
{
m_BoardEditorColors[ layer ] = settings->GetColor( layer );
}
}
std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
{
std::map<int, COLOR4D> colors;
@@ -634,7 +630,7 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
}
else
{
COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings();
COLOR_SETTINGS* settings = ::GetColorSettings( DEFAULT_THEME );
for( const auto& [ layer, defaultColor /* unused */ ] : GetDefaultColors() )
colors[ layer ] = settings->GetColor( layer );
@@ -744,11 +740,16 @@ std::map<int, COLOR4D> BOARD_ADAPTER::GetLayerColors() const
void BOARD_ADAPTER::SetLayerColors( const std::map<int, COLOR4D>& aColors )
{
COLOR_SETTINGS* settings = Pgm().GetSettingsManager().GetColorSettings();
COLOR_SETTINGS* settings = ::GetColorSettings( DEFAULT_THEME );
for( const auto& [ layer, color ] : aColors )
{
settings->SetColor( layer, color );
if( layer >= LAYER_3D_USER_1 && layer <= LAYER_3D_USER_45 )
m_UserDefinedLayerColor[ layer - LAYER_3D_USER_1 ] = GetColor( color );
}
Pgm().GetSettingsManager().SaveColorSettings( settings, "3d_viewer" );
}
@@ -769,6 +770,9 @@ void BOARD_ADAPTER::SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers )
m_Cfg->m_Render.show_eco1 = aLayers.test( LAYER_3D_USER_ECO1 );
m_Cfg->m_Render.show_eco2 = aLayers.test( LAYER_3D_USER_ECO2 );
for( int layer = LAYER_3D_USER_1; layer <= LAYER_3D_USER_45; ++layer )
m_Cfg->m_Render.show_user[ layer - LAYER_3D_USER_1 ] = aLayers.test( layer );
m_Cfg->m_Render.show_footprints_normal = aLayers.test( LAYER_3D_TH_MODELS );
m_Cfg->m_Render.show_footprints_insert = aLayers.test( LAYER_3D_SMD_MODELS );
m_Cfg->m_Render.show_footprints_virtual = aLayers.test( LAYER_3D_VIRTUAL_MODELS );
@@ -781,7 +785,7 @@ void BOARD_ADAPTER::SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers )
m_Cfg->m_Render.show_model_bbox = aLayers.test( LAYER_3D_BOUNDING_BOXES );
m_Cfg->m_Render.show_off_board_silk = aLayers.test( LAYER_3D_OFF_BOARD_SILK );
m_Cfg->m_Render.show_axis = aLayers.test( LAYER_3D_AXES );
m_Cfg->m_Render.show_navigator = aLayers.test( LAYER_3D_NAVIGATOR );
}
@@ -789,6 +793,46 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
{
std::bitset<LAYER_3D_END> ret;
if( m_IsPreviewer )
{
if( m_Cfg->m_Render.preview_show_board_body )
{
ret.set( LAYER_3D_BOARD, m_Cfg->m_Render.show_board_body );
ret.set( LAYER_3D_SOLDERMASK_TOP, m_Cfg->m_Render.show_soldermask_top );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, m_Cfg->m_Render.show_soldermask_bottom );
ret.set( LAYER_3D_SOLDERPASTE, m_Cfg->m_Render.show_solderpaste );
ret.set( LAYER_3D_ADHESIVE, m_Cfg->m_Render.show_adhesive );
}
ret.set( LAYER_3D_COPPER_TOP, true );
ret.set( LAYER_3D_COPPER_BOTTOM, true );
ret.set( LAYER_3D_SILKSCREEN_TOP, true );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, true );
ret.set( LAYER_3D_USER_COMMENTS, true );
ret.set( LAYER_3D_USER_DRAWINGS, true );
ret.set( LAYER_3D_USER_ECO1, true );
ret.set( LAYER_3D_USER_ECO2, true );
for( int layer = LAYER_3D_USER_1; layer <= LAYER_3D_USER_45; ++layer )
ret.set( layer, true );
ret.set( LAYER_FP_REFERENCES, true );
ret.set( LAYER_FP_VALUES, true );
ret.set( LAYER_FP_TEXT, true );
ret.set( LAYER_3D_TH_MODELS, true );
ret.set( LAYER_3D_SMD_MODELS, true );
ret.set( LAYER_3D_VIRTUAL_MODELS, true );
ret.set( LAYER_3D_MODELS_NOT_IN_POS, true );
ret.set( LAYER_3D_MODELS_MARKED_DNP, true );
ret.set( LAYER_3D_BOUNDING_BOXES, m_Cfg->m_Render.show_model_bbox );
ret.set( LAYER_3D_OFF_BOARD_SILK, m_Cfg->m_Render.show_off_board_silk );
ret.set( LAYER_3D_NAVIGATOR, m_Cfg->m_Render.show_navigator );
return ret;
}
ret.set( LAYER_3D_BOARD, m_Cfg->m_Render.show_board_body );
ret.set( LAYER_3D_COPPER_TOP, m_Cfg->m_Render.show_copper_top );
ret.set( LAYER_3D_COPPER_BOTTOM, m_Cfg->m_Render.show_copper_bottom );
@@ -803,6 +847,9 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
ret.set( LAYER_3D_USER_ECO1, m_Cfg->m_Render.show_eco1 );
ret.set( LAYER_3D_USER_ECO2, m_Cfg->m_Render.show_eco2 );
for( int layer = LAYER_3D_USER_1; layer <= LAYER_3D_USER_45; ++layer )
ret.set( layer, m_Cfg->m_Render.show_user[ layer - LAYER_3D_USER_1 ] );
ret.set( LAYER_FP_REFERENCES, m_Cfg->m_Render.show_fp_references );
ret.set( LAYER_FP_VALUES, m_Cfg->m_Render.show_fp_values );
ret.set( LAYER_FP_TEXT, m_Cfg->m_Render.show_fp_text );
@@ -815,7 +862,7 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
ret.set( LAYER_3D_BOUNDING_BOXES, m_Cfg->m_Render.show_model_bbox );
ret.set( LAYER_3D_OFF_BOARD_SILK, m_Cfg->m_Render.show_off_board_silk );
ret.set( LAYER_3D_AXES, m_Cfg->m_Render.show_axis );
ret.set( LAYER_3D_NAVIGATOR, m_Cfg->m_Render.show_navigator );
if( m_Cfg->m_CurrentPreset == FOLLOW_PCB )
{
@@ -845,7 +892,10 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
return ret;
const PCB_PLOT_PARAMS& plotParams = m_board->GetPlotOptions();
LSET layers = plotParams.GetLayerSelection() | plotParams.GetPlotOnAllLayersSelection();
LSET layers = plotParams.GetLayerSelection();
for( PCB_LAYER_ID commonLayer : plotParams.GetPlotOnAllLayersSequence() )
layers.set( commonLayer );
ret.set( LAYER_3D_BOARD, true );
ret.set( LAYER_3D_COPPER_TOP, layers.test( F_Cu ) );
@@ -861,34 +911,17 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetVisibleLayers() const
ret.set( LAYER_3D_USER_ECO1, layers.test( Eco1_User ) );
ret.set( LAYER_3D_USER_ECO2, layers.test( Eco2_User ) );
ret.set( LAYER_FP_REFERENCES, plotParams.GetPlotReference() );
ret.set( LAYER_FP_VALUES, plotParams.GetPlotValue() );
ret.set( LAYER_FP_TEXT, plotParams.GetPlotFPText() );
for( int layer = LAYER_3D_USER_1; layer <= LAYER_3D_USER_45; ++layer )
ret.set( layer, layers.test( Map3DLayerToPCBLayer( layer ) ) );
ret.set( LAYER_FP_REFERENCES, plotParams.GetPlotReference() );
ret.set( LAYER_FP_VALUES, plotParams.GetPlotValue() );
ret.set( LAYER_FP_TEXT, plotParams.GetPlotFPText() );
}
else if( LAYER_PRESET_3D* preset = m_Cfg->FindPreset( m_Cfg->m_CurrentPreset ) )
{
ret = preset->layers;
}
else
{
ret.set( LAYER_3D_BOARD, m_Cfg->m_Render.show_board_body );
ret.set( LAYER_3D_COPPER_TOP, m_Cfg->m_Render.show_copper_top );
ret.set( LAYER_3D_COPPER_BOTTOM, m_Cfg->m_Render.show_copper_bottom );
ret.set( LAYER_3D_SILKSCREEN_TOP, m_Cfg->m_Render.show_silkscreen_top );
ret.set( LAYER_3D_SILKSCREEN_BOTTOM, m_Cfg->m_Render.show_silkscreen_bottom );
ret.set( LAYER_3D_SOLDERMASK_TOP, m_Cfg->m_Render.show_soldermask_top );
ret.set( LAYER_3D_SOLDERMASK_BOTTOM, m_Cfg->m_Render.show_soldermask_bottom );
ret.set( LAYER_3D_SOLDERPASTE, m_Cfg->m_Render.show_solderpaste );
ret.set( LAYER_3D_ADHESIVE, m_Cfg->m_Render.show_adhesive );
ret.set( LAYER_3D_USER_COMMENTS, m_Cfg->m_Render.show_comments );
ret.set( LAYER_3D_USER_DRAWINGS, m_Cfg->m_Render.show_drawings );
ret.set( LAYER_3D_USER_ECO1, m_Cfg->m_Render.show_eco1 );
ret.set( LAYER_3D_USER_ECO2, m_Cfg->m_Render.show_eco2 );
ret.set( LAYER_FP_REFERENCES, m_Cfg->m_Render.show_fp_references );
ret.set( LAYER_FP_VALUES, m_Cfg->m_Render.show_fp_values );
ret.set( LAYER_FP_TEXT, m_Cfg->m_Render.show_fp_text );
}
return ret;
}
@@ -912,6 +945,9 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetDefaultVisibleLayers() const
ret.set( LAYER_3D_USER_ECO1, false );
ret.set( LAYER_3D_USER_ECO2, false );
for( int layer = LAYER_3D_USER_1; layer <= LAYER_3D_USER_45; ++layer )
ret.set( layer, false );
ret.set( LAYER_FP_REFERENCES, true );
ret.set( LAYER_FP_VALUES, true );
ret.set( LAYER_FP_TEXT, true );
@@ -924,12 +960,18 @@ std::bitset<LAYER_3D_END> BOARD_ADAPTER::GetDefaultVisibleLayers() const
ret.set( LAYER_3D_BOUNDING_BOXES, false );
ret.set( LAYER_3D_OFF_BOARD_SILK, false );
ret.set( LAYER_3D_AXES, true );
ret.set( LAYER_3D_NAVIGATOR, true );
return ret;
}
bool BOARD_ADAPTER::GetUseBoardEditorCopperLayerColors() const
{
return m_Cfg->m_Render.use_board_editor_copper_colors && !m_board->IsFootprintHolder();
}
bool BOARD_ADAPTER::createBoardPolygon( wxString* aErrorMsg )
{
m_board_poly.RemoveAllContours();
@@ -992,19 +1034,14 @@ float BOARD_ADAPTER::GetFootprintZPos( bool aIsFlipped ) const
}
SFVEC4F BOARD_ADAPTER::GetLayerColor( PCB_LAYER_ID aLayerId ) const
SFVEC4F BOARD_ADAPTER::GetLayerColor( int aLayerId ) const
{
if( aLayerId >= LAYER_3D_USER_1 && aLayerId <= LAYER_3D_USER_45 )
aLayerId = Map3DLayerToPCBLayer( aLayerId );
wxASSERT( aLayerId < PCB_LAYER_ID_COUNT );
const COLOR4D color = m_colors->GetColor( aLayerId );
return SFVEC4F( color.r, color.g, color.b, color.a );
}
SFVEC4F BOARD_ADAPTER::GetItemColor( int aItemId ) const
{
return GetColor( m_colors->GetColor( aItemId ) );
return GetColor( m_BoardEditorColors.at( aLayerId ) );
}
@@ -1016,9 +1053,8 @@ SFVEC4F BOARD_ADAPTER::GetColor( const COLOR4D& aColor ) const
SFVEC2F BOARD_ADAPTER::GetSphericalCoord( int i ) const
{
SFVEC2F sphericalCoord =
SFVEC2F( ( m_Cfg->m_Render.raytrace_lightElevation[i] + 90.0f ) / 180.0f,
m_Cfg->m_Render.raytrace_lightAzimuth[i] / 180.0f );
SFVEC2F sphericalCoord = SFVEC2F( ( m_Cfg->m_Render.raytrace_lightElevation[i] + 90.0f ) / 180.0f,
m_Cfg->m_Render.raytrace_lightAzimuth[i] / 180.0f );
sphericalCoord.x = glm::clamp( sphericalCoord.x, 0.0f, 1.0f );
sphericalCoord.y = glm::clamp( sphericalCoord.y, 0.0f, 2.0f );
+13 -27
View File
@@ -112,11 +112,6 @@ public:
*/
std::map<int, COLOR4D> GetLayerColors() const;
/**
* Build the copper color list used by the board editor, and store it in m_BoardEditorColors
*/
void GetBoardEditorCopperLayerColors( PCBNEW_SETTINGS* aCfg );
std::map<int, COLOR4D> GetDefaultColors() const;
void SetLayerColors( const std::map<int, COLOR4D>& aColors );
@@ -124,6 +119,8 @@ public:
std::bitset<LAYER_3D_END> GetDefaultVisibleLayers() const;
void SetVisibleLayers( const std::bitset<LAYER_3D_END>& aLayers );
bool GetUseBoardEditorCopperLayerColors() const;
/**
* Function to be called by the render when it need to reload the settings for the board.
*
@@ -210,15 +207,7 @@ public:
* @param aLayerId the layer to get the color information.
* @return the color in SFVEC3F format.
*/
SFVEC4F GetLayerColor( PCB_LAYER_ID aLayerId ) const;
/**
* Get the technical color of a layer.
*
* @param aItemId the item id to get the color information.
* @return the color in SFVEC3F format.
*/
SFVEC4F GetItemColor( int aItemId ) const;
SFVEC4F GetLayerColor( int aLayerId ) const;
/**
* @param[in] aColor is the color mapped.
@@ -352,14 +341,14 @@ public:
*/
const MAP_POLY& GetPolyMap() const noexcept { return m_layers_poly; }
const SHAPE_POLY_SET* GetFrontPlatedPadAndGraphicPolys()
const SHAPE_POLY_SET* GetFrontPlatedCopperPolys()
{
return m_frontPlatedPadAndGraphicPolys;
return m_frontPlatedCopperPolys;
}
const SHAPE_POLY_SET* GetBackPlatedPadAndGraphicPolys()
const SHAPE_POLY_SET* GetBackPlatedCopperPolys()
{
return m_backPlatedPadAndGraphicPolys;
return m_backPlatedCopperPolys;
}
const MAP_POLY& GetHoleIdPolysMap() const noexcept { return m_layerHoleIdPolys; }
@@ -386,7 +375,7 @@ private:
int aInflateValue );
void addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId, bool aSkipPlatedPads, bool aSkipNonPlatedPads );
PCB_LAYER_ID aLayerId );
void addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayerId,
@@ -455,6 +444,7 @@ public:
SFVEC4F m_UserCommentsColor;
SFVEC4F m_ECO1Color;
SFVEC4F m_ECO2Color;
SFVEC4F m_UserDefinedLayerColor[45];
std::map<int, COLOR4D> m_ColorOverrides; ///< allows to override color scheme colors
std::map<int, COLOR4D> m_BoardEditorColors; ///< list of colors used by the board editor
@@ -462,7 +452,6 @@ public:
private:
BOARD* m_board;
S3D_CACHE* m_3dModelManager;
COLOR_SETTINGS* m_colors;
VECTOR2I m_boardPos; ///< Board center position in board internal units.
VECTOR2I m_boardSize; ///< Board size in board internal units.
@@ -472,8 +461,6 @@ private:
MAP_POLY m_layers_poly; ///< Amalgamated polygon contours for various types
///< of items
SHAPE_POLY_SET* m_frontPlatedPadAndGraphicPolys;
SHAPE_POLY_SET* m_backPlatedPadAndGraphicPolys;
SHAPE_POLY_SET* m_frontPlatedCopperPolys;
SHAPE_POLY_SET* m_backPlatedCopperPolys;
@@ -505,16 +492,15 @@ private:
double m_biuTo3Dunits; ///< Scale factor to convert board internal units
///< to 3D units normalized between -1.0 and 1.0.
std::map<PCB_LAYER_ID, float> m_layerZcoordTop; ///< Top (End) Z position of each
///< layer in 3D units.
std::map<PCB_LAYER_ID, float> m_layerZcoordBottom; ///< Bottom (Start) Z position of
///< each layer in 3D units.
std::map<PCB_LAYER_ID, float> m_layerZcoordTop; ///< Top (End) Z pos of each layer in 3D units.
std::map<PCB_LAYER_ID, float> m_layerZcoordBottom; ///< Bottom (Start) Z pos of each layer.
float m_frontCopperThickness3DU;
float m_backCopperThickness3DU;
float m_boardBodyThickness3DU;
float m_nonCopperLayerThickness3DU;
float m_frontMaskThickness3DU;
float m_backMaskThickness3DU;
float m_solderPasteLayerThickness3DU;
unsigned int m_trackCount;
@@ -40,7 +40,6 @@
#include <pcb_text.h>
#include <pcb_textbox.h>
#include <pcb_table.h>
#include <board_design_settings.h>
#include <pcb_painter.h> // for PCB_RENDER_SETTINGS
#include <zone.h>
#include <convert_basic_shapes_to_polygon.h>
@@ -110,8 +109,7 @@ void BOARD_ADAPTER::addText( const EDA_TEXT* aText, CONTAINER_2D_BASE* aContaine
SHAPE_POLY_SET finalPoly;
const PCB_TEXT* pcbText = static_cast<const PCB_TEXT*>( aOwner );
pcbText->TransformTextToPolySet( finalPoly, 0, m_board->GetDesignSettings().m_MaxError,
ERROR_INSIDE );
pcbText->TransformTextToPolySet( finalPoly, 0, aOwner->GetMaxError(), ERROR_INSIDE );
// Do not call finalPoly.Fracture() here: ConvertPolygonToTriangles() call it
// if needed, and Fracture() called twice can create bad results and is useless
@@ -188,23 +186,23 @@ void BOARD_ADAPTER::addShape( const PCB_DIMENSION_BASE* aDimension, CONTAINER_2D
void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aContainer,
PCB_LAYER_ID aLayerId,
const std::bitset<LAYER_3D_END>& aVisibilityFlags )
const std::bitset<LAYER_3D_END>& aFlags )
{
KIGFX::GAL_DISPLAY_OPTIONS empty_opts;
for( PCB_FIELD* field : aFootprint->GetFields() )
{
if( field->GetLayer() == aLayerId && field->IsVisible() )
{
if( !aVisibilityFlags.test( LAYER_FP_TEXT ) )
continue;
else if( field->IsReference() && !aVisibilityFlags.test( LAYER_FP_REFERENCES ) )
continue;
else if( field->IsValue() && !aVisibilityFlags.test( LAYER_FP_VALUES ) )
continue;
if( !aFlags.test( LAYER_FP_TEXT ) )
continue;
if( field->IsReference() && !aFlags.test( LAYER_FP_REFERENCES ) )
continue;
if( field->IsValue() && !aFlags.test( LAYER_FP_VALUES ) )
continue;
if( field->GetLayer() == aLayerId && field->IsVisible() )
addText( field, aContainer, field );
}
}
for( BOARD_ITEM* item : aFootprint->GraphicalItems() )
@@ -215,19 +213,17 @@ void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2
{
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
if( text->GetLayer() == aLayerId && text->IsVisible() )
{
if( !aVisibilityFlags.test( LAYER_FP_TEXT ) )
continue;
else if( text->GetText() == wxT( "${REFERENCE}" )
&& !aVisibilityFlags.test( LAYER_FP_REFERENCES ) )
continue;
else if( text->GetText() == wxT( "${VALUE}" )
&& !aVisibilityFlags.test( LAYER_FP_VALUES ) )
continue;
if( !aFlags.test( LAYER_FP_TEXT ) )
continue;
if( text->GetText() == wxT( "${REFERENCE}" ) && !aFlags.test( LAYER_FP_REFERENCES ) )
continue;
if( text->GetText() == wxT( "${VALUE}" ) && !aFlags.test( LAYER_FP_VALUES ) )
continue;
if( text->GetLayer() == aLayerId )
addText( text, aContainer, text );
}
break;
}
@@ -283,9 +279,8 @@ void BOARD_ADAPTER::addFootprintShapes( const FOOTPRINT* aFootprint, CONTAINER_2
}
void BOARD_ADAPTER::createTrackWithMargin( const PCB_TRACK* aTrack,
CONTAINER_2D_BASE* aDstContainer, PCB_LAYER_ID aLayer,
int aMargin )
void BOARD_ADAPTER::createTrackWithMargin( const PCB_TRACK* aTrack, CONTAINER_2D_BASE* aDstContainer,
PCB_LAYER_ID aLayer, int aMargin )
{
SFVEC2F start3DU = TO_SFVEC2F( aTrack->GetStart() );
SFVEC2F end3DU = TO_SFVEC2F( aTrack->GetEnd() );
@@ -321,7 +316,7 @@ void BOARD_ADAPTER::createTrackWithMargin( const PCB_TRACK* aTrack,
VECTOR2I center( arc->GetCenter() );
EDA_ANGLE arc_angle = arc->GetAngle();
double radius = arc->GetRadius();
int arcsegcount = GetArcToSegmentCount( KiROUND( radius ), ARC_HIGH_DEF, arc_angle );
int arcsegcount = GetArcToSegmentCount( KiROUND( radius ), arc->GetMaxError(), arc_angle );
int circlesegcount;
// Avoid arcs that cannot be drawn
@@ -341,8 +336,7 @@ void BOARD_ADAPTER::createTrackWithMargin( const PCB_TRACK* aTrack,
}
createArcSegments( center, arc->GetStart(), arc_angle, circlesegcount,
arc->GetWidth() + aMargin * 2,
aDstContainer, *arc );
arc->GetWidth() + aMargin * 2, aDstContainer, *arc );
break;
}
@@ -363,7 +357,6 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
PCB_LAYER_ID aLayer, const VECTOR2I& aMargin ) const
{
SHAPE_POLY_SET poly;
int maxError = GetBoard()->GetDesignSettings().m_MaxError;
VECTOR2I clearance = aMargin;
// Our shape-based builder can't handle negative or differing x:y clearance values (the
@@ -373,8 +366,7 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
// Of course being a hack it falls down when dealing with custom shape pads (where the size
// is only the size of the anchor), so for those we punt and just use aMargin.x.
if( ( clearance.x < 0 || clearance.x != clearance.y )
&& aPad->GetShape( aLayer ) != PAD_SHAPE::CUSTOM )
if( ( clearance.x < 0 || clearance.x != clearance.y ) && aPad->GetShape( aLayer ) != PAD_SHAPE::CUSTOM )
{
VECTOR2I dummySize = VECTOR2I( aPad->GetSize( aLayer ) ) + clearance + clearance;
@@ -383,23 +375,19 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
PAD dummy( *aPad );
dummy.SetSize( aLayer, VECTOR2I( dummySize.x, dummySize.y ) );
dummy.TransformShapeToPolygon( poly, aLayer, 0, maxError, ERROR_INSIDE );
dummy.TransformShapeToPolygon( poly, aLayer, 0, aPad->GetMaxError(), ERROR_INSIDE );
clearance = { 0, 0 };
// Remove group membership from dummy item before deleting
dummy.SetParentGroup( nullptr );
}
else if( aPad->GetShape( aLayer ) == PAD_SHAPE::CUSTOM )
{
// A custom pad can have many complex subshape items. To avoid issues, use its
// final polygon shape, not its basic shape set. One cannot apply the clearance
// to each subshape: it does no work
aPad->TransformShapeToPolygon( poly, aLayer, 0, maxError );
aPad->TransformShapeToPolygon( poly, aLayer, 0, aPad->GetMaxError() );
}
else
{
auto padShapes =
std::static_pointer_cast<SHAPE_COMPOUND>( aPad->GetEffectiveShape( aLayer ) );
auto padShapes = std::static_pointer_cast<SHAPE_COMPOUND>( aPad->GetEffectiveShape( aLayer ) );
for( const SHAPE* shape : padShapes->Shapes() )
{
@@ -451,7 +439,7 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
case SH_ARC:
{
const SHAPE_ARC* arc = static_cast<const SHAPE_ARC*>( shape );
SHAPE_LINE_CHAIN l = arc->ConvertToPolyline( maxError );
SHAPE_LINE_CHAIN l = arc->ConvertToPolyline( aPad->GetMaxError() );
for( int i = 0; i < l.SegmentCount(); i++ )
{
@@ -477,7 +465,7 @@ void BOARD_ADAPTER::createPadWithMargin( const PAD* aPad, CONTAINER_2D_BASE* aCo
if( !poly.IsEmpty() )
{
if( clearance.x )
poly.Inflate( clearance.x, CORNER_STRATEGY::ROUND_ALL_CORNERS, maxError );
poly.Inflate( clearance.x, CORNER_STRATEGY::ROUND_ALL_CORNERS, aPad->GetMaxError() );
// Add the PAD polygon
ConvertPolygonToTriangles( poly, *aContainer, m_biuTo3Dunits, *aPad );
@@ -505,7 +493,7 @@ void BOARD_ADAPTER::createPadWithHole( const PAD* aPad, CONTAINER_2D_BASE* aDstC
void BOARD_ADAPTER::addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aContainer,
PCB_LAYER_ID aLayerId, bool aSkipPlatedPads, bool aSkipNonPlatedPads )
PCB_LAYER_ID aLayerId )
{
for( PAD* pad : aFootprint->Pads() )
{
@@ -529,24 +517,6 @@ void BOARD_ADAPTER::addPads( const FOOTPRINT* aFootprint, CONTAINER_2D_BASE* aCo
switch( aLayerId )
{
case F_Cu:
if( aSkipPlatedPads && pad->FlashLayer( F_Mask ) )
continue;
if( aSkipNonPlatedPads && !pad->FlashLayer( F_Mask ) )
continue;
break;
case B_Cu:
if( aSkipPlatedPads && pad->FlashLayer( B_Mask ) )
continue;
if( aSkipNonPlatedPads && !pad->FlashLayer( B_Mask ) )
continue;
break;
case F_Mask:
case B_Mask:
margin.x += pad->GetSolderMaskExpansion( aLayerId );
@@ -619,22 +589,29 @@ void BOARD_ADAPTER::createArcSegments( const VECTOR2I& aCentre, const VECTOR2I&
void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner, PCB_LAYER_ID aLayer )
{
// The full width of the lines to create
int linewidth = aShape->GetWidth();
int margin = 0;
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
int linewidth = aShape->GetWidth();
int margin = 0;
bool isSolidFill = aShape->IsSolidFill();
bool isHatchedFill = aShape->IsHatchedFill();
if( IsSolderMaskLayer( aLayer )
&& aShape->HasSolderMask()
&& IsExternalCopperLayer( aShape->GetLayer() ) )
&& aShape->HasSolderMask()
&& IsExternalCopperLayer( aShape->GetLayer() ) )
{
margin = aShape->GetSolderMaskExpansion();
linewidth += margin * 2;
lineStyle = LINE_STYLE::SOLID;
if( isHatchedFill )
{
isSolidFill = true;
isHatchedFill = false;
}
}
float linewidth3DU = TO_3DU( linewidth );
LINE_STYLE lineStyle = aShape->GetStroke().GetLineStyle();
if( lineStyle <= LINE_STYLE::FIRST_TYPE )
{
switch( aShape->GetShape() )
@@ -645,7 +622,7 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
float innerR3DU = TO_3DU( aShape->GetRadius() ) - linewidth3DU / 2.0;
float outerR3DU = TO_3DU( aShape->GetRadius() ) + linewidth3DU / 2.0;
if( aShape->IsFilled() || innerR3DU <= 0.0 )
if( isSolidFill || innerR3DU <= 0.0 )
addFILLED_CIRCLE_2D( aContainer, center3DU, outerR3DU, *aOwner );
else
addRING_2D( aContainer, center3DU, innerR3DU, outerR3DU, *aOwner );
@@ -654,19 +631,18 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
}
case SHAPE_T::RECTANGLE:
if( aShape->IsFilled() )
if( isSolidFill )
{
SHAPE_POLY_SET polyList;
aShape->TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, ARC_HIGH_DEF,
aShape->TransformShapeToPolySet( polyList, UNDEFINED_LAYER, 0, aShape->GetMaxError(),
ERROR_INSIDE );
polyList.Simplify();
if( margin != 0 )
{
polyList.Inflate( margin, CORNER_STRATEGY::ROUND_ALL_CORNERS,
GetBoard()->GetDesignSettings().m_MaxError );
polyList.Inflate( margin, CORNER_STRATEGY::ROUND_ALL_CORNERS, aShape->GetMaxError() );
}
ConvertPolygonToTriangles( polyList, *aContainer, m_biuTo3Dunits, *aOwner );
@@ -701,11 +677,10 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
break;
case SHAPE_T::BEZIER:
case SHAPE_T::POLY:
{
SHAPE_POLY_SET polyList;
aShape->TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, ARC_HIGH_DEF,
aShape->TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, aShape->GetMaxError(),
ERROR_INSIDE );
// Some polygons can be a bit complex (especially when coming from a
@@ -721,13 +696,56 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
CORNER_STRATEGY cornerStr = margin >= 0 ? CORNER_STRATEGY::ROUND_ALL_CORNERS
: CORNER_STRATEGY::ALLOW_ACUTE_CORNERS;
polyList.Inflate( margin, cornerStr, GetBoard()->GetDesignSettings().m_MaxError );
polyList.Inflate( margin, cornerStr, aShape->GetMaxError() );
}
ConvertPolygonToTriangles( polyList, *aContainer, m_biuTo3Dunits, *aOwner );
break;
}
case SHAPE_T::POLY:
{
if( isSolidFill )
{
SHAPE_POLY_SET polyList;
aShape->TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, aShape->GetMaxError(),
ERROR_INSIDE );
// Some polygons can be a bit complex (especially when coming from a
// picture of a text converted to a polygon
// So call Simplify before calling ConvertPolygonToTriangles, just in case.
polyList.Simplify();
if( polyList.IsEmpty() ) // Just for caution
break;
if( margin != 0 )
{
CORNER_STRATEGY cornerStr = margin >= 0 ? CORNER_STRATEGY::ROUND_ALL_CORNERS
: CORNER_STRATEGY::ALLOW_ACUTE_CORNERS;
polyList.Inflate( margin, cornerStr, aShape->GetMaxError() );
}
ConvertPolygonToTriangles( polyList, *aContainer, m_biuTo3Dunits, *aOwner );
}
else
{
std::vector<VECTOR2I> pts = aShape->GetCorners();
for( int i = 0; i < pts.size() - 1; i++ )
{
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( pts[i] ), TO_SFVEC2F( pts[i + 1] ), linewidth3DU,
*aOwner );
}
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( pts[pts.size() - 1] ), TO_SFVEC2F( pts[0] ), linewidth3DU,
*aOwner );
}
break;
}
default:
wxFAIL_MSG( wxT( "BOARD_ADAPTER::addShape no implementation for " )
+ aShape->SHAPE_T_asString() );
@@ -759,6 +777,9 @@ void BOARD_ADAPTER::addShape( const PCB_SHAPE* aShape, CONTAINER_2D_BASE* aConta
for( SHAPE* shape : shapes )
delete shape;
}
if( isHatchedFill )
ConvertPolygonToTriangles( aShape->GetHatching(), *aContainer, m_biuTo3Dunits, *aOwner );
}
@@ -782,7 +803,7 @@ void BOARD_ADAPTER::addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aC
{
SHAPE_POLY_SET polyList;
aTextBox->PCB_SHAPE::TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, ARC_HIGH_DEF,
aTextBox->PCB_SHAPE::TransformShapeToPolygon( polyList, UNDEFINED_LAYER, 0, aTextBox->GetMaxError(),
ERROR_INSIDE );
ConvertPolygonToTriangles( polyList, *aContainer, m_biuTo3Dunits, *aOwner );
@@ -793,11 +814,18 @@ void BOARD_ADAPTER::addShape( const PCB_TEXTBOX* aTextBox, CONTAINER_2D_BASE* aC
void BOARD_ADAPTER::addTable( const PCB_TABLE* aTable, CONTAINER_2D_BASE* aContainer,
const BOARD_ITEM* aOwner )
{
// JEY TODO: tables
// add borders
aTable->DrawBorders(
[&]( const VECTOR2I& ptA, const VECTOR2I& ptB, const STROKE_PARAMS& stroke )
{
addROUND_SEGMENT_2D( aContainer, TO_SFVEC2F( ptA ), TO_SFVEC2F( ptB ),
TO_3DU( stroke.GetWidth() ), *aOwner );
} );
for( PCB_TABLECELL* cell : aTable->GetCells() )
addText( cell, aContainer, aOwner );
{
if( cell->GetColSpan() > 0 && cell->GetRowSpan() > 0 )
addText( cell, aContainer, aOwner );
}
}
@@ -805,8 +833,7 @@ void BOARD_ADAPTER::addSolidAreasShapes( const ZONE* aZone, CONTAINER_2D_BASE* a
PCB_LAYER_ID aLayerId )
{
// This convert the poly in outline and holes
ConvertPolygonToTriangles( *aZone->GetFilledPolysList( aLayerId ), *aContainer, m_biuTo3Dunits,
*aZone );
ConvertPolygonToTriangles( *aZone->GetFilledPolysList( aLayerId ), *aContainer, m_biuTo3Dunits, *aZone );
}
@@ -825,8 +852,7 @@ void BOARD_ADAPTER::buildPadOutlineAsSegments( const PAD* aPad, PCB_LAYER_ID aLa
else
{
// For other shapes, add outlines as thick segments in polygon buffer
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon( aLayer,
ERROR_INSIDE );
const std::shared_ptr<SHAPE_POLY_SET>& corners = aPad->GetEffectivePolygon( aLayer, ERROR_INSIDE );
const SHAPE_LINE_CHAIN& path = corners->COutline( 0 );
for( int j = 0; j < path.PointCount(); j++ )
+306 -237
View File
@@ -23,34 +23,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
/**
* @file create_layer_items.cpp
* @brief This file implements the creation of the pcb board.
*
* It is based on the function found in the files:
* board_items_to_polygon_shape_transform.cpp
* board_items_to_polygon_shape_transform.cpp
*/
#include "board_adapter.h"
#include "../3d_rendering/raytracing/shapes2D/filled_circle_2d.h"
#include "raytracing/shapes2D/triangle_2d.h"
#include <board_design_settings.h>
#include <board.h>
#include <footprint.h>
#include <layer_range.h>
#include <lset.h>
#include <pad.h>
#include <pcb_text.h>
#include <pcb_textbox.h>
#include <pcb_table.h>
#include <pcb_shape.h>
#include <zone.h>
#include <convert_basic_shapes_to_polygon.h>
#include <trigo.h>
#include <vector>
#include <thread>
#include <core/arraydim.h>
#include <algorithm>
#include <atomic>
#include <wx/log.h>
@@ -59,9 +42,6 @@
#include <core/profile.h>
#endif
/*
* This is used to draw pad outlines on silk layers.
*/
@@ -97,12 +77,71 @@ void transformFPShapesToPolySet( const FOOTPRINT* aFootprint, PCB_LAYER_ID aLaye
if( item->Type() == PCB_SHAPE_T || BaseType( item->Type() ) == PCB_DIMENSION_T )
{
if( item->GetLayer() == aLayer )
item->TransformShapeToPolygon( aBuffer, aLayer, 0, aMaxError, aErrorLoc );
item->TransformShapeToPolySet( aBuffer, aLayer, 0, aMaxError, aErrorLoc );
}
}
}
void transformFPTextToPolySet( const FOOTPRINT* aFootprint, PCB_LAYER_ID aLayer,
const std::bitset<LAYER_3D_END>& aFlags, SHAPE_POLY_SET& aBuffer,
int aMaxError, ERROR_LOC aErrorLoc )
{
for( BOARD_ITEM* item : aFootprint->GraphicalItems() )
{
if( item->GetLayer() != aLayer )
continue;
if( item->Type() == PCB_TEXT_T )
{
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
if( !aFlags.test( LAYER_FP_TEXT ) )
continue;
if( text->GetText() == wxT( "${REFERENCE}" ) && !aFlags.test( LAYER_FP_REFERENCES ) )
continue;
if( text->GetText() == wxT( "${VALUE}" ) && !aFlags.test( LAYER_FP_VALUES ) )
continue;
if( aLayer != UNDEFINED_LAYER && text->GetLayer() == aLayer )
text->TransformTextToPolySet( aBuffer, 0, aMaxError, aErrorLoc );
}
if( item->Type() == PCB_TEXTBOX_T )
{
PCB_TEXTBOX* textbox = static_cast<PCB_TEXTBOX*>( item );
if( aLayer != UNDEFINED_LAYER && textbox->GetLayer() == aLayer )
{
// border
if( textbox->IsBorderEnabled() )
textbox->PCB_SHAPE::TransformShapeToPolygon( aBuffer, aLayer, 0, aMaxError, aErrorLoc );
// text
textbox->TransformTextToPolySet( aBuffer, 0, aMaxError, aErrorLoc );
}
}
}
for( const PCB_FIELD* field : aFootprint->GetFields() )
{
if( !aFlags.test( LAYER_FP_TEXT ) )
continue;
if( field->IsReference() && !aFlags.test( LAYER_FP_REFERENCES ) )
continue;
if( field->IsValue() && !aFlags.test( LAYER_FP_VALUES ) )
continue;
if( field->GetLayer() == aLayer && field->IsVisible() )
field->TransformTextToPolySet( aBuffer, 0, aMaxError, aErrorLoc );
}
}
void BOARD_ADAPTER::destroyLayers()
{
#define DELETE_AND_FREE( ptr ) \
@@ -121,8 +160,6 @@ void BOARD_ADAPTER::destroyLayers()
DELETE_AND_FREE_MAP( m_layers_poly );
DELETE_AND_FREE( m_frontPlatedPadAndGraphicPolys )
DELETE_AND_FREE( m_backPlatedPadAndGraphicPolys )
DELETE_AND_FREE( m_frontPlatedCopperPolys )
DELETE_AND_FREE( m_backPlatedCopperPolys )
@@ -182,13 +219,10 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
trackList.clear();
trackList.reserve( m_board->Tracks().size() );
int maxError = m_board->GetDesignSettings().m_MaxError;
for( PCB_TRACK* track : m_board->Tracks() )
{
// Skip tracks (not vias theyt are on more than one layer ) on disabled layers
if( track->Type() != PCB_VIA_T
&& !Is3dLayerEnabled( track->GetLayer(), visibilityFlags ) )
if( track->Type() != PCB_VIA_T && !Is3dLayerEnabled( track->GetLayer(), visibilityFlags ) )
{
continue;
}
@@ -240,8 +274,6 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
if( cfg.DifferentiatePlatedCopper() )
{
m_frontPlatedPadAndGraphicPolys = new SHAPE_POLY_SET;
m_backPlatedPadAndGraphicPolys = new SHAPE_POLY_SET;
m_frontPlatedCopperPolys = new SHAPE_POLY_SET;
m_backPlatedCopperPolys = new SHAPE_POLY_SET;
@@ -261,7 +293,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// Create tracks as objects and add it to container
for( PCB_LAYER_ID layer : layer_ids )
{
wxASSERT( m_layerMap.find( layer ) != m_layerMap.end() );
wxASSERT( m_layerMap.contains( layer ) );
BVH_CONTAINER_2D *layerContainer = m_layerMap[layer];
@@ -272,11 +304,8 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
continue;
// Skip vias annulus when not flashed on this layer
if( track->Type() == PCB_VIA_T
&& !static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
{
if( track->Type() == PCB_VIA_T && !static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
continue;
}
// Add object item to layer container
createTrackWithMargin( track, layerContainer, layer );
@@ -319,7 +348,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
BVH_CONTAINER_2D *layerHoleContainer = nullptr;
// Check if the layer is already created
if( m_layerHoleMap.find( layer ) == m_layerHoleMap.end() )
if( !m_layerHoleMap.contains( layer ) )
{
// not found, create a new container
layerHoleContainer = new BVH_CONTAINER_2D;
@@ -332,17 +361,14 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
}
// Add a hole for this layer
layerHoleContainer->Add( new FILLED_CIRCLE_2D( via_center,
hole_inner_radius + thickness,
layerHoleContainer->Add( new FILLED_CIRCLE_2D( via_center, hole_inner_radius + thickness,
*track ) );
}
else if( layer == layer_ids[0] ) // it only adds once the THT holes
{
// Add through hole object
m_TH_ODs.Add( new FILLED_CIRCLE_2D( via_center, hole_inner_radius + thickness,
*track ) );
m_viaTH_ODs.Add( new FILLED_CIRCLE_2D( via_center, hole_inner_radius + thickness,
*track ) );
m_TH_ODs.Add( new FILLED_CIRCLE_2D( via_center, hole_inner_radius + thickness, *track ) );
m_viaTH_ODs.Add( new FILLED_CIRCLE_2D( via_center, hole_inner_radius + thickness, *track ) );
if( cfg.clip_silk_on_via_annuli && ring_radius > 0.0 )
m_viaAnnuli.Add( new FILLED_CIRCLE_2D( via_center, ring_radius, *track ) );
@@ -354,12 +380,12 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
if( cfg.DifferentiatePlatedCopper() && layer == F_Cu )
{
track->TransformShapeToPolygon( *m_frontPlatedCopperPolys, F_Cu, 0, maxError,
track->TransformShapeToPolygon( *m_frontPlatedCopperPolys, F_Cu, 0, track->GetMaxError(),
ERROR_INSIDE );
}
else if( cfg.DifferentiatePlatedCopper() && layer == B_Cu )
{
track->TransformShapeToPolygon( *m_backPlatedCopperPolys, B_Cu, 0, maxError,
track->TransformShapeToPolygon( *m_backPlatedCopperPolys, B_Cu, 0, track->GetMaxError(),
ERROR_INSIDE );
}
}
@@ -393,13 +419,13 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
SHAPE_POLY_SET *layerInnerHolesPoly = nullptr;
// Check if the layer is already created
if( m_layerHoleOdPolys.find( layer ) == m_layerHoleOdPolys.end() )
if( !m_layerHoleOdPolys.contains( layer ) )
{
// not found, create a new container
layerOuterHolesPoly = new SHAPE_POLY_SET;
m_layerHoleOdPolys[layer] = layerOuterHolesPoly;
wxASSERT( m_layerHoleIdPolys.find( layer ) == m_layerHoleIdPolys.end() );
wxASSERT( !m_layerHoleIdPolys.contains( layer ) );
layerInnerHolesPoly = new SHAPE_POLY_SET;
m_layerHoleIdPolys[layer] = layerInnerHolesPoly;
@@ -409,7 +435,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// found
layerOuterHolesPoly = m_layerHoleOdPolys[layer];
wxASSERT( m_layerHoleIdPolys.find( layer ) != m_layerHoleIdPolys.end() );
wxASSERT( m_layerHoleIdPolys.contains( layer ) );
layerInnerHolesPoly = m_layerHoleIdPolys[layer];
}
@@ -417,11 +443,11 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
const int holediameter = via->GetDrillValue();
const int hole_outer_radius = (holediameter / 2) + GetHolePlatingThickness();
TransformCircleToPolygon( *layerOuterHolesPoly, via->GetStart(),
hole_outer_radius, maxError, ERROR_INSIDE );
TransformCircleToPolygon( *layerOuterHolesPoly, via->GetStart(), hole_outer_radius,
via->GetMaxError(), ERROR_INSIDE );
TransformCircleToPolygon( *layerInnerHolesPoly, via->GetStart(),
holediameter / 2, maxError, ERROR_INSIDE );
TransformCircleToPolygon( *layerInnerHolesPoly, via->GetStart(), holediameter / 2,
via->GetMaxError(), ERROR_INSIDE );
}
else if( layer == layer_ids[0] ) // it only adds once the THT holes
{
@@ -431,16 +457,16 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// Add through hole contours
TransformCircleToPolygon( m_TH_ODPolys, via->GetStart(), hole_outer_radius,
maxError, ERROR_INSIDE );
via->GetMaxError(), ERROR_INSIDE );
// Add same thing for vias only
TransformCircleToPolygon( m_viaTH_ODPolys, via->GetStart(), hole_outer_radius,
maxError, ERROR_INSIDE );
via->GetMaxError(), ERROR_INSIDE );
if( cfg.clip_silk_on_via_annuli )
{
TransformCircleToPolygon( m_viaAnnuliPolys, via->GetStart(),
hole_outer_ring_radius, maxError, ERROR_INSIDE );
TransformCircleToPolygon( m_viaAnnuliPolys, via->GetStart(), hole_outer_ring_radius,
via->GetMaxError(), ERROR_INSIDE );
}
}
}
@@ -452,7 +478,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
for( PCB_LAYER_ID layer : layer_ids )
{
wxASSERT( m_layers_poly.find( layer ) != m_layers_poly.end() );
wxASSERT( m_layers_poly.contains( layer ) );
SHAPE_POLY_SET *layerPoly = m_layers_poly[layer];
@@ -467,14 +493,11 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
continue;
// Skip vias annulus when not flashed on this layer
if( track->Type() == PCB_VIA_T
&& !static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
{
if( track->Type() == PCB_VIA_T && !static_cast<const PCB_VIA*>( track )->FlashLayer( layer ) )
continue;
}
// Add the track/via contour
track->TransformShapeToPolygon( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
track->TransformShapeToPolygon( *layerPoly, layer, 0, track->GetMaxError(), ERROR_INSIDE );
}
}
}
@@ -492,7 +515,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// The hole in the body is inflated by copper thickness, if not plated, no copper
int inflate = 0;
if( pad->GetAttribute () != PAD_ATTRIB::NPTH )
if( pad->GetAttribute() != PAD_ATTRIB::NPTH )
inflate = KiROUND( GetHolePlatingThickness() / 2.0 );
m_holeCount++;
@@ -524,72 +547,56 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// The hole in the body is inflated by copper thickness.
const int inflate = GetHolePlatingThickness();
if( pad->GetAttribute () != PAD_ATTRIB::NPTH )
if( pad->GetAttribute() != PAD_ATTRIB::NPTH )
{
if( cfg.clip_silk_on_via_annuli )
pad->TransformHoleToPolygon( m_viaAnnuliPolys, inflate, maxError, ERROR_INSIDE );
pad->TransformHoleToPolygon( m_viaAnnuliPolys, inflate, pad->GetMaxError(), ERROR_INSIDE );
pad->TransformHoleToPolygon( m_TH_ODPolys, inflate, maxError, ERROR_INSIDE );
pad->TransformHoleToPolygon( m_TH_ODPolys, inflate, pad->GetMaxError(), ERROR_INSIDE );
}
else
{
// If not plated, no copper.
if( cfg.clip_silk_on_via_annuli )
pad->TransformHoleToPolygon( m_viaAnnuliPolys, 0, maxError, ERROR_INSIDE );
pad->TransformHoleToPolygon( m_viaAnnuliPolys, 0, pad->GetMaxError(), ERROR_INSIDE );
pad->TransformHoleToPolygon( m_NPTH_ODPolys, 0, maxError, ERROR_INSIDE );
pad->TransformHoleToPolygon( m_NPTH_ODPolys, 0, pad->GetMaxError(), ERROR_INSIDE );
}
}
}
// Add footprints PADs objects to containers
// Add footprints copper items (pads, shapes and text) to containers
for( PCB_LAYER_ID layer : layer_ids )
{
wxASSERT( m_layerMap.find( layer ) != m_layerMap.end() );
wxASSERT( m_layerMap.contains( layer ) );
BVH_CONTAINER_2D *layerContainer = m_layerMap[layer];
// ADD PADS
for( FOOTPRINT* footprint : m_board->Footprints() )
for( FOOTPRINT* fp : m_board->Footprints() )
{
addPads( footprint, layerContainer, layer, cfg.DifferentiatePlatedCopper(), false );
addPads( fp, layerContainer, layer );
addFootprintShapes( fp, layerContainer, layer, visibilityFlags );
// Micro-wave footprints may have items on copper layers
addFootprintShapes( footprint, layerContainer, layer, visibilityFlags );
}
}
// Add footprints PADs poly contours (vertical outlines)
if( cfg.opengl_copper_thickness && cfg.engine == RENDER_ENGINE::OPENGL )
{
for( PCB_LAYER_ID layer : layer_ids )
{
wxASSERT( m_layers_poly.find( layer ) != m_layers_poly.end() );
SHAPE_POLY_SET *layerPoly = m_layers_poly[layer];
// Add pads to polygon list
for( FOOTPRINT* footprint : m_board->Footprints() )
// Add copper item to the plated copper polygon list if required
if( cfg.DifferentiatePlatedCopper() && IsExternalCopperLayer( layer ) )
{
// Note: NPTH pads are not drawn on copper layers when the pad has same shape as
// its hole
footprint->TransformPadsToPolySet( *layerPoly, layer, 0, maxError, ERROR_INSIDE,
true, cfg.DifferentiatePlatedCopper(), false );
SHAPE_POLY_SET* layerPoly = layer == F_Cu ? m_frontPlatedCopperPolys : m_backPlatedCopperPolys;
transformFPShapesToPolySet( footprint, layer, *layerPoly, maxError, ERROR_INSIDE );
fp->TransformPadsToPolySet( *layerPoly, layer, 0, fp->GetMaxError(), ERROR_INSIDE );
transformFPTextToPolySet( fp, layer, visibilityFlags, *layerPoly, fp->GetMaxError(), ERROR_INSIDE );
transformFPShapesToPolySet( fp, layer, *layerPoly, fp->GetMaxError(), ERROR_INSIDE );
}
}
if( cfg.DifferentiatePlatedCopper() )
{
// ADD PLATED PADS contours
for( FOOTPRINT* footprint : m_board->Footprints() )
// Add copper item to poly contours (vertical outlines) if required
if( cfg.opengl_copper_thickness && cfg.engine == RENDER_ENGINE::OPENGL )
{
footprint->TransformPadsToPolySet( *m_frontPlatedPadAndGraphicPolys, F_Cu, 0, maxError,
ERROR_INSIDE, true, false, true );
wxASSERT( m_layers_poly.contains( layer ) );
footprint->TransformPadsToPolySet( *m_backPlatedPadAndGraphicPolys, B_Cu, 0, maxError,
ERROR_INSIDE, true, false, true );
SHAPE_POLY_SET* layerPoly = m_layers_poly[layer];
fp->TransformPadsToPolySet( *layerPoly, layer, 0, fp->GetMaxError(), ERROR_INSIDE );
transformFPTextToPolySet( fp, layer, visibilityFlags, *layerPoly, fp->GetMaxError(), ERROR_INSIDE );
transformFPShapesToPolySet( fp, layer, *layerPoly, fp->GetMaxError(), ERROR_INSIDE );
}
}
}
@@ -597,7 +604,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
// Add graphic item on copper layers to object containers
for( PCB_LAYER_ID layer : layer_ids )
{
wxASSERT( m_layerMap.find( layer ) != m_layerMap.end() );
wxASSERT( m_layerMap.contains( layer ) );
BVH_CONTAINER_2D *layerContainer = m_layerMap[layer];
@@ -633,72 +640,59 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
addShape( static_cast<PCB_DIMENSION_BASE*>( item ), layerContainer, item );
break;
case PCB_REFERENCE_IMAGE_T: // ignore
break;
default:
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ),
item->Type() );
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() );
break;
}
// add also this shape to the plated copper polygon list if required
if( cfg.DifferentiatePlatedCopper() )
// Add copper item to the plated copper polygon list if required
if( cfg.DifferentiatePlatedCopper() && IsExternalCopperLayer( layer ) )
{
SHAPE_POLY_SET* copperPolys = layer == F_Cu ? m_frontPlatedCopperPolys : m_backPlatedCopperPolys;
// Note: for TEXT and TEXTBOX, TransformShapeToPolygon returns the bounding
// box shape, not the exact text shape. So it is not used for these items
if( layer == F_Cu || layer == B_Cu )
if( item->Type() == PCB_TEXTBOX_T )
{
SHAPE_POLY_SET* platedCopperPolys = layer == F_Cu
? m_frontPlatedCopperPolys
: m_backPlatedCopperPolys;
PCB_TEXTBOX* text_box = static_cast<PCB_TEXTBOX*>( item );
text_box->TransformTextToPolySet( *copperPolys, 0, text_box->GetMaxError(), ERROR_INSIDE );
if( item->Type() == PCB_TEXTBOX_T )
{
PCB_TEXTBOX* text_box = static_cast<PCB_TEXTBOX*>( item );
text_box->TransformTextToPolySet( *platedCopperPolys,
0, maxError, ERROR_INSIDE );
// Add box outlines
text_box->PCB_SHAPE::TransformShapeToPolygon( *platedCopperPolys, layer,
0, maxError, ERROR_INSIDE );
}
else if( item->Type() == PCB_TEXT_T )
{
static_cast<PCB_TEXT*>( item )->TransformTextToPolySet(
*platedCopperPolys,
0, maxError, ERROR_INSIDE );
}
else
item->TransformShapeToPolygon( *platedCopperPolys, layer,
0, maxError, ERROR_INSIDE );
// Add box outlines
text_box->PCB_SHAPE::TransformShapeToPolygon( *copperPolys, layer, 0, text_box->GetMaxError(),
ERROR_INSIDE );
}
else if( item->Type() == PCB_TEXT_T )
{
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
text->TransformTextToPolySet( *copperPolys, 0, text->GetMaxError(), ERROR_INSIDE );
}
else if( item->Type() != PCB_REFERENCE_IMAGE_T )
{
item->TransformShapeToPolySet( *copperPolys, layer, 0, item->GetMaxError(), ERROR_INSIDE );
}
}
}
}
// Add graphic item on copper layers to poly contours (vertical outlines)
if( cfg.opengl_copper_thickness && cfg.engine == RENDER_ENGINE::OPENGL )
{
for( PCB_LAYER_ID layer : layer_ids )
{
wxASSERT( m_layers_poly.find( layer ) != m_layers_poly.end() );
SHAPE_POLY_SET *layerPoly = m_layers_poly[layer];
// Add graphic items on copper layers (texts and other )
for( BOARD_ITEM* item : m_board->Drawings() )
// Add copper item to poly contours (vertical outlines) if required
if( cfg.opengl_copper_thickness && cfg.engine == RENDER_ENGINE::OPENGL )
{
if( !item->IsOnLayer( layer ) )
continue;
wxASSERT( m_layers_poly.contains( layer ) );
SHAPE_POLY_SET *layerPoly = m_layers_poly[layer];
switch( item->Type() )
{
case PCB_SHAPE_T:
item->TransformShapeToPolygon( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
item->TransformShapeToPolySet( *layerPoly, layer, 0, item->GetMaxError(), ERROR_INSIDE );
break;
case PCB_TEXT_T:
{
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
text->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
text->TransformTextToPolySet( *layerPoly, 0, text->GetMaxError(), ERROR_INSIDE );
break;
}
@@ -706,17 +700,54 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
PCB_TEXTBOX* textbox = static_cast<PCB_TEXTBOX*>( item );
textbox->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
if( textbox->IsBorderEnabled() )
{
textbox->PCB_SHAPE::TransformShapeToPolygon( *layerPoly, layer, 0, textbox->GetMaxError(),
ERROR_INSIDE );
}
textbox->TransformTextToPolySet( *layerPoly, 0, textbox->GetMaxError(), ERROR_INSIDE );
break;
}
case PCB_TABLE_T:
// JEY TODO: tables
{
PCB_TABLE* table = static_cast<PCB_TABLE*>( item );
for( PCB_TABLECELL* cell : table->GetCells() )
cell->TransformTextToPolySet( *layerPoly, 0, cell->GetMaxError(), ERROR_INSIDE );
table->DrawBorders(
[&]( const VECTOR2I& ptA, const VECTOR2I& ptB,
const STROKE_PARAMS& stroke )
{
SHAPE_SEGMENT seg( ptA, ptB, stroke.GetWidth() );
seg.TransformToPolygon( *layerPoly, table->GetMaxError(), ERROR_INSIDE );
} );
break;
}
case PCB_DIM_ALIGNED_T:
case PCB_DIM_CENTER_T:
case PCB_DIM_RADIAL_T:
case PCB_DIM_ORTHOGONAL_T:
case PCB_DIM_LEADER_T:
{
PCB_DIMENSION_BASE* dimension = static_cast<PCB_DIMENSION_BASE*>( item );
dimension->TransformTextToPolySet( *layerPoly, 0, dimension->GetMaxError(), ERROR_INSIDE );
for( const std::shared_ptr<SHAPE>& shape : dimension->GetShapes() )
shape->TransformToPolygon( *layerPoly, dimension->GetMaxError(), ERROR_INSIDE );
break;
}
case PCB_REFERENCE_IMAGE_T: // ignore
break;
default:
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ),
item->Type() );
wxLogTrace( m_logTrace, wxT( "createLayers: item type: %d not implemented" ), item->Type() );
break;
}
}
@@ -738,15 +769,11 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
zones.emplace_back( std::make_pair( zone, layer ) );
layer_lock.emplace( layer, std::make_unique<std::mutex>() );
if( cfg.DifferentiatePlatedCopper() && layer == F_Cu )
if( cfg.DifferentiatePlatedCopper() && IsExternalCopperLayer( layer ) )
{
zone->TransformShapeToPolygon( *m_frontPlatedCopperPolys, F_Cu, 0, maxError,
ERROR_INSIDE );
}
else if( cfg.DifferentiatePlatedCopper() && layer == B_Cu )
{
zone->TransformShapeToPolygon( *m_backPlatedCopperPolys, B_Cu, 0, maxError,
ERROR_INSIDE );
SHAPE_POLY_SET* copperPolys = layer == F_Cu ? m_frontPlatedCopperPolys : m_backPlatedCopperPolys;
zone->TransformShapeToPolygon( *copperPolys, layer, 0, zone->GetMaxError(), ERROR_INSIDE );
}
}
}
@@ -773,19 +800,19 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
PCB_LAYER_ID layer = zones[areaId].second;
auto layerContainer = m_layerMap.find( layer );
auto layerPolyContainer = m_layers_poly.find( layer );
if( layerContainer != m_layerMap.end() )
addSolidAreasShapes( zone, layerContainer->second, layer );
if( m_layerMap.contains( layer ) )
addSolidAreasShapes( zone, m_layerMap[layer], layer );
if( cfg.opengl_copper_thickness && cfg.engine == RENDER_ENGINE::OPENGL
&& layerPolyContainer != m_layers_poly.end() )
&& m_layers_poly.contains( layer ) )
{
auto mut_it = layer_lock.find( layer );
std::lock_guard< std::mutex > lock( *( mut_it->second ) );
zone->TransformSolidAreasShapesToPolygon( layer, *layerPolyContainer->second );
if( mut_it != layer_lock.end() )
{
std::lock_guard< std::mutex > lock( *( mut_it->second ) );
zone->TransformSolidAreasShapesToPolygon( layer, *m_layers_poly[layer] );
}
}
}
@@ -828,7 +855,52 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
Dwgs_User,
Cmts_User,
Eco1_User,
Eco2_User
Eco2_User,
User_1,
User_2,
User_3,
User_4,
User_5,
User_6,
User_7,
User_8,
User_9,
User_10,
User_11,
User_12,
User_13,
User_14,
User_15,
User_16,
User_17,
User_18,
User_19,
User_20,
User_21,
User_22,
User_23,
User_24,
User_25,
User_26,
User_27,
User_28,
User_29,
User_30,
User_31,
User_32,
User_33,
User_34,
User_35,
User_36,
User_37,
User_38,
User_39,
User_40,
User_41,
User_42,
User_43,
User_44,
User_45,
} );
std::bitset<LAYER_3D_END> enabledFlags = visibilityFlags;
@@ -876,7 +948,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
break;
case PCB_TABLE_T:
// JEY TODO: tables
addTable( static_cast<PCB_TABLE*>( item ), layerContainer, item );
break;
case PCB_DIM_ALIGNED_T:
@@ -901,11 +973,15 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
continue;
// Only vias on a external copper layer can have a solder mask
PCB_LAYER_ID copper_layer = layer == F_Mask ? F_Cu : B_Cu;
PCB_LAYER_ID copper_layer = ( layer == F_Mask ) ? F_Cu : B_Cu;
if( track->Type() == PCB_VIA_T
&& !static_cast<const PCB_VIA*>( track )->FlashLayer( copper_layer ) )
continue;
if( track->Type() == PCB_VIA_T )
{
const PCB_VIA* via = static_cast<const PCB_VIA*>( track );
if( !via->FlashLayer( copper_layer ) )
continue;
}
int maskExpansion = track->GetSolderMaskExpansion();
createTrackWithMargin( track, layerContainer, layer, maskExpansion );
@@ -929,7 +1005,7 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
}
else
{
addPads( footprint, layerContainer, layer, false, false );
addPads( footprint, layerContainer, layer );
}
addFootprintShapes( footprint, layerContainer, layer, visibilityFlags );
@@ -960,14 +1036,14 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
switch( item->Type() )
{
case PCB_SHAPE_T:
item->TransformShapeToPolygon( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
item->TransformShapeToPolySet( *layerPoly, layer, 0, item->GetMaxError(), ERROR_INSIDE );
break;
case PCB_TEXT_T:
{
PCB_TEXT* text = static_cast<PCB_TEXT*>( item );
text->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
text->TransformTextToPolySet( *layerPoly, 0, text->GetMaxError(), ERROR_INSIDE );
break;
}
@@ -975,13 +1051,33 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
PCB_TEXTBOX* textbox = static_cast<PCB_TEXTBOX*>( item );
textbox->TransformTextToPolySet( *layerPoly, 0, maxError, ERROR_INSIDE );
if( textbox->IsBorderEnabled() )
{
textbox->PCB_SHAPE::TransformShapeToPolygon( *layerPoly, layer, 0, textbox->GetMaxError(),
ERROR_INSIDE );
}
textbox->TransformTextToPolySet( *layerPoly, 0, textbox->GetMaxError(), ERROR_INSIDE );
break;
}
case PCB_TABLE_T:
// JEY TODO: tables
{
PCB_TABLE* table = static_cast<PCB_TABLE*>( item );
for( PCB_TABLECELL* cell : table->GetCells() )
cell->TransformTextToPolySet( *layerPoly, 0, cell->GetMaxError(), ERROR_INSIDE );
table->DrawBorders(
[&]( const VECTOR2I& ptA, const VECTOR2I& ptB,
const STROKE_PARAMS& stroke )
{
SHAPE_SEGMENT seg( ptA, ptB, stroke.GetWidth() );
seg.TransformToPolygon( *layerPoly, table->GetMaxError(), ERROR_INSIDE );
} );
break;
}
default:
break;
@@ -995,12 +1091,23 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
for( PCB_TRACK* track : m_board->Tracks() )
{
if( track->Type() == PCB_VIA_T
&& static_cast<const PCB_VIA*>( track )->FlashLayer( layer )
&& !static_cast<const PCB_VIA*>( track )->IsTented( layer ) )
if( track->Type() == PCB_VIA_T )
{
track->TransformShapeToPolygon( *layerPoly, layer, maskExpansion, maxError,
ERROR_INSIDE );
const PCB_VIA* via = static_cast<const PCB_VIA*>( track );
if( via->FlashLayer( layer ) && !via->IsTented( layer ) )
{
track->TransformShapeToPolygon( *layerPoly, layer, maskExpansion, track->GetMaxError(),
ERROR_INSIDE );
}
}
else
{
if( track->HasSolderMask() )
{
track->TransformShapeToPolySet( *layerPoly, layer, maskExpansion, track->GetMaxError(),
ERROR_INSIDE );
}
}
}
}
@@ -1016,21 +1123,19 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
{
if( pad->IsOnLayer( layer ) )
{
buildPadOutlineAsPolygon( pad, layer, *layerPoly, linewidth, maxError,
buildPadOutlineAsPolygon( pad, layer, *layerPoly, linewidth, pad->GetMaxError(),
ERROR_INSIDE );
}
}
}
else
{
footprint->TransformPadsToPolySet( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
footprint->TransformPadsToPolySet( *layerPoly, layer, 0, footprint->GetMaxError(), ERROR_INSIDE );
}
// On tech layers, use a poor circle approximation, only for texts (stroke font)
footprint->TransformFPTextToPolySet( *layerPoly, layer, 0, maxError, ERROR_INSIDE );
// Add the remaining things with dynamic seg count for circles
transformFPShapesToPolySet( footprint, layer, *layerPoly, maxError, ERROR_INSIDE );
transformFPTextToPolySet( footprint, layer, visibilityFlags, *layerPoly, footprint->GetMaxError(),
ERROR_INSIDE );
transformFPShapesToPolySet( footprint, layer, *layerPoly, footprint->GetMaxError(), ERROR_INSIDE );
}
if( cfg.show_zones || layer == F_Mask || layer == B_Mask )
@@ -1059,9 +1164,9 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
if( !footprint->GetBoundingBox().Intersects( boardBBox ) )
{
if( footprint->IsFlipped() )
addPads( footprint, m_offboardPadsBack, B_Cu, false, false );
addPads( footprint, m_offboardPadsBack, B_Cu );
else
addPads( footprint, m_offboardPadsFront, F_Cu, false, false );
addPads( footprint, m_offboardPadsFront, F_Cu );
}
}
@@ -1080,59 +1185,25 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
aStatusReporter->Report( _( "Calculating plated copper" ) );
// TRIM PLATED COPPER TO SOLDERMASK
if( m_layers_poly.find( F_Mask ) != m_layers_poly.end() )
{
if( m_layers_poly.contains( F_Mask ) )
m_frontPlatedCopperPolys->BooleanIntersection( *m_layers_poly.at( F_Mask ) );
}
if( m_layers_poly.find( B_Mask ) != m_layers_poly.end() )
{
if( m_layers_poly.contains( B_Mask ))
m_backPlatedCopperPolys->BooleanIntersection( *m_layers_poly.at( B_Mask ) );
}
// Subtract plated copper from unplated copper
bool hasF_Cu = false;
bool hasB_Cu = false;
if( m_layers_poly.find( F_Cu ) != m_layers_poly.end() )
{
m_layers_poly[F_Cu]->BooleanSubtract( *m_frontPlatedPadAndGraphicPolys );
if( m_layers_poly.contains( F_Cu ) )
m_layers_poly[F_Cu]->BooleanSubtract( *m_frontPlatedCopperPolys );
hasF_Cu = true;
}
if( m_layers_poly.find( B_Cu ) != m_layers_poly.end() )
{
m_layers_poly[B_Cu]->BooleanSubtract( *m_backPlatedPadAndGraphicPolys );
if( m_layers_poly.contains( B_Cu ) )
m_layers_poly[B_Cu]->BooleanSubtract( *m_backPlatedCopperPolys );
hasB_Cu = true;
}
// Add plated graphic items to build vertical walls
if( hasF_Cu && m_frontPlatedCopperPolys->OutlineCount() )
m_frontPlatedPadAndGraphicPolys->Append( *m_frontPlatedCopperPolys );
if( hasB_Cu && m_backPlatedCopperPolys->OutlineCount() )
m_backPlatedPadAndGraphicPolys->Append( *m_backPlatedCopperPolys );
m_frontPlatedPadAndGraphicPolys->Simplify();
m_backPlatedPadAndGraphicPolys->Simplify();
m_frontPlatedCopperPolys->Simplify();
m_backPlatedCopperPolys->Simplify();
// ADD PLATED PADS
for( FOOTPRINT* footprint : m_board->Footprints() )
{
addPads( footprint, m_platedPadsFront, F_Cu, false, true );
addPads( footprint, m_platedPadsBack, B_Cu, false, true );
}
// ADD PLATED COPPER
ConvertPolygonToTriangles( *m_frontPlatedCopperPolys, *m_platedPadsFront, m_biuTo3Dunits,
*m_board->GetItem( niluuid ) );
*DELETED_BOARD_ITEM::GetInstance() );
ConvertPolygonToTriangles( *m_backPlatedCopperPolys, *m_platedPadsBack, m_biuTo3Dunits,
*m_board->GetItem( niluuid ) );
*DELETED_BOARD_ITEM::GetInstance() );
m_platedPadsFront->BuildBVH();
m_platedPadsBack->BuildBVH();
@@ -1181,13 +1252,11 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
i < selected_layer_id.size();
i = nextItem.fetch_add( 1 ) )
{
auto layerPoly = m_layers_poly.find( selected_layer_id[i] );
if( layerPoly != m_layers_poly.end() )
if( m_layers_poly.contains( selected_layer_id[i] ) )
{
// This will make a union of all added contours
layerPoly->second->ClearArcs();
layerPoly->second->Simplify();
m_layers_poly[ selected_layer_id[i] ]->ClearArcs();
m_layers_poly[ selected_layer_id[i] ]->Simplify();
}
}
@@ -1208,13 +1277,13 @@ void BOARD_ADAPTER::createLayers( REPORTER* aStatusReporter )
for( PCB_LAYER_ID layer : layer_ids )
{
if( m_layerHoleOdPolys.find( layer ) != m_layerHoleOdPolys.end() )
if( m_layerHoleOdPolys.contains( layer ) )
{
// found
SHAPE_POLY_SET *polyLayer = m_layerHoleOdPolys[layer];
polyLayer->Simplify();
wxASSERT( m_layerHoleIdPolys.find( layer ) != m_layerHoleIdPolys.end() );
wxASSERT( m_layerHoleIdPolys.contains( layer ) );
polyLayer = m_layerHoleIdPolys[layer];
polyLayer->Simplify();
+38 -9
View File
@@ -451,7 +451,7 @@ void EDA_3D_CANVAS::DoRePaint()
return;
}
// Don't attend to ray trace if OpenGL doesn't support it.
// Don't attempt to ray trace if OpenGL doesn't support it.
if( !m_opengl_supports_raytracing )
{
m_3d_render = m_3d_render_opengl;
@@ -459,7 +459,7 @@ void EDA_3D_CANVAS::DoRePaint()
m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL;
}
// Check if a raytacing was requested and need to switch to raytracing mode
// Check if a raytracing was requested and need to switch to raytracing mode
if( m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )
{
const bool was_camera_changed = m_camera.ParametersChanged();
@@ -583,6 +583,19 @@ void EDA_3D_CANVAS::DoRePaint()
Request_refresh( false );
}
static constexpr std::array<VIEW3D_TYPE, static_cast<int>( SPHERES_GIZMO::GizmoSphereSelection::Count )>
viewTable = { VIEW3D_TYPE::VIEW3D_RIGHT, VIEW3D_TYPE::VIEW3D_LEFT, VIEW3D_TYPE::VIEW3D_BACK,
VIEW3D_TYPE::VIEW3D_FRONT, VIEW3D_TYPE::VIEW3D_TOP, VIEW3D_TYPE::VIEW3D_BOTTOM };
SPHERES_GIZMO::GizmoSphereSelection selectedGizmoSphere = m_3d_render_opengl->getSelectedGizmoSphere();
int index = static_cast<int>( selectedGizmoSphere );
if( index >= 0 && index < static_cast<int>( viewTable.size() ) )
{
SetView3D( viewTable[index] );
}
m_3d_render_opengl->resetSelectedGizmoSphere();
m_is_currently_painting.clear();
}
@@ -859,6 +872,22 @@ void EDA_3D_CANVAS::OnLeftUp( wxMouseEvent& event )
m_mouse_is_moving = false;
restart_editingTimeOut_Timer();
}
wxSize logicalSize = GetClientSize();
int logicalW = logicalSize.GetWidth();
int logicalH = logicalSize.GetHeight();
int gizmo_x, gizmo_y, gizmo_width, gizmo_height;
std::tie( gizmo_x, gizmo_y, gizmo_width, gizmo_height ) = m_3d_render_opengl->getGizmoViewport();
float scaleX = static_cast<float>( gizmo_width ) / logicalW;
float scaleY = static_cast<float>( gizmo_height ) / logicalH;
int scaledMouseX = static_cast<int>( event.GetX() * scaleX );
int scaledMouseY = static_cast<int>( ( logicalH - event.GetY() ) * scaleY );
m_3d_render_opengl->handleGizmoMouseInput( scaledMouseX, scaledMouseY );
Refresh();
}
@@ -1095,14 +1124,14 @@ bool EDA_3D_CANVAS::SetView3D( VIEW3D_TYPE aRequestedView )
void EDA_3D_CANVAS::RenderEngineChanged()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
switch( cfg->m_Render.engine )
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
{
case RENDER_ENGINE::OPENGL: m_3d_render = m_3d_render_opengl; break;
case RENDER_ENGINE::RAYTRACING: m_3d_render = m_3d_render_raytracing; break;
default: m_3d_render = nullptr; break;
switch( cfg->m_Render.engine )
{
case RENDER_ENGINE::OPENGL: m_3d_render = m_3d_render_opengl; break;
case RENDER_ENGINE::RAYTRACING: m_3d_render = m_3d_render_raytracing; break;
default: m_3d_render = nullptr; break;
}
}
if( m_3d_render )
@@ -157,7 +157,7 @@ void EDA_3D_MODEL_VIEWER::Set3DModel( const wxString& aModelPathName)
if( m_cacheManager )
{
const S3DMODEL* model = m_cacheManager->GetModel( aModelPathName, wxEmptyString, nullptr );
const S3DMODEL* model = m_cacheManager->GetModel( aModelPathName, wxEmptyString, {} );
if( model )
Set3DModel( (const S3DMODEL &)*model );
@@ -0,0 +1,368 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright 2025, Damjan Prerad <damjanovmail@gmail.com>
* Copyright (C) The KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <gal/opengl/kiglew.h> // Must be included first
#include <glm/geometric.hpp>
#include "3d_spheres_gizmo.h"
SPHERES_GIZMO::~SPHERES_GIZMO()
{
if( m_quadric )
{
gluDeleteQuadric( m_quadric );
m_quadric = nullptr;
}
}
SPHERES_GIZMO::SPHERES_GIZMO( int aGizmoPosX, int aGizmoPosY )
{
m_gizmoPosX = aGizmoPosX;
m_gizmoPosY = aGizmoPosY;
m_quadric = gluNewQuadric();
gluQuadricNormals( m_quadric, GLU_SMOOTH );
}
void SPHERES_GIZMO::setViewport( int ax, int ay, int aWidth, int aHeight )
{
m_viewportX = ax;
m_viewportY = ay;
m_viewportW = aWidth;
m_viewportH = aHeight;
}
std::tuple<int, int, int, int> SPHERES_GIZMO::getViewport() const
{
return std::make_tuple( m_viewportX, m_viewportY, m_viewportW, m_viewportH );
}
void SPHERES_GIZMO::setGizmoPosition( int ax, int ay )
{
m_gizmoPosX = ax;
m_gizmoPosY = ay;
}
void SPHERES_GIZMO::setGizmoMaterial()
{
glEnable( GL_COLOR_MATERIAL );
glColorMaterial( GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE );
const SFVEC4F ambient = SFVEC4F( 0.0f, 0.0f, 0.0f, 1.0f );
const SFVEC4F diffuse = SFVEC4F( 0.0f, 0.0f, 0.0f, 1.0f );
const SFVEC4F emissive = SFVEC4F( 0.0f, 0.0f, 0.0f, 1.0f );
const SFVEC4F specular = SFVEC4F( 0.1f, 0.1f, 0.1f, 1.0f );
glMaterialfv( GL_FRONT_AND_BACK, GL_SPECULAR, &specular.r );
glMaterialf( GL_FRONT_AND_BACK, GL_SHININESS, 96.0f );
glMaterialfv( GL_FRONT_AND_BACK, GL_AMBIENT, &ambient.r );
glMaterialfv( GL_FRONT_AND_BACK, GL_DIFFUSE, &diffuse.r );
glMaterialfv( GL_FRONT_AND_BACK, GL_EMISSION, &emissive.r );
}
void SPHERES_GIZMO::handleMouseInput( int aMouseX, int aMouseY )
{
int smallViewportW = m_viewportH / 8;
int smallViewportH = m_viewportH / 8;
bool inside = ( aMouseX >= m_gizmoPosX && aMouseX <= m_gizmoPosX + smallViewportW && aMouseY >= m_gizmoPosY
&& aMouseY <= m_gizmoPosY + smallViewportH );
if( inside )
{
m_ndcX = 2.0f * static_cast<float>( aMouseX - m_gizmoPosX ) / smallViewportW - 1.0f;
m_ndcY = 2.0f * static_cast<float>( aMouseY - m_gizmoPosY ) / smallViewportH - 1.0f;
}
else
{
m_ndcX = -1.0f;
m_ndcY = -1.0f;
}
}
void SPHERES_GIZMO::render3dSpheresGizmo( glm::mat4 aCameraRotationMatrix )
{
float fov = 60.0f;
glDisable( GL_CULL_FACE );
// Set up a square viewport (Y x Y)
glViewport( m_gizmoPosX, m_gizmoPosY, m_viewportH / 8, m_viewportH / 8 );
glClear( GL_DEPTH_BUFFER_BIT );
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gluPerspective( fov, 1.0f, 0.001f, 2.0f * RANGE_SCALE_3D );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glm::mat4 TranslationMatrix = glm::translate( glm::mat4( 1.0f ), SFVEC3F( 0.0f, 0.0f, -( m_arrowSize * 2.75f ) ) );
glm::mat4 ViewMatrix = TranslationMatrix * aCameraRotationMatrix;
glLoadMatrixf( glm::value_ptr( ViewMatrix ) );
setGizmoMaterial();
// Intersection test
glm::mat4 proj = glm::perspective( glm::radians( fov ), 1.0f, 0.001f, 2.0f * RANGE_SCALE_3D );
glm::mat4 invVP = glm::inverse( proj * ViewMatrix );
glm::vec4 rayStartNDC( m_ndcX, m_ndcY, -1.0f, 1.0f );
glm::vec4 rayEndNDC( m_ndcX, m_ndcY, 1.0f, 1.0f );
glm::vec4 rayStartWorld = invVP * rayStartNDC;
rayStartWorld /= rayStartWorld.w;
glm::vec4 rayEndWorld = invVP * rayEndNDC;
rayEndWorld /= rayEndWorld.w;
glm::vec3 rayOrigin = glm::vec3( rayStartWorld );
glm::vec3 rayDirection = glm::normalize( glm::vec3( rayEndWorld - rayStartWorld ) );
auto intersects =
[]( const glm::vec3& aRayOrigin, const glm::vec3& aRayDir, const glm::vec3& aSphereCenter, float aRadius )
{
glm::vec3 L = aSphereCenter - aRayOrigin;
float tca = glm::dot( L, aRayDir );
float d2 = glm::dot( L, L ) - tca * tca;
return d2 <= aRadius * aRadius;
};
int clickedIndex = -1;
m_selectedGizmoSphere = GizmoSphereSelection::None;
for( size_t i = 0; i < m_spheres.size(); ++i )
{
const auto& sphere = m_spheres[i];
if( intersects( rayOrigin, rayDirection, sphere.m_position, sphere.m_radius ) )
{
clickedIndex = static_cast<int>( i );
m_selectedGizmoSphere = static_cast<GizmoSphereSelection>( i );
break; // only pick the first intersected sphere
}
}
// Update colors
for( size_t i = 0; i < m_spheres.size(); ++i )
{
if( static_cast<int>( i ) == clickedIndex )
{
m_spheres[i].m_color = { 1.0f, 1.0f, 1.0f }; // White
}
else
{
m_spheres[i].m_color = m_spheres[i].m_originalColor; // Restore default
}
}
// Intersection test done
auto drawBillboardCircle = []( const glm::vec3& aCenter, float aRadius, const glm::vec3& aColor,
const glm::vec3& aCamRight, const glm::vec3& aCamUp, int aSegments = 64 )
{
float thickness = aRadius * 0.4f;
glColor3f( aColor.r, aColor.g, aColor.b );
glBegin( GL_TRIANGLE_STRIP );
for( int i = 0; i <= aSegments; ++i )
{
float angle = 2.0f * glm::pi<float>() * i / aSegments;
glm::vec3 dir = cos( angle ) * aCamRight + sin( angle ) * aCamUp;
glm::vec3 outer = aCenter + dir * ( aRadius + thickness * 0.5f );
glm::vec3 inner = aCenter + dir * ( aRadius - thickness * 0.5f );
glVertex3f( outer.x, outer.y, outer.z );
glVertex3f( inner.x, inner.y, inner.z );
}
glEnd();
};
glm::vec3 camRight( aCameraRotationMatrix[0][0], aCameraRotationMatrix[1][0], aCameraRotationMatrix[2][0] );
glm::vec3 camUp( aCameraRotationMatrix[0][1], aCameraRotationMatrix[1][1], aCameraRotationMatrix[2][1] );
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
for( const auto& sphere : m_spheres )
{
glColor4f( sphere.m_color.r, sphere.m_color.g, sphere.m_color.b, 0.3f );
glPushMatrix();
glTranslatef( sphere.m_position.x, sphere.m_position.y, sphere.m_position.z );
if( m_quadric )
{
gluSphere( m_quadric, sphere.m_radius, 32, 32 );
}
glPopMatrix();
drawBillboardCircle( sphere.m_position, sphere.m_radius, sphere.m_color, camRight, camUp );
}
// Draw sphere labels
glDisable( GL_DEPTH_TEST );
glDisable( GL_LIGHTING );
std::array<std::string, 6> labels = { "X", "", "Y", "", "Z", "" };
// View direction (camera looks along negative Z in view space)
// So we offset a little toward the camera to avoid z-fighting
glm::vec3 offset = glm::normalize( -rayDirection ) * 0.02f;
glColor4f( 0.0f, 0.0f, 0.0f, 1.0f );
auto drawX = []( const glm::vec3& aPos, float aSize, const glm::vec3& aColor, const glm::vec3& aCamRight,
const glm::vec3& aCamUp )
{
glColor3f( aColor.r, aColor.g, aColor.b );
glLineWidth( 3.0f );
float h = aSize * 0.5f;
// Define two diagonal line directions in camera-facing plane
glm::vec3 dir1 = ( -aCamRight + aCamUp ) * h; // one diagonal
glm::vec3 dir2 = ( -aCamRight - aCamUp ) * h; // other diagonal
glBegin( GL_LINES );
glVertex3f( ( aPos - dir1 ).x, ( aPos - dir1 ).y, ( aPos - dir1 ).z );
glVertex3f( ( aPos + dir1 ).x, ( aPos + dir1 ).y, ( aPos + dir1 ).z );
glVertex3f( ( aPos - dir2 ).x, ( aPos - dir2 ).y, ( aPos - dir2 ).z );
glVertex3f( ( aPos + dir2 ).x, ( aPos + dir2 ).y, ( aPos + dir2 ).z );
glEnd();
};
auto drawY = []( const glm::vec3& aPos, float aSize, const glm::vec3& aColor, const glm::vec3& aCamRight,
const glm::vec3& aCamUp )
{
glColor3f( aColor.r, aColor.g, aColor.b );
glLineWidth( 3.0f );
float h = aSize * 0.5f;
// Top-left and top-right in screen plane
glm::vec3 topLeft = aPos + aCamUp * h - aCamRight * h;
glm::vec3 topRight = aPos + aCamUp * h + aCamRight * h;
glm::vec3 bottom = aPos - aCamUp * h;
glBegin( GL_LINES );
glVertex3f( topLeft.x, topLeft.y, topLeft.z );
glVertex3f( aPos.x, aPos.y, aPos.z );
glVertex3f( topRight.x, topRight.y, topRight.z );
glVertex3f( aPos.x, aPos.y, aPos.z );
glVertex3f( aPos.x, aPos.y, aPos.z );
glVertex3f( bottom.x, bottom.y, bottom.z );
glEnd();
};
auto drawZ = []( const glm::vec3& aPos, float aSize, const glm::vec3& aColor, const glm::vec3& aCamRight,
const glm::vec3& aCamUp )
{
glColor3f( aColor.r, aColor.g, aColor.b );
glLineWidth( 3.0f );
float h = aSize * 0.5f;
// Define corners in screen plane relative to camera
glm::vec3 topLeft = aPos + aCamUp * h - aCamRight * h;
glm::vec3 topRight = aPos + aCamUp * h + aCamRight * h;
glm::vec3 bottomLeft = aPos - aCamUp * h - aCamRight * h;
glm::vec3 bottomRight = aPos - aCamUp * h + aCamRight * h;
glBegin( GL_LINE_STRIP );
glVertex3f( topLeft.x, topLeft.y, topLeft.z );
glVertex3f( topRight.x, topRight.y, topRight.z );
glVertex3f( bottomLeft.x, bottomLeft.y, bottomLeft.z );
glVertex3f( bottomRight.x, bottomRight.y, bottomRight.z );
glEnd();
};
for( size_t i = 0; i < m_spheres.size(); ++i )
{
if( labels[i].empty() )
continue;
glm::vec3 textPos = m_spheres[i].m_position + offset;
const std::string& label = labels[i];
if( label == "X" )
{
drawX( textPos, 0.30f, glm::vec3( 0.0f ), camRight, camUp );
}
else if( label == "Y" )
{
drawY( textPos, 0.30f, glm::vec3( 0.0f ), camRight, camUp );
}
else if( label == "Z" )
{
drawZ( textPos, 0.30f, glm::vec3( 0.0f ), camRight, camUp );
}
}
glEnable( GL_LIGHTING );
glEnable( GL_DEPTH_TEST );
// Draw lines only to the positive axis spheres
glLineWidth( 2.0f );
glBegin( GL_LINES );
glColor3f( 0.9f, 0.0f, 0.0f ); // X+
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( m_arrowSize, 0.0f, 0.0f );
glColor3f( 0.0f, 0.9f, 0.0f ); // Y+
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, m_arrowSize, 0.0f );
glColor3f( 0.0f, 0.0f, 0.9f ); // Z+
glVertex3f( 0.0f, 0.0f, 0.0f );
glVertex3f( 0.0f, 0.0f, m_arrowSize );
glEnd();
glEnable( GL_CULL_FACE );
}
SPHERES_GIZMO::GizmoSphereSelection SPHERES_GIZMO::getSelectedGizmoSphere() const
{
return m_selectedGizmoSphere;
}
void SPHERES_GIZMO::resetSelectedGizmoSphere()
{
m_selectedGizmoSphere = GizmoSphereSelection::None;
m_ndcX = -1.0f;
m_ndcY = -1.0f;
}
@@ -0,0 +1,133 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright 2025, Damjan Prerad <damjanovmail@gmail.com>
* Copyright (C) The KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _3D_SPHERES_GIZMO_H_
#define _3D_SPHERES_GIZMO_H_
#include "../render_3d_base.h"
/**
* @class SPHERES_GIZMO
* @brief Renders a set of colored spheres in 3D space that act as a directional orientation gizmo.
*/
class SPHERES_GIZMO
{
public:
SPHERES_GIZMO( int aGizmoPosX, int aGizmoPosY );
~SPHERES_GIZMO();
void setViewport( int ax, int ay, int aWidth, int aHeight );
std::tuple<int, int, int, int> getViewport() const;
void setGizmoPosition( int ax, int ay );
void handleMouseInput( int aMouseX, int aMouseY );
/**
* @enum GizmoSphereSelection
* @brief Enum to indicate which sphere (direction) is selected.
*/
enum class GizmoSphereSelection
{
None = -1, ///< No sphere selected.
Right = 0, ///< +X direction.
Left, ///< -X direction.
Back, ///< +Y direction.
Front, ///< -Y direction.
Top, ///< +Z direction.
Bottom, ///< -Z direction.
Count ///< Number of selectable spheres.
};
GizmoSphereSelection getSelectedGizmoSphere() const;
void resetSelectedGizmoSphere();
void render3dSpheresGizmo( glm::mat4 aCameraRotationMatrix );
private:
void setGizmoMaterial();
GLUquadric* m_quadric = nullptr;
int m_gizmoPosX = 0;
int m_gizmoPosY = 0;
int m_viewportX = 0;
int m_viewportY = 0;
int m_viewportW = 0;
int m_viewportH = 0;
float m_ndcX = -1.0f;
float m_ndcY = -1.0f;
struct GizmoSphere
{
glm::vec3 m_position;
float m_radius;
glm::vec3 m_labelPosition;
glm::vec3 m_color;
glm::vec3 m_originalColor;
};
// Define sphere positions
const float m_arrowSize = RANGE_SCALE_3D * 0.20f;
const float m_sphereRadius = 0.05f * RANGE_SCALE_3D;
/**
* @brief List of all directional gizmo spheres.
* The order follows the GizmoSphereSelection enum.
*/
std::array<GizmoSphere, 6> m_spheres = { { { { m_arrowSize, 0.0f, 0.0f },
m_sphereRadius,
{ m_arrowSize + 0.02f, 0.0f, 0.0f },
{ 0.9f, 0.0f, 0.0f },
{ 0.9f, 0.0f, 0.0f } },
{ { -m_arrowSize, 0.0f, 0.0f },
m_sphereRadius,
{ -m_arrowSize - 0.02f, 0.0f, 0.0f },
{ 0.4f, 0.0f, 0.0f },
{ 0.4f, 0.0f, 0.0f } },
{ { 0.0f, m_arrowSize, 0.0f },
m_sphereRadius,
{ 0.0f, m_arrowSize + 0.02f, 0.0f },
{ 0.0f, 0.9f, 0.0f },
{ 0.0f, 0.9f, 0.0f } },
{ { 0.0f, -m_arrowSize, 0.0f },
m_sphereRadius,
{ 0.0f, -m_arrowSize - 0.02f, 0.0f },
{ 0.0f, 0.4f, 0.0f },
{ 0.0f, 0.4f, 0.0f } },
{ { 0.0f, 0.0f, m_arrowSize },
m_sphereRadius,
{ 0.0f, 0.0f, m_arrowSize + 0.02f },
{ 0.0f, 0.0f, 0.9f },
{ 0.0f, 0.0f, 0.9f } },
{ { 0.0f, 0.0f, -m_arrowSize },
m_sphereRadius,
{ 0.0f, 0.0f, -m_arrowSize - 0.02f },
{ 0.0f, 0.0f, 0.4f },
{ 0.0f, 0.0f, 0.4f } } } };
GizmoSphereSelection m_selectedGizmoSphere = GizmoSphereSelection::None;
};
#endif // _3D_SPHERES_GIZMO_H_
+28 -29
View File
@@ -481,9 +481,8 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
SHAPE_POLY_SET board_poly_with_holes = m_boardAdapter.GetBoardPoly().CloneDropTriangulation();
board_poly_with_holes.BooleanSubtract( m_boardAdapter.GetTH_ODPolys() );
board_poly_with_holes.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys() );
m_boardWithHoles = createBoard( board_poly_with_holes );
m_boardWithHoles = createBoard( board_poly_with_holes, &m_boardAdapter.GetTH_IDs() );
if( m_antiBoard )
m_antiBoard->SetItIsTransparent( true );
@@ -567,7 +566,7 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
if( m_boardAdapter.m_Cfg->m_Render.opengl_copper_thickness )
{
if( map_poly.find( layer ) != map_poly.end() )
if( map_poly.contains( layer ) )
{
polyListSubtracted = *map_poly.at( layer );
@@ -584,11 +583,11 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
if( m_boardAdapter.m_Cfg->m_Render.subtract_mask_from_silk )
{
if( layer == B_SilkS && map_poly.find( B_Mask ) != map_poly.end() )
if( layer == B_SilkS && map_poly.contains( B_Mask ) )
{
polyListSubtracted.BooleanSubtract( *map_poly.at( B_Mask ) );
}
else if( layer == F_SilkS && map_poly.find( F_Mask ) != map_poly.end() )
else if( layer == F_SilkS && map_poly.contains( F_Mask ) )
{
polyListSubtracted.BooleanSubtract( *map_poly.at( F_Mask ) );
}
@@ -607,14 +606,12 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
if( m_boardAdapter.m_Cfg->m_Render.DifferentiatePlatedCopper() )
{
const SHAPE_POLY_SET* frontPlatedPadAndGraphicPolys =
m_boardAdapter.GetFrontPlatedPadAndGraphicPolys();
const SHAPE_POLY_SET* backPlatedPadAndGraphicPolys =
m_boardAdapter.GetBackPlatedPadAndGraphicPolys();
const SHAPE_POLY_SET* frontPlatedCopperPolys = m_boardAdapter.GetFrontPlatedCopperPolys();
const SHAPE_POLY_SET* backPlatedCopperPolys = m_boardAdapter.GetBackPlatedCopperPolys();
if( frontPlatedPadAndGraphicPolys )
if( frontPlatedCopperPolys )
{
SHAPE_POLY_SET poly = frontPlatedPadAndGraphicPolys->CloneDropTriangulation();
SHAPE_POLY_SET poly = frontPlatedCopperPolys->CloneDropTriangulation();
poly.BooleanIntersection( m_boardAdapter.GetBoardPoly() );
poly.BooleanSubtract( m_boardAdapter.GetTH_ODPolys() );
poly.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys() );
@@ -627,9 +624,9 @@ void RENDER_3D_OPENGL::reload( REPORTER* aStatusReporter, REPORTER* aWarningRepo
m_layers[F_Cu] = generateEmptyLayerList( F_Cu );
}
if( backPlatedPadAndGraphicPolys )
if( backPlatedCopperPolys )
{
SHAPE_POLY_SET poly = backPlatedPadAndGraphicPolys->CloneDropTriangulation();
SHAPE_POLY_SET poly = backPlatedCopperPolys->CloneDropTriangulation();
poly.BooleanIntersection( m_boardAdapter.GetBoardPoly() );
poly.BooleanSubtract( m_boardAdapter.GetTH_ODPolys() );
poly.BooleanSubtract( m_boardAdapter.GetNPTH_ODPolys() );
@@ -774,13 +771,12 @@ void RENDER_3D_OPENGL::generateViasAndPads()
wxASSERT( zbot < ztop );
generateCylinder( via_center, hole_inner_radius,
hole_inner_radius + platingThickness3d,
generateCylinder( via_center, hole_inner_radius, hole_inner_radius + platingThickness3d,
ztop, zbot, nrSegments, layerTriangleVIA );
}
}
m_vias = new OPENGL_RENDER_LIST( *layerTriangleVIA, 0, 0.0f, 0.0f );
m_microviaHoles = new OPENGL_RENDER_LIST( *layerTriangleVIA, 0, 0.0f, 0.0f );
delete layerTriangleVIA;
}
@@ -805,10 +801,10 @@ void RENDER_3D_OPENGL::generateViasAndPads()
{
TransformCircleToPolygon( tht_outer_holes_poly, via->GetPosition(),
via->GetDrill() / 2 + platingThickness,
ARC_HIGH_DEF, ERROR_INSIDE );
via->GetMaxError(), ERROR_INSIDE );
TransformCircleToPolygon( tht_inner_holes_poly, via->GetPosition(),
via->GetDrill() / 2, ARC_HIGH_DEF, ERROR_INSIDE );
TransformCircleToPolygon( tht_inner_holes_poly, via->GetPosition(), via->GetDrill() / 2,
via->GetMaxError(), ERROR_INSIDE );
}
}
}
@@ -827,9 +823,9 @@ void RENDER_3D_OPENGL::generateViasAndPads()
continue;
pad->TransformHoleToPolygon( tht_outer_holes_poly, platingThickness,
ARC_HIGH_DEF, ERROR_INSIDE );
pad->TransformHoleToPolygon( tht_inner_holes_poly, 0, ARC_HIGH_DEF,
ERROR_INSIDE );
pad->GetMaxError(), ERROR_INSIDE );
pad->TransformHoleToPolygon( tht_inner_holes_poly, 0,
pad->GetMaxError(), ERROR_INSIDE );
}
}
}
@@ -928,8 +924,8 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter )
// Go for all footprints
for( const FOOTPRINT* footprint : m_boardAdapter.GetBoard()->Footprints() )
{
wxString libraryName = footprint->GetFPID().GetLibNickname();
wxString footprintBasePath = wxEmptyString;
wxString libraryName = footprint->GetFPID().GetLibNickname();
wxString footprintBasePath = wxEmptyString;
if( m_boardAdapter.GetBoard()->GetProject() )
{
@@ -964,13 +960,16 @@ void RENDER_3D_OPENGL::load3dModels( REPORTER* aStatusReporter )
// Check if the fp_model is not present in our cache map
// (Not already loaded in memory)
if( m_3dModelMap.find( fp_model.m_Filename ) == m_3dModelMap.end() )
if( !m_3dModelMap.contains( fp_model.m_Filename ) )
{
// It is not present, try get it from cache
const S3DMODEL* modelPtr =
m_boardAdapter.Get3dCacheManager()->GetModel( fp_model.m_Filename,
footprintBasePath,
footprint );
std::vector<const EMBEDDED_FILES*> embeddedFilesStack;
embeddedFilesStack.push_back( footprint->GetEmbeddedFiles() );
embeddedFilesStack.push_back( m_boardAdapter.GetBoard()->GetEmbeddedFiles() );
const S3DMODEL* modelPtr = m_boardAdapter.Get3dCacheManager()->GetModel( fp_model.m_Filename,
footprintBasePath,
embeddedFilesStack );
// only add it if the return is not NULL
if( modelPtr )
@@ -49,8 +49,7 @@
*/
#define UNITS3D_TO_UNITSPCB ( pcbIUScale.IU_PER_MM )
RENDER_3D_OPENGL::RENDER_3D_OPENGL( EDA_3D_CANVAS* aCanvas, BOARD_ADAPTER& aAdapter,
CAMERA& aCamera ) :
RENDER_3D_OPENGL::RENDER_3D_OPENGL( EDA_3D_CANVAS* aCanvas, BOARD_ADAPTER& aAdapter, CAMERA& aCamera ) :
RENDER_3D_BASE( aAdapter, aCamera ),
m_canvas( aCanvas )
{
@@ -71,7 +70,7 @@ RENDER_3D_OPENGL::RENDER_3D_OPENGL( EDA_3D_CANVAS* aCanvas, BOARD_ADAPTER& aAdap
m_outerThroughHoles = nullptr;
m_outerThroughHoleRings = nullptr;
m_outerViaThroughHoles = nullptr;
m_vias = nullptr;
m_microviaHoles = nullptr;
m_padHoles = nullptr;
m_circleTexture = 0;
@@ -81,6 +80,8 @@ RENDER_3D_OPENGL::RENDER_3D_OPENGL( EDA_3D_CANVAS* aCanvas, BOARD_ADAPTER& aAdap
m_boardWithHoles = nullptr;
m_3dModelMap.clear();
m_spheres_gizmo = new SPHERES_GIZMO( 4, 4 );
}
@@ -91,6 +92,8 @@ RENDER_3D_OPENGL::~RENDER_3D_OPENGL()
freeAllLists();
glDeleteTextures( 1, &m_circleTexture );
delete m_spheres_gizmo;
}
@@ -104,9 +107,13 @@ void RENDER_3D_OPENGL::SetCurWindowSize( const wxSize& aSize )
{
if( m_windowSize != aSize )
{
int viewport[4];
int fbWidth, fbHeight;
glGetIntegerv( GL_VIEWPORT, viewport );
m_windowSize = aSize;
glViewport( 0, 0, m_windowSize.x, m_windowSize.y );
setGizmoViewport( 0, 0, m_windowSize.x, m_windowSize.y );
// Initialize here any screen dependent data here
}
}
@@ -139,42 +146,33 @@ void RENDER_3D_OPENGL::setLightBottom( bool enabled )
}
void RENDER_3D_OPENGL::render3dArrows()
void RENDER_3D_OPENGL::resetSelectedGizmoSphere()
{
const float arrow_size = RANGE_SCALE_3D * 0.30f;
m_spheres_gizmo->resetSelectedGizmoSphere();
}
glDisable( GL_CULL_FACE );
// YxY squared view port, this is on propose
glViewport( 4, 4, m_windowSize.y / 8 , m_windowSize.y / 8 );
glClear( GL_DEPTH_BUFFER_BIT );
SPHERES_GIZMO::GizmoSphereSelection RENDER_3D_OPENGL::getSelectedGizmoSphere() const
{
return m_spheres_gizmo->getSelectedGizmoSphere();
}
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
gluPerspective( 45.0f, 1.0f, 0.001f, RANGE_SCALE_3D );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
void RENDER_3D_OPENGL::setGizmoViewport( int x, int y, int width, int height )
{
m_spheres_gizmo->setViewport( x, y, width, height );
}
const glm::mat4 TranslationMatrix =
glm::translate( glm::mat4( 1.0f ), SFVEC3F( 0.0f, 0.0f, -( arrow_size * 2.75f ) ) );
const glm::mat4 ViewMatrix = TranslationMatrix * m_camera.GetRotationMatrix();
std::tuple<int, int, int, int> RENDER_3D_OPENGL::getGizmoViewport() const
{
return m_spheres_gizmo->getViewport();
}
glLoadMatrixf( glm::value_ptr( ViewMatrix ) );
setArrowMaterial();
glColor3f( 0.9f, 0.0f, 0.0f );
DrawRoundArrow( SFVEC3F( 0.0f, 0.0f, 0.0f ), SFVEC3F( arrow_size, 0.0f, 0.0f ), 0.275f );
glColor3f( 0.0f, 0.9f, 0.0f );
DrawRoundArrow( SFVEC3F( 0.0f, 0.0f, 0.0f ), SFVEC3F( 0.0f, arrow_size, 0.0f ), 0.275f );
glColor3f( 0.0f, 0.0f, 0.9f );
DrawRoundArrow( SFVEC3F( 0.0f, 0.0f, 0.0f ), SFVEC3F( 0.0f, 0.0f, arrow_size ), 0.275f );
glEnable( GL_CULL_FACE );
void RENDER_3D_OPENGL::handleGizmoMouseInput( int mouseX, int mouseY )
{
m_spheres_gizmo->handleMouseInput( mouseX, mouseY );
}
@@ -271,9 +269,7 @@ void RENDER_3D_OPENGL::setupMaterials()
void RENDER_3D_OPENGL::setLayerMaterial( PCB_LAYER_ID aLayerID )
{
EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS& cfg = m_boardAdapter.m_Cfg->m_Render;
if( cfg.use_board_editor_copper_colors && IsCopperLayer( aLayerID ) )
if( m_boardAdapter.GetUseBoardEditorCopperLayerColors() && IsCopperLayer( aLayerID ) )
{
COLOR4D copper_color = m_boardAdapter.m_BoardEditorColors[aLayerID];
m_materials.m_Copper.m_Diffuse = SFVEC3F( copper_color.r, copper_color.g,
@@ -362,10 +358,34 @@ void RENDER_3D_OPENGL::setLayerMaterial( PCB_LAYER_ID aLayerID )
break;
default:
{
int layer3D = MapPCBLayerTo3DLayer( aLayerID );
// Note: MUST do this in LAYER_3D space; User_1..User_45 are NOT contiguous
if( layer3D >= LAYER_3D_USER_1 && layer3D <= LAYER_3D_USER_45 )
{
int user_idx = layer3D - LAYER_3D_USER_1;
m_materials.m_Plastic.m_Diffuse = m_boardAdapter.m_UserDefinedLayerColor[ user_idx ];
m_materials.m_Plastic.m_Ambient = SFVEC3F( m_materials.m_Plastic.m_Diffuse.r * 0.05f,
m_materials.m_Plastic.m_Diffuse.g * 0.05f,
m_materials.m_Plastic.m_Diffuse.b * 0.05f );
m_materials.m_Plastic.m_Specular = SFVEC3F( m_materials.m_Plastic.m_Diffuse.r * 0.7f,
m_materials.m_Plastic.m_Diffuse.g * 0.7f,
m_materials.m_Plastic.m_Diffuse.b * 0.7f );
m_materials.m_Plastic.m_Shininess = 0.078125f * 128.0f;
m_materials.m_Plastic.m_Emissive = SFVEC3F( 0.0f, 0.0f, 0.0f );
OglSetMaterial( m_materials.m_Plastic, 1.0f );
break;
}
m_materials.m_Copper.m_Diffuse = m_boardAdapter.m_CopperColor;
OglSetMaterial( m_materials.m_Copper, 1.0f );
break;
}
}
}
@@ -573,15 +593,15 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
bool skipThickness = aIsMoving && cfg.opengl_thickness_disableOnMove;
bool skipRenderHoles = aIsMoving && cfg.opengl_holes_disableOnMove;
bool skipRenderVias = aIsMoving && cfg.opengl_vias_disableOnMove;
bool skipRenderMicroVias = aIsMoving && cfg.opengl_microvias_disableOnMove;
bool showThickness = !skipThickness;
std::bitset<LAYER_3D_END> layerFlags = m_boardAdapter.GetVisibleLayers();
setLayerMaterial( B_Cu );
if( !( skipRenderVias || skipRenderHoles ) && m_vias )
m_vias->DrawAll();
if( !( skipRenderMicroVias || skipRenderHoles ) && m_microviaHoles )
m_microviaHoles->DrawAll();
if( !skipRenderHoles && m_padHoles )
m_padHoles->DrawAll();
@@ -664,10 +684,6 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
unsetDepthOffset();
}
else if( isPasteLayer && skipRenderHoles )
{
// Do not render paste layers when skipRenderHoles is enabled or we get z-fight issues
}
else
{
setLayerMaterial( layer );
@@ -676,10 +692,13 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
OPENGL_RENDER_LIST* anti_board = nullptr;
OPENGL_RENDER_LIST* solder_mask = nullptr;
if( isSilkLayer && cfg.clip_silk_on_via_annuli )
throughHolesOuter = m_outerThroughHoleRings;
else
throughHolesOuter = m_outerThroughHoles;
if( !skipRenderHoles )
{
if( isSilkLayer && cfg.clip_silk_on_via_annuli )
throughHolesOuter = m_outerThroughHoleRings;
else
throughHolesOuter = m_outerThroughHoles;
}
if( isSilkLayer && cfg.show_off_board_silk )
anti_board = nullptr;
@@ -805,8 +824,8 @@ bool RENDER_3D_OPENGL::Redraw( bool aIsMoving, REPORTER* aStatusReporter,
}
// Render 3D arrows
if( cfg.show_axis )
render3dArrows();
if( cfg.show_navigator )
m_spheres_gizmo->render3dSpheresGizmo( m_camera.GetRotationMatrix() );
// Return back to the original viewport (this is important if we want
// to take a screenshot after the render)
@@ -926,7 +945,7 @@ void RENDER_3D_OPENGL::freeAllLists()
DELETE_AND_FREE( m_outerViaThroughHoles )
DELETE_AND_FREE( m_outerThroughHoleRings )
DELETE_AND_FREE( m_vias )
DELETE_AND_FREE( m_microviaHoles )
DELETE_AND_FREE( m_padHoles )
}
@@ -27,6 +27,7 @@
#include "../render_3d_base.h"
#include "layer_triangles.h"
#include "3d_spheres_gizmo.h"
#include "../raytracing/shapes2D/polygon_2d.h"
#include "../raytracing/shapes2D/triangle_2d.h"
@@ -70,6 +71,11 @@ public:
* Load footprint models if they are not already loaded, i.e. if m_3dModelMap is empty
*/
void Load3dModelsIfNeeded();
void handleGizmoMouseInput( int mouseX, int mouseY );
void setGizmoViewport( int x, int y, int width, int height );
std::tuple<int, int, int, int> getGizmoViewport() const;
SPHERES_GIZMO::GizmoSphereSelection getSelectedGizmoSphere() const;
void resetSelectedGizmoSphere();
private:
OPENGL_RENDER_LIST* generateHoles( const LIST_OBJECT2D& aListHolesObject2d,
@@ -168,8 +174,6 @@ private:
void setLightTop( bool enabled );
void setLightBottom( bool enabled );
void render3dArrows();
/**
* Create a 3D grid to an OpenGL display list.
*
@@ -230,7 +234,7 @@ private:
GLuint m_grid; ///< oGL list that stores current grid
GRID3D_TYPE m_lastGridType; ///< Stores the last grid type.
OPENGL_RENDER_LIST* m_vias;
OPENGL_RENDER_LIST* m_microviaHoles;
OPENGL_RENDER_LIST* m_padHoles;
// Caches
@@ -239,8 +243,9 @@ private:
BOARD_ITEM* m_currentRollOverItem;
SHAPE_POLY_SET m_antiBoardPolys; ///< The negative polygon representation of the board
///< outline.
SHAPE_POLY_SET m_antiBoardPolys; ///< The negative polygon representation of the board
///< outline.
SPHERES_GIZMO* m_spheres_gizmo;
};
#endif // RENDER_3D_OPENGL_H
@@ -632,7 +632,15 @@ void RENDER_3D_RAYTRACE_BASE::Reload( REPORTER* aStatusReporter, REPORTER* aWarn
break;
default:
if( m_boardAdapter.m_Cfg->m_Render.differentiate_plated_copper )
{
int layer3D = MapPCBLayerTo3DLayer( layer_id );
// Note: MUST do this in LAYER_3D space; User_1..User_45 are NOT contiguous
if( layer3D >= LAYER_3D_USER_1 && layer3D <= LAYER_3D_USER_45 )
{
layerColor = m_boardAdapter.m_UserDefinedLayerColor[ layer3D - LAYER_3D_USER_1 ];
}
else if( m_boardAdapter.m_Cfg->m_Render.differentiate_plated_copper )
{
layerColor = SFVEC3F( 184.0f / 255.0f, 115.0f / 255.0f, 50.0f / 255.0f );
materialLayer = &m_materials.m_NonPlatedCopper;
@@ -645,6 +653,7 @@ void RENDER_3D_RAYTRACE_BASE::Reload( REPORTER* aStatusReporter, REPORTER* aWarn
break;
}
}
createItemsFromContainer( container2d, layer_id, materialLayer, layerColor, 0.0f );
} // for each layer on map
@@ -1282,8 +1291,12 @@ void RENDER_3D_RAYTRACE_BASE::load3DModels( CONTAINER_3D& aDstContainer,
continue;
// get it from cache
const S3DMODEL* modelPtr =
cacheMgr->GetModel( model.m_Filename, footprintBasePath, fp );
std::vector<const EMBEDDED_FILES*> embeddedFilesStack;
embeddedFilesStack.push_back( fp->GetEmbeddedFiles() );
embeddedFilesStack.push_back( m_boardAdapter.GetBoard()->GetEmbeddedFiles() );
const S3DMODEL* modelPtr = cacheMgr->GetModel( model.m_Filename, footprintBasePath,
std::move( embeddedFilesStack ) );
// only add it if the return is not NULL.
if( modelPtr )
@@ -274,10 +274,12 @@ void RENDER_3D_RAYTRACE_BASE::renderTracing( uint8_t* ptrPBO, REPORTER* aStatusR
}
};
for( size_t i = 0; i < tp.get_thread_count() + 1; ++i )
tp.push_task( processBlocks );
BS::multi_future<void> futures;
tp.wait_for_tasks();
for( size_t i = 0; i < tp.get_thread_count(); ++i )
futures.push_back( tp.submit( processBlocks ) );
futures.wait();
m_blockRenderProgressCount += numBlocksRendered;
+4 -17
View File
@@ -48,15 +48,8 @@ void EDA_3D_VIEWER_FRAME::doReCreateMenuBar()
//
ACTION_MENU* fileMenu = new ACTION_MENU( false, tool );
fileMenu->Add( _( "Export Current View as PNG..." ),
wxEmptyString,
ID_MENU_SCREENCOPY_PNG,
BITMAPS::export_png );
fileMenu->Add( _( "Export Current View as JPEG..." ),
wxEmptyString,
ID_MENU_SCREENCOPY_JPEG,
BITMAPS::export_file );
fileMenu->Add( EDA_3D_ACTIONS::exportAsPNG );
fileMenu->Add( EDA_3D_ACTIONS::exportAsJPEG );
fileMenu->AppendSeparator();
fileMenu->AddClose( _( "3D Viewer" ) );
@@ -67,10 +60,7 @@ void EDA_3D_VIEWER_FRAME::doReCreateMenuBar()
// The translated modifiers do not always work
ACTION_MENU* editMenu = new ACTION_MENU( false, tool );
editMenu->Add( _( "Copy 3D Image" ),
wxEmptyString,
ID_TOOL_SCREENCOPY_TOCLIBBOARD,
BITMAPS::copy );
editMenu->Add( EDA_3D_ACTIONS::copyToClipboard );
//-- View menu -------------------------------------------------------
@@ -122,10 +112,7 @@ void EDA_3D_VIEWER_FRAME::doReCreateMenuBar()
//
ACTION_MENU* prefsMenu = new ACTION_MENU( false, tool );
prefsMenu->Add( _( "Raytracing" ), "",
ID_RENDER_CURRENT_VIEW,
BITMAPS::tools,
ACTION_MENU::CHECK );
prefsMenu->Add( EDA_3D_ACTIONS::toggleRaytacing, ACTION_MENU::CHECK );
prefsMenu->Add( ACTIONS::openPreferences );
-107
View File
@@ -1,107 +0,0 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2023 CERN
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <wx/wupdlock.h>
#include <wx/choice.h>
#include <bitmaps.h>
#include <dialogs/eda_view_switcher.h>
#include <eda_3d_viewer_frame.h>
#include <tool/action_toolbar.h>
#include <tools/eda_3d_actions.h>
#include <3d_viewer_id.h>
void EDA_3D_VIEWER_FRAME::ReCreateMainToolbar()
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::ReCreateMainToolbar" ) );
wxWindowUpdateLocker dummy( this );
if( m_mainToolBar )
{
m_mainToolBar->ClearToolbar();
}
else
{
m_mainToolBar = new ACTION_TOOLBAR( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
KICAD_AUI_TB_STYLE | wxAUI_TB_HORZ_LAYOUT |
wxAUI_TB_HORIZONTAL );
m_mainToolBar->SetAuiManager( &m_auimgr );
}
// Set up toolbar
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
KiBitmapBundle( BITMAPS::import3d ),
_( "Reload board" ) );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
KiBitmapBundle( BITMAPS::copy ),
_( "Copy 3D image to clipboard" ) );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
KiBitmapBundle( BITMAPS::ray_tracing ),
_( "Render current view using Raytracing" ), wxITEM_CHECK );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( ACTIONS::zoomRedraw );
m_mainToolBar->Add( ACTIONS::zoomInCenter );
m_mainToolBar->Add( ACTIONS::zoomOutCenter );
m_mainToolBar->Add( ACTIONS::zoomFitScreen );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::rotateXCW );
m_mainToolBar->Add( EDA_3D_ACTIONS::rotateXCCW );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::rotateYCW );
m_mainToolBar->Add( EDA_3D_ACTIONS::rotateYCCW );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::rotateZCW );
m_mainToolBar->Add( EDA_3D_ACTIONS::rotateZCCW );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::flipView );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::moveLeft );
m_mainToolBar->Add( EDA_3D_ACTIONS::moveRight );
m_mainToolBar->Add( EDA_3D_ACTIONS::moveUp );
m_mainToolBar->Add( EDA_3D_ACTIONS::moveDown );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::toggleOrtho, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->AddScaledSeparator( this );
m_mainToolBar->Add( EDA_3D_ACTIONS::showLayersManager, ACTION_TOOLBAR::TOGGLE );
m_mainToolBar->KiRealize();
}
+56 -105
View File
@@ -58,6 +58,7 @@
#include <widgets/wx_aui_utils.h>
#include <wildcards_and_files_ext.h>
#include <project_pcb.h>
#include <toolbars_3d.h>
#include <3d_navlib/nl_3d_viewer_plugin.h>
@@ -80,7 +81,6 @@ BEGIN_EVENT_TABLE( EDA_3D_VIEWER_FRAME, KIWAY_PLAYER )
EDA_3D_VIEWER_FRAME::Process_Special_Functions )
EVT_MENU( wxID_CLOSE, EDA_3D_VIEWER_FRAME::Exit3DFrame )
EVT_MENU( ID_RENDER_CURRENT_VIEW, EDA_3D_VIEWER_FRAME::onRenderEngineSelection )
EVT_MENU( ID_DISABLE_RAY_TRACING, EDA_3D_VIEWER_FRAME::onDisableRayTracing )
EVT_CLOSE( EDA_3D_VIEWER_FRAME::OnCloseWindow )
@@ -91,7 +91,6 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
const wxString& aTitle, long style ) :
KIWAY_PLAYER( aKiway, aParent, FRAME_PCB_DISPLAY3D, aTitle, wxDefaultPosition,
wxDefaultSize, style, QUALIFIED_VIEWER3D_FRAMENAME( aParent ), unityScale ),
m_mainToolBar( nullptr ),
m_canvas( nullptr ),
m_currentCamera( m_trackBallCamera ),
m_trackBallCamera( 2 * RANGE_SCALE_3D )
@@ -112,24 +111,26 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
wxStatusBar *status_bar = CreateStatusBar( arrayDim( status_dims ) );
SetStatusWidths( arrayDim( status_dims ), status_dims );
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
ANTIALIASING_MODE aaMode = static_cast<ANTIALIASING_MODE>( cfg->m_Render.opengl_AA_mode );
ANTIALIASING_MODE aaMode = ANTIALIASING_MODE::AA_NONE;
EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
m_canvas = new EDA_3D_CANVAS( this, OGL_ATT_LIST::GetAttributesList( aaMode, true ),
m_boardAdapter, m_currentCamera,
PROJECT_PCB::Get3DCacheManager( &Prj() ) );
if( cfg )
aaMode = static_cast<ANTIALIASING_MODE>( cfg->m_Render.opengl_AA_mode );
m_canvas = new EDA_3D_CANVAS( this, OGL_ATT_LIST::GetAttributesList( aaMode, true ), m_boardAdapter,
m_currentCamera, PROJECT_PCB::Get3DCacheManager( &Prj() ) );
m_appearancePanel = new APPEARANCE_CONTROLS_3D( this, GetCanvas() );
LoadSettings( cfg );
LoadSettings( GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
loadCommonSettings();
m_appearancePanel->SetUserViewports( Prj().GetProjectFile().m_Viewports3D );
// Create the manager
m_toolManager = new TOOL_MANAGER;
m_toolManager->SetEnvironment( GetBoard(), nullptr, nullptr, cfg, this );
m_toolManager->SetEnvironment( GetBoard(), nullptr, nullptr,
GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ), this );
m_actions = new EDA_3D_ACTIONS();
m_toolDispatcher = new TOOL_DISPATCHER( m_toolManager );
@@ -143,19 +144,22 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
setupUIConditions();
if( EDA_3D_CONTROLLER* ctrlTool = GetToolManager()->GetTool<EDA_3D_CONTROLLER>() )
ctrlTool->SetRotationIncrement( cfg->m_Camera.rotation_increment );
ctrlTool->SetRotationIncrement( cfg ? cfg->m_Camera.rotation_increment : 10.0 );
// Run the viewer control tool, it is supposed to be always active
m_toolManager->InvokeTool( "3DViewer.Control" );
ReCreateMenuBar();
ReCreateMainToolbar();
m_toolbarSettings = Pgm().GetSettingsManager().GetToolbarSettings<EDA_3D_VIEWER_TOOLBAR_SETTINGS>( "3d_viewer-toolbars" );
configureToolbars();
RecreateToolbars();
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
m_auimgr.SetManagedWindow( this );
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxS( "MainToolbar" ) )
m_auimgr.AddPane( m_tbTopMain, EDA_PANE().HToolbar().Name( wxS( "TopMainToolbar" ) )
.Top().Layer( 6 ) );
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( wxS( "InfoBar" ) )
.Top().Layer( 1 ) );
@@ -168,10 +172,11 @@ EDA_3D_VIEWER_FRAME::EDA_3D_VIEWER_FRAME( KIWAY* aKiway, PCB_BASE_FRAME* aParent
wxAuiPaneInfo& layersManager = m_auimgr.GetPane( "LayersManager" );
if( cfg->m_AuiPanels.right_panel_width > 0 )
if( cfg && cfg->m_AuiPanels.right_panel_width > 0 )
SetAuiPaneSize( m_auimgr, layersManager, cfg->m_AuiPanels.right_panel_width, -1 );
layersManager.Show( cfg->m_AuiPanels.show_layer_manager );
if( cfg )
layersManager.Show( cfg->m_AuiPanels.show_layer_manager );
// Call Update() to fix all pane default sizes, especially the "InfoBar" pane before
// hiding it.
@@ -255,10 +260,9 @@ void EDA_3D_VIEWER_FRAME::setupUIConditions()
{
return m_boardAdapter.m_Cfg->m_Render.show_model_bbox;
};
auto showAxes =
[this]( const SELECTION& aSel )
auto showNavig = [this]( const SELECTION& aSel )
{
return m_boardAdapter.m_Cfg->m_Render.show_axis;
return m_boardAdapter.m_Cfg->m_Render.show_navigator;
};
auto ortho =
[this]( const SELECTION& )
@@ -272,7 +276,7 @@ void EDA_3D_VIEWER_FRAME::setupUIConditions()
return m_boardAdapter.m_Cfg->m_AuiPanels.show_layer_manager;
};
RegisterUIUpdateHandler( ID_RENDER_CURRENT_VIEW, ACTION_CONDITIONS().Check( raytracing ) );
mgr->SetConditions( EDA_3D_ACTIONS::toggleRaytacing, ACTION_CONDITIONS().Check( raytracing ) );
mgr->SetConditions( EDA_3D_ACTIONS::showTHT, ACTION_CONDITIONS().Check( showTH ) );
mgr->SetConditions( EDA_3D_ACTIONS::showSMD, ACTION_CONDITIONS().Check( showSMD ) );
@@ -282,7 +286,7 @@ void EDA_3D_VIEWER_FRAME::setupUIConditions()
mgr->SetConditions( EDA_3D_ACTIONS::showDNP, ACTION_CONDITIONS().Check( show_DNP ) );
mgr->SetConditions( EDA_3D_ACTIONS::showBBoxes, ACTION_CONDITIONS().Check( showBBoxes ) );
mgr->SetConditions( EDA_3D_ACTIONS::showAxis, ACTION_CONDITIONS().Check( showAxes ) );
mgr->SetConditions( EDA_3D_ACTIONS::showNavigator, ACTION_CONDITIONS().Check( showNavig ) );
mgr->SetConditions( EDA_3D_ACTIONS::noGrid, GridSizeCheck( GRID3D_TYPE::NONE ) );
mgr->SetConditions( EDA_3D_ACTIONS::show10mmGrid, GridSizeCheck( GRID3D_TYPE::GRID_10MM ) );
@@ -454,43 +458,25 @@ void EDA_3D_VIEWER_FRAME::OnCloseWindow( wxCloseEvent &event )
void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
{
int id = event.GetId();
bool isChecked = event.IsChecked();
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::Process_Special_Functions id %d "
"isChecked %d" ),
id,
isChecked );
if( m_canvas == nullptr )
return;
switch( id )
switch( event.GetId() )
{
case ID_RELOAD3D_BOARD:
NewDisplay( true );
break;
case ID_TOOL_SCREENCOPY_TOCLIBBOARD:
case ID_MENU_SCREENCOPY_PNG:
case ID_MENU_SCREENCOPY_JPEG:
takeScreenshot( event );
return;
case ID_MENU3D_RESET_DEFAULTS:
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
m_boardAdapter.SetLayerColors( m_boardAdapter.GetDefaultColors() );
cfg->ResetToDefaults();
LoadSettings( cfg );
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
cfg->ResetToDefaults();
LoadSettings( GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
// Tell canvas that we (may have) changed the render engine
RenderEngineChanged();
NewDisplay( true );
}
return;
}
default:
wxFAIL_MSG( wxT( "Invalid event in EDA_3D_VIEWER_FRAME::Process_Special_Functions()" ) );
@@ -499,28 +485,9 @@ void EDA_3D_VIEWER_FRAME::Process_Special_Functions( wxCommandEvent &event )
}
void EDA_3D_VIEWER_FRAME::onRenderEngineSelection( wxCommandEvent &event )
{
RENDER_ENGINE& engine = m_boardAdapter.m_Cfg->m_Render.engine;
RENDER_ENGINE old_engine = engine;
if( old_engine == RENDER_ENGINE::OPENGL )
engine = RENDER_ENGINE::RAYTRACING;
else
engine = RENDER_ENGINE::OPENGL;
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::OnRenderEngineSelection type %s " ),
engine == RENDER_ENGINE::RAYTRACING ? wxT( "raytracing" ) : wxT( "realtime" ) );
if( old_engine != engine )
RenderEngineChanged();
}
void EDA_3D_VIEWER_FRAME::onDisableRayTracing( wxCommandEvent& aEvent )
{
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::%s disabling ray tracing." ),
__WXFUNCTION__ );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::%s disabling ray tracing." ), __WXFUNCTION__ );
m_disable_ray_tracing = true;
m_boardAdapter.m_Cfg->m_Render.engine = RENDER_ENGINE::OPENGL;
@@ -572,9 +539,6 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
{
applySettings( cfg );
if( !GetBoard()->GetProject() )
GetBoard()->SetProject( &Prj() );
m_boardAdapter.SetBoard( GetBoard() );
// When opening the 3D viewer, we use the OpenGL mode, never the ray tracing engine
@@ -608,19 +572,9 @@ void EDA_3D_VIEWER_FRAME::LoadSettings( APP_SETTINGS_BASE *aCfg )
void EDA_3D_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE *aCfg )
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
EDA_BASE_FRAME::SaveSettings( GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
EDA_BASE_FRAME::SaveSettings( cfg );
wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER_FRAME::SaveSettings" ) );
wxLogTrace( m_logTrace, m_boardAdapter.m_Cfg->m_Render.engine == RENDER_ENGINE::RAYTRACING ?
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting Ray Trace" )
:
wxT( "EDA_3D_VIEWER_FRAME::SaveSettings render setting OpenGL" ) );
if( cfg )
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
{
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
@@ -641,12 +595,8 @@ void EDA_3D_VIEWER_FRAME::CommonSettingsChanged( int aFlags )
// Regen menu bars, etc
EDA_BASE_FRAME::CommonSettingsChanged( aFlags );
// There is no base class that handles toolbars for this frame
ReCreateMainToolbar();
loadCommonSettings();
applySettings(
Pgm().GetSettingsManager().GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
applySettings( GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
m_appearancePanel->CommonSettingsChanged();
@@ -659,7 +609,7 @@ void EDA_3D_VIEWER_FRAME::ShowChangedLanguage()
EDA_BASE_FRAME::ShowChangedLanguage();
SetTitle( _( "3D Viewer" ) );
ReCreateMainToolbar();
RecreateToolbars();
if( m_appearancePanel )
{
@@ -674,23 +624,24 @@ void EDA_3D_VIEWER_FRAME::ShowChangedLanguage()
void EDA_3D_VIEWER_FRAME::ToggleAppearanceManager()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
wxAuiPaneInfo& layersManager = m_auimgr.GetPane( "LayersManager" );
wxAuiPaneInfo& layersManager = m_auimgr.GetPane( "LayersManager" );
// show auxiliary Vertical layers and visibility manager toolbar
cfg->m_AuiPanels.show_layer_manager = !cfg->m_AuiPanels.show_layer_manager;
layersManager.Show( cfg->m_AuiPanels.show_layer_manager );
if( cfg->m_AuiPanels.show_layer_manager )
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
{
SetAuiPaneSize( m_auimgr, layersManager, cfg->m_AuiPanels.right_panel_width, -1 );
}
else
{
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
m_auimgr.Update();
// show auxiliary Vertical layers and visibility manager toolbar
cfg->m_AuiPanels.show_layer_manager = !cfg->m_AuiPanels.show_layer_manager;
layersManager.Show( cfg->m_AuiPanels.show_layer_manager );
if( cfg->m_AuiPanels.show_layer_manager )
{
SetAuiPaneSize( m_auimgr, layersManager, cfg->m_AuiPanels.right_panel_width, -1 );
}
else
{
cfg->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
m_auimgr.Update();
}
}
}
@@ -702,15 +653,15 @@ void EDA_3D_VIEWER_FRAME::OnDarkModeToggle()
}
void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
void EDA_3D_VIEWER_FRAME::TakeScreenshot( EDA_3D_VIEWER_EXPORT_FORMAT aFormat )
{
wxString fullFileName;
bool fmt_is_jpeg = false;
if( event.GetId() == ID_MENU_SCREENCOPY_JPEG )
if( aFormat == EDA_3D_VIEWER_EXPORT_FORMAT::JPEG )
fmt_is_jpeg = true;
if( event.GetId() != ID_TOOL_SCREENCOPY_TOCLIBBOARD )
if( aFormat != EDA_3D_VIEWER_EXPORT_FORMAT::CLIPBOARD )
{
// Remember path between saves during this session only.
const wxString wildcard =
@@ -774,7 +725,7 @@ void EDA_3D_VIEWER_FRAME::takeScreenshot( wxCommandEvent& event )
cfg.highlight_on_rollover = allow_highlight;
if( event.GetId() == ID_TOOL_SCREENCOPY_TOCLIBBOARD )
if( aFormat == EDA_3D_VIEWER_EXPORT_FORMAT::CLIPBOARD )
{
wxBitmap bitmap( screenshotImage );
+13 -9
View File
@@ -57,6 +57,13 @@ enum EDA_3D_VIEWER_STATUSBAR
ZOOM_LEVEL,
};
enum class EDA_3D_VIEWER_EXPORT_FORMAT
{
CLIPBOARD,
PNG,
JPEG
};
/**
* Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard
*/
@@ -123,6 +130,12 @@ public:
void OnDarkModeToggle();
/**
* Create a Screenshot of the current 3D view.
* Output file format is png or jpeg, or image is copied to the clipboard
*/
void TakeScreenshot( EDA_3D_VIEWER_EXPORT_FORMAT aFormat );
protected:
void setupUIConditions() override;
@@ -138,20 +151,12 @@ private:
void Process_Special_Functions( wxCommandEvent& event );
void onRenderEngineSelection( wxCommandEvent& event );
void onDisableRayTracing( wxCommandEvent& aEvent );
void OnActivate( wxActivateEvent& event );
void OnSetFocus( wxFocusEvent& event );
void doReCreateMenuBar() override;
void ReCreateMainToolbar();
/**
* Create a Screenshot of the current 3D view.
* Output file format is png or jpeg, or image is copied to the clipboard
*/
void takeScreenshot( wxCommandEvent& event );
/**
* @brief RenderEngineChanged - Update toolbar icon and call canvas RenderEngineChanged
@@ -172,7 +177,6 @@ private:
private:
wxFileName m_defaultSaveScreenshotFileName;
ACTION_TOOLBAR* m_mainToolBar;
EDA_3D_CANVAS* m_canvas;
BOARD_ADAPTER m_boardAdapter;
CAMERA& m_currentCamera;
+119 -23
View File
@@ -19,6 +19,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <fmt/format.h>
#include <3d_enums.h>
#include <common_ogl/ogl_attr_list.h>
#include <settings/parameters.h>
@@ -81,6 +82,35 @@ PARAM_LAYER_PRESET_3D::PARAM_LAYER_PRESET_3D( const std::string& aPath,
m_presets( aPresetList )
{
wxASSERT( aPresetList );
#define LAYER( n, l ) m_layerToLayerNameMap[l] = n; m_layerNameToLayerMap[n] = l;
LAYER( "fp_values", LAYER_FP_VALUES );
LAYER( "fp_references", LAYER_FP_REFERENCES );
LAYER( "fp_text", LAYER_FP_TEXT );
LAYER( "background_bottom", LAYER_3D_BACKGROUND_BOTTOM );
LAYER( "background_top", LAYER_3D_BACKGROUND_TOP );
LAYER( "board", LAYER_3D_BOARD );
LAYER( "copper", LAYER_3D_COPPER_TOP );
LAYER( "copper_bottom", LAYER_3D_COPPER_BOTTOM );
LAYER( "silkscreen_bottom", LAYER_3D_SILKSCREEN_BOTTOM );
LAYER( "silkscreen_top", LAYER_3D_SILKSCREEN_TOP );
LAYER( "soldermask_bottom", LAYER_3D_SOLDERMASK_BOTTOM );
LAYER( "soldermask_top", LAYER_3D_SOLDERMASK_TOP );
LAYER( "solderpaste", LAYER_3D_SOLDERPASTE );
LAYER( "adhesive", LAYER_3D_ADHESIVE );
LAYER( "user_comments", LAYER_3D_USER_COMMENTS );
LAYER( "user_drawings", LAYER_3D_USER_DRAWINGS );
LAYER( "user_eco1", LAYER_3D_USER_ECO1 );
LAYER( "user_eco2", LAYER_3D_USER_ECO2 );
LAYER( "3d_navigator", LAYER_3D_NAVIGATOR );
LAYER( "th_models", LAYER_3D_TH_MODELS );
LAYER( "smd_models", LAYER_3D_SMD_MODELS );
LAYER( "virtual_models", LAYER_3D_VIRTUAL_MODELS );
LAYER( "non_pos_file_models", LAYER_3D_MODELS_NOT_IN_POS );
LAYER( "dnp_models", LAYER_3D_MODELS_MARKED_DNP );
LAYER( "bounding_boxes", LAYER_3D_BOUNDING_BOXES );
LAYER( "off_board_silk", LAYER_3D_OFF_BOARD_SILK );
}
@@ -99,7 +129,7 @@ nlohmann::json PARAM_LAYER_PRESET_3D::presetsToJson()
for( int layer = 0; layer < LAYER_3D_END; ++layer )
{
if( preset.layers.test( layer ) )
layers.push_back( layer );
layers.push_back( m_layerToLayerNameMap[layer] );
}
js["layers"] = layers;
@@ -109,7 +139,7 @@ nlohmann::json PARAM_LAYER_PRESET_3D::presetsToJson()
for( const auto& [ layer, color ] : preset.colors )
{
nlohmann::json layerColor = {
{ "layer", layer },
{ "layer", m_layerToLayerNameMap[layer] },
{ "color", color.ToCSSString() }
};
@@ -144,26 +174,20 @@ void PARAM_LAYER_PRESET_3D::jsonToPresets( const nlohmann::json& aJson )
for( const nlohmann::json& layer : preset.at( "layers" ) )
{
if( layer.is_number_integer() )
{
int layerNum = layer.get<int>();
if( layerNum >= 0 && layerNum < LAYER_3D_END )
p.layers.set( layerNum );
}
if( layer.is_string() )
p.layers.set( m_layerNameToLayerMap[layer.get<wxString>()] );
}
}
if( preset.contains( "colors" ) && preset.at( "colors" ).is_array() )
{
for( const nlohmann::json& layerColor : preset.at( "colors" ) )
for( const nlohmann::json& entry : preset.at( "colors" ) )
{
if( layerColor.contains( "layer" ) && layerColor.contains( "color" )
&& layerColor.at( "layer" ).is_number_integer() )
if( entry.contains( "layer" ) && entry.contains( "color" )
&& entry.at( "layer" ).is_string() )
{
int layerNum = layerColor.at( "layer" ).get<int>();
COLOR4D color = layerColor.at( "color" ).get<COLOR4D>();
p.colors[ layerNum ] = color;
int layerNum = m_layerNameToLayerMap[entry.at( "layer" ).get<wxString>()];
p.colors[ layerNum ] = entry.at( "color" ).get<COLOR4D>();
}
}
}
@@ -175,7 +199,7 @@ void PARAM_LAYER_PRESET_3D::jsonToPresets( const nlohmann::json& aJson )
///! Update the schema version whenever a migration is required
const int viewer3dSchemaVersion = 3;
const int viewer3dSchemaVersion = 4;
EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
@@ -229,7 +253,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
m_params.emplace_back( new PARAM<bool>( "render.opengl_thickness_disableOnMove",
&m_Render.opengl_thickness_disableOnMove, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_vias_disableOnMove",
&m_Render.opengl_vias_disableOnMove, false ) );
&m_Render.opengl_microvias_disableOnMove, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_holes_disableOnMove",
&m_Render.opengl_holes_disableOnMove, false ) );
m_params.emplace_back( new PARAM<bool>( "render.opengl_render_bbox_only_OnMove",
@@ -296,7 +320,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
m_params.emplace_back( new PARAM_LIST<COLOR4D>( "render.raytrace_lightColor",
&m_Render.raytrace_lightColor,
default_colors ) );
std::move( default_colors ) ) );
const std::vector<int> default_elevation =
{
@@ -305,7 +329,7 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
m_params.emplace_back( new PARAM_LIST<int>( "render.raytrace_lightElevation",
&m_Render.raytrace_lightElevation,
default_elevation ) );
std::move( default_elevation ) ) );
const std::vector<int> default_azimuth =
{
@@ -314,12 +338,12 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
m_params.emplace_back( new PARAM_LIST<int>( "render.raytrace_lightAzimuth",
&m_Render.raytrace_lightAzimuth,
default_azimuth ) );
std::move( default_azimuth ) ) );
m_params.emplace_back( new PARAM<bool>( "render.show_adhesive",
&m_Render.show_adhesive, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_axis",
&m_Render.show_axis, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_navigator",
&m_Render.show_navigator, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_board_body",
&m_Render.show_board_body, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_comments",
@@ -330,6 +354,13 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
&m_Render.show_eco1, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_eco2",
&m_Render.show_eco2, true ) );
for( int layer = 0; layer < 45; ++layer )
{
m_params.emplace_back( new PARAM<bool>( fmt::format( "render.show_user{}", layer + 1 ),
&m_Render.show_user[layer], false ) );
}
m_params.emplace_back( new PARAM<bool>( "render.show_footprints_insert",
&m_Render.show_footprints_insert, true ) );
m_params.emplace_back( new PARAM<bool>( "render.show_footprints_normal",
@@ -370,6 +401,8 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
&m_Render.differentiate_plated_copper, false ) );
m_params.emplace_back( new PARAM<bool>( "render.use_board_editor_copper_colors",
&m_Render.use_board_editor_copper_colors, false ) );
m_params.emplace_back( new PARAM<bool>( "render.preview_show_board_body",
&m_Render.preview_show_board_body, true ) );
m_params.emplace_back( new PARAM<bool>( "camera.animation_enabled",
&m_Camera.animation_enabled, true ) );
m_params.emplace_back( new PARAM<int>( "camera.moving_speed_multiplier",
@@ -425,6 +458,69 @@ EDA_3D_VIEWER_SETTINGS::EDA_3D_VIEWER_SETTINGS() :
Set( "render.show_eco2", *optval );
}
return true;
} );
registerMigration( 3, 4,
[&]() -> bool
{
std::map<int, wxString> legacyColorMap;
legacyColorMap[142] = "fp_values";
legacyColorMap[143] = "fp_references";
legacyColorMap[130] = "fp_text";
legacyColorMap[466] = "background_bottom";
legacyColorMap[467] = "background_top";
legacyColorMap[468] = "board";
legacyColorMap[469] = "copper";
legacyColorMap[470] = "copper_bottom";
legacyColorMap[471] = "silkscreen_bottom";
legacyColorMap[472] = "silkscreen_top";
legacyColorMap[473] = "soldermask_bottom";
legacyColorMap[474] = "soldermask_top";
legacyColorMap[475] = "solderpaste";
legacyColorMap[476] = "adhesive";
legacyColorMap[477] = "user_comments";
legacyColorMap[478] = "user_drawings";
legacyColorMap[479] = "user_eco1";
legacyColorMap[480] = "user_eco2";
legacyColorMap[481] = "th_models";
legacyColorMap[482] = "smd_models";
legacyColorMap[483] = "virtual_models";
legacyColorMap[484] = "non_pos_file_models";
legacyColorMap[485] = "dnp_models";
legacyColorMap[486] = "3d_navigator";
legacyColorMap[487] = "bounding_boxes";
legacyColorMap[488] = "off_board_silk";
if( !Contains( "layer_presets" ) || !At( "layer_presets" ).is_array() )
return true;
for( nlohmann::json& preset : At( "layer_presets" ) )
{
if( preset.contains( "colors" ) && preset.at( "colors" ).is_array() )
{
for( nlohmann::json& color : preset.at( "colors" ) )
{
if( color.contains( "layer" ) && color.at( "layer" ).is_number_integer() )
color["layer"] = legacyColorMap[color["layer"].get<int>()];
}
}
if( preset.contains( "layers" ) && preset.at( "layers" ).is_array() )
{
nlohmann::json mappedLayers = nlohmann::json::array();
for( const nlohmann::json& layer : preset.at( "layers" ) )
{
if( layer.is_number_integer() )
mappedLayers.push_back( legacyColorMap[layer.get<int>()] );
}
preset["layers"] = mappedLayers;
}
}
return true;
} );
}
@@ -483,7 +579,7 @@ bool EDA_3D_VIEWER_SETTINGS::MigrateFromLegacy( wxConfigBase* aCfg )
ret &= fromLegacy<bool>( aCfg, "Render_RAY_Shadows", "render.raytrace_shadows" );
ret &= fromLegacy<bool>( aCfg, "ShowRealisticMode", "render.realistic" );
ret &= fromLegacy<bool>( aCfg, "ShowAdhesiveLayers", "render.show_adhesive" );
ret &= fromLegacy<bool>( aCfg, "ShowAxis", "render.show_axis" );
ret &= fromLegacy<bool>( aCfg, "ShowNavigator", "render.show_navigator" );
ret &= fromLegacy<bool>( aCfg, "ShowBoardBody", "render.show_board_body" );
ret &= fromLegacy<bool>( aCfg, "ShowCommentsLayers", "render.show_comments" );
ret &= fromLegacy<bool>( aCfg, "ShowEcoLayers", "render.show_eco" );
+13 -10
View File
@@ -64,7 +64,11 @@ private:
void jsonToPresets( const nlohmann::json& aJson );
private:
std::vector<LAYER_PRESET_3D>* m_presets;
std::map<int, wxString> m_layerToLayerNameMap;
std::map<wxString, int> m_layerNameToLayerMap;
};
@@ -86,7 +90,7 @@ public:
bool opengl_AA_disableOnMove;
bool opengl_thickness_disableOnMove;
bool opengl_vias_disableOnMove;
bool opengl_microvias_disableOnMove;
bool opengl_holes_disableOnMove;
bool opengl_render_bbox_only_OnMove;
bool opengl_copper_thickness;
@@ -122,12 +126,13 @@ public:
std::vector<int> raytrace_lightAzimuth; // 0 .. 359
bool show_adhesive;
bool show_axis;
bool show_navigator;
bool show_board_body;
bool show_comments;
bool show_drawings;
bool show_eco1;
bool show_eco2;
bool show_user[45];
bool show_footprints_insert;
bool show_footprints_normal;
bool show_footprints_virtual;
@@ -147,21 +152,19 @@ public:
bool subtract_mask_from_silk;
bool clip_silk_on_via_annuli;
bool differentiate_plated_copper;
// Board editor copper colors are used only in OpenGL mode if
// use_board_editor_copper_colors is true
bool use_board_editor_copper_colors;
bool use_board_editor_copper_colors; // OpenGL only
bool preview_show_board_body;
/**
* return true if platted copper aeras and non platted copper areas must be drawn
* using a different color
* in OPENGL mode, if use_board_editor_copper_colors, always false
* in RAYTRACING mode, use_board_editor_copper_colors is ignored (board editor copper
* colors are ignored)
*/
bool DifferentiatePlatedCopper()
{
return engine == RENDER_ENGINE::RAYTRACING ? differentiate_plated_copper
: differentiate_plated_copper && !use_board_editor_copper_colors;
if( engine == RENDER_ENGINE::OPENGL && use_board_editor_copper_colors )
return false;
return differentiate_plated_copper;
}
};
+98
View File
@@ -0,0 +1,98 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
* Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@gmail.com>
* Copyright (C) 2023 CERN
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <wx/wupdlock.h>
#include <wx/choice.h>
#include <bitmaps.h>
#include <dialogs/eda_view_switcher.h>
#include <eda_3d_viewer_frame.h>
#include <tool/action_toolbar.h>
#include <tools/eda_3d_actions.h>
#include <3d_viewer_id.h>
#include <toolbars_3d.h>
std::optional<TOOLBAR_CONFIGURATION> EDA_3D_VIEWER_TOOLBAR_SETTINGS::DefaultToolbarConfig( TOOLBAR_LOC aToolbar )
{
TOOLBAR_CONFIGURATION config;
// clang-format off
switch( aToolbar )
{
case TOOLBAR_LOC::LEFT:
case TOOLBAR_LOC::RIGHT:
case TOOLBAR_LOC::TOP_AUX:
return std::nullopt;
case TOOLBAR_LOC::TOP_MAIN:
config.AppendAction( EDA_3D_ACTIONS::reloadBoard );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::copyToClipboard );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::toggleRaytacing );
config.AppendSeparator()
.AppendAction( ACTIONS::zoomRedraw )
.AppendAction( ACTIONS::zoomInCenter )
.AppendAction( ACTIONS::zoomOutCenter )
.AppendAction( ACTIONS::zoomFitScreen );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::rotateXCW )
.AppendAction( EDA_3D_ACTIONS::rotateXCCW );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::rotateYCW )
.AppendAction( EDA_3D_ACTIONS::rotateYCCW );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::rotateZCW )
.AppendAction( EDA_3D_ACTIONS::rotateZCCW );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::flipView );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::moveLeft )
.AppendAction( EDA_3D_ACTIONS::moveRight )
.AppendAction( EDA_3D_ACTIONS::moveUp )
.AppendAction( EDA_3D_ACTIONS::moveDown );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::toggleOrtho );
config.AppendSeparator()
.AppendAction( EDA_3D_ACTIONS::showLayersManager );
break;
}
// clang-format on
return config;
}
+40
View File
@@ -0,0 +1,40 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright The KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef TOOLBARS_3D_H_
#define TOOLBARS_3D_H_
#include <tool/ui/toolbar_configuration.h>
/**
* Toolbar configuration for the 3D viewer.
*/
class EDA_3D_VIEWER_TOOLBAR_SETTINGS : public TOOLBAR_SETTINGS
{
public:
EDA_3D_VIEWER_TOOLBAR_SETTINGS() :
TOOLBAR_SETTINGS( "3d_viewer-toolbars" )
{}
~EDA_3D_VIEWER_TOOLBAR_SETTINGS() {}
std::optional<TOOLBAR_CONFIGURATION> DefaultToolbarConfig( TOOLBAR_LOC aToolbar ) override;
};
#endif /* TOOLBARS_3D_H_ */
+57 -12
View File
@@ -23,6 +23,7 @@
#include <bitmaps.h>
#include <3d_viewer_id.h>
#include <3d_enums.h>
#include <3d-viewer/3d_viewer/eda_3d_viewer_frame.h>
#include "eda_3d_actions.h"
#include "tool/tool_action.h"
@@ -38,7 +39,47 @@
TOOL_ACTION EDA_3D_ACTIONS::controlActivate( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control" )
.Scope( AS_GLOBAL )
.Flags( AF_ACTIVATE ) );
.Flags( AF_ACTIVATE )
.ToolbarState( TOOLBAR_STATE::HIDDEN) );
TOOL_ACTION EDA_3D_ACTIONS:: reloadBoard( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.reloadBoard" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Reload board" ) )
.Tooltip( _( "Reload board and refresh 3D view" ) )
.Icon( BITMAPS::import3d ) );
TOOL_ACTION EDA_3D_ACTIONS::toggleRaytacing( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.toggleRaytacing" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Use raytracing" ) )
.Tooltip( _( "Render current view using Raytracing" ) )
.Icon( BITMAPS::ray_tracing )
.ToolbarState( TOOLBAR_STATE::TOGGLE) );
TOOL_ACTION EDA_3D_ACTIONS::copyToClipboard( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.copyToClipboard" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Copy 3D image to clipboard" ) )
.Tooltip( _( "Copy the current 3D image to the clipboard" ) )
.Icon( BITMAPS::copy )
.Parameter<EDA_3D_VIEWER_EXPORT_FORMAT>( EDA_3D_VIEWER_EXPORT_FORMAT::CLIPBOARD ) );
TOOL_ACTION EDA_3D_ACTIONS::exportAsPNG( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.exportAsPNG" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Export Current View as PNG..." ) )
.Tooltip( _( "Export the Current View as a PNG image" ) )
.Icon( BITMAPS::export_png )
.Parameter<EDA_3D_VIEWER_EXPORT_FORMAT>( EDA_3D_VIEWER_EXPORT_FORMAT::PNG ) );
TOOL_ACTION EDA_3D_ACTIONS::exportAsJPEG( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.exportAsJPEG" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Export Current View as JPEG..." ) )
.Tooltip( _( "Export the Current View as a JPEG image" ) )
.Icon( BITMAPS::export_file )
.Parameter<EDA_3D_VIEWER_EXPORT_FORMAT>( EDA_3D_VIEWER_EXPORT_FORMAT::JPEG ) );
TOOL_ACTION EDA_3D_ACTIONS::pivotCenter( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.pivotCenter" )
@@ -84,6 +125,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateYCCW( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZclockwise" )
.Scope( AS_GLOBAL )
.DefaultHotkey( MD_SHIFT + 'R' )
.FriendlyName( _( "Rotate Z Clockwise" ) )
.Icon( BITMAPS::rotate_cw_z )
.Flags( AF_NONE )
@@ -92,6 +134,7 @@ TOOL_ACTION EDA_3D_ACTIONS::rotateZCW( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::rotateZCCW( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.rotateZcounterclockwise" )
.Scope( AS_GLOBAL )
.DefaultHotkey( 'R' )
.FriendlyName( _( "Rotate Z Counterclockwise" ) )
.Icon( BITMAPS::rotate_ccw_z )
.Flags( AF_NONE )
@@ -157,7 +200,8 @@ TOOL_ACTION EDA_3D_ACTIONS::toggleOrtho( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.FriendlyName( _( "Toggle Orthographic Projection" ) )
.Tooltip( _( "Enable/disable orthographic projection" ) )
.Icon( BITMAPS::ortho ) );
.Icon( BITMAPS::ortho )
.ToolbarState( TOOLBAR_STATE::TOGGLE ) );
TOOL_ACTION EDA_3D_ACTIONS::viewFront( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.viewFront" )
@@ -319,16 +363,16 @@ TOOL_ACTION EDA_3D_ACTIONS::showDNP( TOOL_ACTION_ARGS()
TOOL_ACTION EDA_3D_ACTIONS::showBBoxes( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showBoundingBoxes" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Model Bounding Boxes" ) )
.Tooltip( _( "Show 3D model bounding boxes in realtime renderer" ) )
.Icon( BITMAPS::ortho )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::showAxis( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showAxis" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show 3D Axis" ) )
.FriendlyName( _( "Show Model Bounding Boxes" ) )
.Tooltip( _( "Show 3D model bounding boxes in realtime renderer" ) )
.Icon( BITMAPS::ortho )
.Flags( AF_NONE ) );
TOOL_ACTION EDA_3D_ACTIONS::showNavigator( TOOL_ACTION_ARGS()
.Name( "3DViewer.Control.showNavigator" )
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show 3D Navigator" ) )
.Icon( BITMAPS::axis3d_front )
.Flags( AF_NONE ) );
@@ -337,5 +381,6 @@ TOOL_ACTION EDA_3D_ACTIONS::showLayersManager( TOOL_ACTION_ARGS()
.Scope( AS_GLOBAL )
.FriendlyName( _( "Show Appearance Manager" ) )
.Tooltip( _( "Show/hide the appearance manager" ) )
.Icon( BITMAPS::layers_manager ) );
.Icon( BITMAPS::layers_manager )
.ToolbarState( TOOLBAR_STATE::TOGGLE ) );
+8 -1
View File
@@ -42,6 +42,13 @@ class EDA_3D_ACTIONS : public ACTIONS
public:
static TOOL_ACTION controlActivate;
static TOOL_ACTION reloadBoard;
static TOOL_ACTION toggleRaytacing;
static TOOL_ACTION copyToClipboard;
static TOOL_ACTION exportAsPNG;
static TOOL_ACTION exportAsJPEG;
static TOOL_ACTION pivotCenter;
static TOOL_ACTION rotateXCW;
static TOOL_ACTION rotateXCCW;
@@ -80,7 +87,7 @@ public:
static TOOL_ACTION showNotInPosFile;
static TOOL_ACTION showDNP;
static TOOL_ACTION showBBoxes;
static TOOL_ACTION showAxis;
static TOOL_ACTION showNavigator;
static TOOL_ACTION showLayersManager;
};
@@ -256,8 +256,8 @@ int EDA_3D_CONTROLLER::ToggleVisibility( const TOOL_EVENT& aEvent )
flipLayer( LAYER_3D_MODELS_NOT_IN_POS );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showDNP ) )
flipLayer( LAYER_3D_MODELS_MARKED_DNP );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showAxis ) )
flipLayer( LAYER_3D_AXES );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showNavigator ) )
flipLayer( LAYER_3D_NAVIGATOR );
else if( aEvent.IsAction( &EDA_3D_ACTIONS::showBBoxes ) )
flipLayer( LAYER_3D_BOUNDING_BOXES );
}
@@ -334,11 +334,65 @@ int EDA_3D_CONTROLLER::ZoomFitScreen( const TOOL_EVENT& aEvent )
}
int EDA_3D_CONTROLLER::ReloadBoard( const TOOL_EVENT& aEvent )
{
EDA_BASE_FRAME* frame = dynamic_cast<EDA_BASE_FRAME*>( m_toolMgr->GetToolHolder() );
if( frame && frame->GetFrameType() == FRAME_PCB_DISPLAY3D )
static_cast<EDA_3D_VIEWER_FRAME*>( frame )->NewDisplay( true );
return 0;
}
int EDA_3D_CONTROLLER::ToggleRaytracing( const TOOL_EVENT& aEvent )
{
EDA_BASE_FRAME* frame = dynamic_cast<EDA_BASE_FRAME*>( m_toolMgr->GetToolHolder() );
if( frame && frame->GetFrameType() == FRAME_PCB_DISPLAY3D )
{
EDA_3D_VIEWER_FRAME* frame3d = static_cast<EDA_3D_VIEWER_FRAME*>( frame );
RENDER_ENGINE& engine = frame3d->GetAdapter().m_Cfg->m_Render.engine;
RENDER_ENGINE old_engine = engine;
if( old_engine == RENDER_ENGINE::OPENGL )
engine = RENDER_ENGINE::RAYTRACING;
else
engine = RENDER_ENGINE::OPENGL;
// Directly tell the canvas the rendering engine changed
if( old_engine != engine )
frame3d->GetCanvas()->RenderEngineChanged();
}
return 0;
}
int EDA_3D_CONTROLLER::ExportImage( const TOOL_EVENT& aEvent )
{
EDA_BASE_FRAME* frame = dynamic_cast<EDA_BASE_FRAME*>( m_toolMgr->GetToolHolder() );
if( frame && frame->GetFrameType() == FRAME_PCB_DISPLAY3D )
static_cast<EDA_3D_VIEWER_FRAME*>( frame )->TakeScreenshot( aEvent.Parameter<EDA_3D_VIEWER_EXPORT_FORMAT>() );
return 0;
}
void EDA_3D_CONTROLLER::setTransitions()
{
Go( &EDA_3D_CONTROLLER::Main, EDA_3D_ACTIONS::controlActivate.MakeEvent() );
Go( &EDA_3D_CONTROLLER::UpdateMenu, ACTIONS::updateMenu.MakeEvent() );
// Miscellaneous control
Go( &EDA_3D_CONTROLLER::ReloadBoard, EDA_3D_ACTIONS::reloadBoard.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ToggleRaytracing, EDA_3D_ACTIONS::toggleRaytacing.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ExportImage, EDA_3D_ACTIONS::copyToClipboard.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ExportImage, EDA_3D_ACTIONS::exportAsPNG.MakeEvent() );
Go( &EDA_3D_CONTROLLER::ExportImage, EDA_3D_ACTIONS::exportAsJPEG.MakeEvent() );
// Pan control
Go( &EDA_3D_CONTROLLER::PanControl, ACTIONS::panUp.MakeEvent() );
Go( &EDA_3D_CONTROLLER::PanControl, ACTIONS::panDown.MakeEvent() );
@@ -96,6 +96,10 @@ public:
int ToggleVisibility( const TOOL_EVENT& aEvent );
int ToggleLayersManager( const TOOL_EVENT& aEvent );
int ReloadBoard( const TOOL_EVENT& aEvent );
int ToggleRaytracing( const TOOL_EVENT& aEvent );
int ExportImage( const TOOL_EVENT& aEvent );
private:
/// Set up handlers for various events.
void setTransitions() override;
-8
View File
@@ -34,20 +34,12 @@
enum id_3dview_frm
{
ID_START_COMMAND_3D = ID_KICAD_3D_VIEWER_START,
ID_RELOAD3D_BOARD,
ID_TOOL_SCREENCOPY_TOCLIBBOARD,
ID_MENU_SCREENCOPY_PNG,
ID_MENU_SCREENCOPY_JPEG,
ID_MENU_SCREENCOPY_TOCLIBBOARD,
ID_MENU3D_RESET_DEFAULTS,
// Help
ID_MENU_COMMAND_END,
ID_RENDER_CURRENT_VIEW,
ID_DISABLE_RAY_TRACING,
ID_CUSTOM_EVENT_1, // A id for a custom event (canvas refresh request)
+2 -1
View File
@@ -38,6 +38,7 @@ set(3D-VIEWER_SRCS
3d_rendering/opengl/create_scene.cpp
3d_rendering/opengl/render_3d_opengl.cpp
3d_rendering/opengl/layer_triangles.cpp
3d_rendering/opengl/3d_spheres_gizmo.cpp
${DIR_RAY_ACC}/accelerator_3d.cpp
${DIR_RAY_ACC}/bvh_packet_traversal.cpp
${DIR_RAY_ACC}/bvh_pbrt.cpp
@@ -81,7 +82,7 @@ set(3D-VIEWER_SRCS
3d_rendering/test_cases.cpp
3d_rendering/trackball.cpp
3d_viewer/3d_menubar.cpp
3d_viewer/3d_toolbar.cpp
3d_viewer/toolbars_3d.cpp
3d_viewer/tools/eda_3d_actions.cpp
3d_viewer/tools/eda_3d_conditions.cpp
3d_viewer/tools/eda_3d_controller.cpp
-6
View File
@@ -31,18 +31,12 @@
#define OPENGL_INCLUDES_H
#ifdef __APPLE__
#ifndef GL_SILENCE_DEPRECATION
// Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
// Luckily we can silence warnings about its deprecation.
#define GL_SILENCE_DEPRECATION 1
#endif
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#else
#ifdef _WIN32
// required for the windows gl.h to work
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
+155 -101
View File
@@ -29,8 +29,7 @@
#include <eda_3d_viewer_frame.h>
#include <pcbnew_settings.h>
#include <project.h>
#include <settings/settings_manager.h>
#include <settings/color_settings.h>
#include <board.h>
#include <tool/tool_manager.h>
#include <tools/pcb_actions.h>
#include <tools/eda_3d_actions.h>
@@ -51,52 +50,93 @@
/// Template for object appearance settings
const APPEARANCE_CONTROLS_3D::APPEARANCE_SETTING_3D APPEARANCE_CONTROLS_3D::s_layerSettings[] = {
// text id tooltip
RR( _HKI( "Board Body" ), LAYER_3D_BOARD, _HKI( "Show board body" ) ),
RR( _HKI( "F.Cu" ), LAYER_3D_COPPER_TOP, _HKI( "Show front copper / surface finish color" ) ),
RR( _HKI( "B.Cu" ), LAYER_3D_COPPER_BOTTOM, _HKI( "Show back copper / surface finish color" ) ),
RR( _HKI( "Adhesive" ), LAYER_3D_ADHESIVE, _HKI( "Show adhesive" ) ),
RR( _HKI( "Solder Paste" ), LAYER_3D_SOLDERPASTE, _HKI( "Show solder paste" ) ),
RR( _HKI( "F.Silkscreen" ), LAYER_3D_SILKSCREEN_TOP, _HKI( "Show front silkscreen" ) ),
RR( _HKI( "B.Silkscreen" ), LAYER_3D_SILKSCREEN_BOTTOM, _HKI( "Show back silkscreen" ) ),
RR( _HKI( "F.Mask" ), LAYER_3D_SOLDERMASK_TOP, _HKI( "Show front solder mask" ) ),
RR( _HKI( "B.Mask" ), LAYER_3D_SOLDERMASK_BOTTOM, _HKI( "Show back solder mask" ) ),
RR( _HKI( "User.Drawings" ), LAYER_3D_USER_DRAWINGS, _HKI( "Show user drawings layer" ) ),
RR( _HKI( "User.Comments" ), LAYER_3D_USER_COMMENTS, _HKI( "Show user comments layer" ) ),
RR( _HKI( "User.Eco1" ), LAYER_3D_USER_ECO1, _HKI( "Show user ECO1 layer" ) ),
RR( _HKI( "User.Eco2" ), LAYER_3D_USER_ECO2, _HKI( "Show user ECO2 layer" ) ),
// text id tooltip
RR( _HKI( "Board Body" ), LAYER_3D_BOARD, _HKI( "Show board body" ) ),
RR( wxS( "F.Cu" ), LAYER_3D_COPPER_TOP, _HKI( "Show front copper / surface finish color" ) ),
RR( wxS( "B.Cu" ), LAYER_3D_COPPER_BOTTOM, _HKI( "Show back copper / surface finish color" ) ),
RR( _HKI( "Adhesive" ), LAYER_3D_ADHESIVE, _HKI( "Show adhesive" ) ),
RR( _HKI( "Solder Paste" ), LAYER_3D_SOLDERPASTE, _HKI( "Show solder paste" ) ),
RR( wxS( "F.Silkscreen" ), LAYER_3D_SILKSCREEN_TOP, _HKI( "Show front silkscreen" ) ),
RR( wxS( "B.Silkscreen" ), LAYER_3D_SILKSCREEN_BOTTOM, _HKI( "Show back silkscreen" ) ),
RR( wxS( "F.Mask" ), LAYER_3D_SOLDERMASK_TOP, _HKI( "Show front solder mask" ) ),
RR( wxS( "B.Mask" ), LAYER_3D_SOLDERMASK_BOTTOM, _HKI( "Show back solder mask" ) ),
RR( wxS( "User.Drawings" ), LAYER_3D_USER_DRAWINGS, _HKI( "Show user drawings layer" ) ),
RR( wxS( "User.Comments" ), LAYER_3D_USER_COMMENTS, _HKI( "Show user comments layer" ) ),
RR( wxS( "User.Eco1" ), LAYER_3D_USER_ECO1, _HKI( "Show user ECO1 layer" ) ),
RR( wxS( "User.Eco2" ), LAYER_3D_USER_ECO2, _HKI( "Show user ECO2 layer" ) ),
RR( wxS( "User.1" ), LAYER_3D_USER_1, _HKI( "Show user defined layer 1" ) ),
RR( wxS( "User.2" ), LAYER_3D_USER_2, _HKI( "Show user defined layer 2" ) ),
RR( wxS( "User.3" ), LAYER_3D_USER_3, _HKI( "Show user defined layer 3" ) ),
RR( wxS( "User.4" ), LAYER_3D_USER_4, _HKI( "Show user defined layer 4" ) ),
RR( wxS( "User.5" ), LAYER_3D_USER_5, _HKI( "Show user defined layer 5" ) ),
RR( wxS( "User.6" ), LAYER_3D_USER_6, _HKI( "Show user defined layer 6" ) ),
RR( wxS( "User.7" ), LAYER_3D_USER_7, _HKI( "Show user defined layer 7" ) ),
RR( wxS( "User.8" ), LAYER_3D_USER_8, _HKI( "Show user defined layer 8" ) ),
RR( wxS( "User.9" ), LAYER_3D_USER_9, _HKI( "Show user defined layer 9" ) ),
RR( wxS( "User.10" ), LAYER_3D_USER_10, _HKI( "Show user defined layer 10" ) ),
RR( wxS( "User.11" ), LAYER_3D_USER_11, _HKI( "Show user defined layer 11" ) ),
RR( wxS( "User.12" ), LAYER_3D_USER_12, _HKI( "Show user defined layer 12" ) ),
RR( wxS( "User.13" ), LAYER_3D_USER_13, _HKI( "Show user defined layer 13" ) ),
RR( wxS( "User.14" ), LAYER_3D_USER_14, _HKI( "Show user defined layer 14" ) ),
RR( wxS( "User.15" ), LAYER_3D_USER_15, _HKI( "Show user defined layer 15" ) ),
RR( wxS( "User.16" ), LAYER_3D_USER_16, _HKI( "Show user defined layer 16" ) ),
RR( wxS( "User.17" ), LAYER_3D_USER_17, _HKI( "Show user defined layer 17" ) ),
RR( wxS( "User.18" ), LAYER_3D_USER_18, _HKI( "Show user defined layer 18" ) ),
RR( wxS( "User.19" ), LAYER_3D_USER_19, _HKI( "Show user defined layer 19" ) ),
RR( wxS( "User.20" ), LAYER_3D_USER_20, _HKI( "Show user defined layer 20" ) ),
RR( wxS( "User.21" ), LAYER_3D_USER_21, _HKI( "Show user defined layer 21" ) ),
RR( wxS( "User.22" ), LAYER_3D_USER_22, _HKI( "Show user defined layer 22" ) ),
RR( wxS( "User.23" ), LAYER_3D_USER_23, _HKI( "Show user defined layer 23" ) ),
RR( wxS( "User.24" ), LAYER_3D_USER_24, _HKI( "Show user defined layer 24" ) ),
RR( wxS( "User.25" ), LAYER_3D_USER_25, _HKI( "Show user defined layer 25" ) ),
RR( wxS( "User.26" ), LAYER_3D_USER_26, _HKI( "Show user defined layer 26" ) ),
RR( wxS( "User.27" ), LAYER_3D_USER_27, _HKI( "Show user defined layer 27" ) ),
RR( wxS( "User.28" ), LAYER_3D_USER_28, _HKI( "Show user defined layer 28" ) ),
RR( wxS( "User.29" ), LAYER_3D_USER_29, _HKI( "Show user defined layer 29" ) ),
RR( wxS( "User.30" ), LAYER_3D_USER_30, _HKI( "Show user defined layer 30" ) ),
RR( wxS( "User.31" ), LAYER_3D_USER_31, _HKI( "Show user defined layer 31" ) ),
RR( wxS( "User.32" ), LAYER_3D_USER_32, _HKI( "Show user defined layer 32" ) ),
RR( wxS( "User.33" ), LAYER_3D_USER_33, _HKI( "Show user defined layer 33" ) ),
RR( wxS( "User.34" ), LAYER_3D_USER_34, _HKI( "Show user defined layer 34" ) ),
RR( wxS( "User.35" ), LAYER_3D_USER_35, _HKI( "Show user defined layer 35" ) ),
RR( wxS( "User.36" ), LAYER_3D_USER_36, _HKI( "Show user defined layer 36" ) ),
RR( wxS( "User.37" ), LAYER_3D_USER_37, _HKI( "Show user defined layer 37" ) ),
RR( wxS( "User.38" ), LAYER_3D_USER_38, _HKI( "Show user defined layer 38" ) ),
RR( wxS( "User.39" ), LAYER_3D_USER_39, _HKI( "Show user defined layer 39" ) ),
RR( wxS( "User.40" ), LAYER_3D_USER_40, _HKI( "Show user defined layer 40" ) ),
RR( wxS( "User.41" ), LAYER_3D_USER_41, _HKI( "Show user defined layer 41" ) ),
RR( wxS( "User.42" ), LAYER_3D_USER_42, _HKI( "Show user defined layer 42" ) ),
RR( wxS( "User.43" ), LAYER_3D_USER_43, _HKI( "Show user defined layer 43" ) ),
RR( wxS( "User.44" ), LAYER_3D_USER_44, _HKI( "Show user defined layer 44" ) ),
RR( wxS( "User.45" ), LAYER_3D_USER_45, _HKI( "Show user defined layer 45" ) ),
RR(),
RR( _HKI( "Through-hole Models" ), LAYER_3D_TH_MODELS, EDA_3D_ACTIONS::showTHT ),
RR( _HKI( "SMD Models" ), LAYER_3D_SMD_MODELS, EDA_3D_ACTIONS::showSMD ),
RR( _HKI( "Virtual Models" ), LAYER_3D_VIRTUAL_MODELS, EDA_3D_ACTIONS::showVirtual ),
RR( _HKI( "Models not in POS File" ), LAYER_3D_MODELS_NOT_IN_POS,
EDA_3D_ACTIONS::showNotInPosFile ),
RR( _HKI( "Models marked DNP" ), LAYER_3D_MODELS_MARKED_DNP, EDA_3D_ACTIONS::showDNP ),
RR( _HKI( "Model Bounding Boxes" ), LAYER_3D_BOUNDING_BOXES, EDA_3D_ACTIONS::showBBoxes ),
RR( _HKI( "Through-hole Models" ), LAYER_3D_TH_MODELS, EDA_3D_ACTIONS::showTHT ),
RR( _HKI( "SMD Models" ), LAYER_3D_SMD_MODELS, EDA_3D_ACTIONS::showSMD ),
RR( _HKI( "Virtual Models" ), LAYER_3D_VIRTUAL_MODELS, EDA_3D_ACTIONS::showVirtual ),
RR( _HKI( "Models not in POS File" ), LAYER_3D_MODELS_NOT_IN_POS, EDA_3D_ACTIONS::showNotInPosFile ),
RR( _HKI( "Models marked DNP" ), LAYER_3D_MODELS_MARKED_DNP, EDA_3D_ACTIONS::showDNP ),
RR( _HKI( "Model Bounding Boxes" ), LAYER_3D_BOUNDING_BOXES, EDA_3D_ACTIONS::showBBoxes ),
RR(),
RR( _HKI( "Values" ), LAYER_FP_VALUES, _HKI( "Show footprint values" ) ),
RR( _HKI( "References" ), LAYER_FP_REFERENCES, _HKI( "Show footprint references" ) ),
RR( _HKI( "Footprint Text" ), LAYER_FP_TEXT, _HKI( "Show all footprint text" ) ),
RR( _HKI( "Off-board Silkscreen" ), LAYER_3D_OFF_BOARD_SILK,
_HKI( "Do not clip silk layers to board outline" ) ),
RR( _HKI( "Values" ), LAYER_FP_VALUES, _HKI( "Show footprint values" ) ),
RR( _HKI( "References" ), LAYER_FP_REFERENCES, _HKI( "Show footprint references" ) ),
RR( _HKI( "Footprint Text" ), LAYER_FP_TEXT, _HKI( "Show all footprint text" ) ),
RR( _HKI( "Off-board Silkscreen" ), LAYER_3D_OFF_BOARD_SILK, _HKI( "Do not clip silk layers to board outline" ) ),
RR(),
RR( _HKI( "3D Axis" ), LAYER_3D_AXES, EDA_3D_ACTIONS::showAxis ),
RR( _HKI( "Background Start" ), LAYER_3D_BACKGROUND_TOP,
_HKI( "Background gradient start color" ) ),
RR( _HKI( "Background End" ), LAYER_3D_BACKGROUND_BOTTOM,
_HKI( "Background gradient end color" ) ),
RR( _HKI( "3D Navigator" ), LAYER_3D_NAVIGATOR, EDA_3D_ACTIONS::showNavigator ),
RR( _HKI( "Background Start" ), LAYER_3D_BACKGROUND_TOP, _HKI( "Background gradient start color" ) ),
RR( _HKI( "Background End" ), LAYER_3D_BACKGROUND_BOTTOM, _HKI( "Background gradient end color" ) ),
};
// The list of IDs that can have colors coming from the board stackup, and cannot be
// modified if use colors from stackup is activated
static std::vector<int> inStackupColors{ LAYER_3D_BOARD, LAYER_3D_COPPER_TOP,
LAYER_3D_COPPER_BOTTOM, LAYER_3D_SOLDERPASTE,
static std::vector<int> inStackupColors{ LAYER_3D_BOARD,
LAYER_3D_COPPER_TOP, LAYER_3D_COPPER_BOTTOM,
LAYER_3D_SOLDERPASTE,
LAYER_3D_SILKSCREEN_TOP, LAYER_3D_SILKSCREEN_BOTTOM,
LAYER_3D_SOLDERMASK_TOP, LAYER_3D_SOLDERMASK_BOTTOM
};
APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
wxWindow* aFocusOwner ) :
APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent, wxWindow* aFocusOwner ) :
APPEARANCE_CONTROLS_3D_BASE( aParent ),
m_frame( aParent ),
m_focusOwner( aFocusOwner ),
@@ -135,15 +175,14 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
cfg->m_UseStackupColors = aEvent.IsChecked();
UpdateLayerCtls();
syncLayerPresetSelection();
m_frame->NewDisplay( true );
} );
m_cbUseBoardEditorCopperColors = new wxCheckBox( m_panelLayers, wxID_ANY,
_( "Use board editor copper colors" ) );
_( "Use PCB editor copper colors" ) );
m_cbUseBoardEditorCopperColors->SetFont( infoFont );
m_cbUseBoardEditorCopperColors->SetToolTip(
_( "Use the board editor copper colors (openGL only)" ) );
m_cbUseBoardEditorCopperColors->SetToolTip( _( "Use the board editor layer colors for copper "
"layers (realtime renderer only)" ) );
m_cbUseBoardEditorCopperColors->Bind( wxEVT_CHECKBOX,
[this]( wxCommandEvent& aEvent )
@@ -152,27 +191,24 @@ APPEARANCE_CONTROLS_3D::APPEARANCE_CONTROLS_3D( EDA_3D_VIEWER_FRAME* aParent,
cfg->m_Render.use_board_editor_copper_colors = aEvent.IsChecked();
UpdateLayerCtls();
syncLayerPresetSelection();
m_frame->NewDisplay( true );
} );
m_panelLayersSizer->Add( m_cbUseBoardStackupColors, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 7 );
m_panelLayersSizer->Add( m_cbUseBoardStackupColors, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 5 );
m_panelLayersSizer->Add( m_cbUseBoardEditorCopperColors, 0,
wxEXPAND | wxTOP | wxLEFT | wxRIGHT, 7 );
wxEXPAND | wxALL, 5 );
m_cbLayerPresets->SetToolTip( wxString::Format( _( "Save and restore color and visibility "
"combinations.\n"
m_cbLayerPresets->SetToolTip( wxString::Format( _( "Save and restore color and visibility combinations.\n"
"Use %s+Tab to activate selector.\n"
"Successive Tabs while holding %s down will "
"cycle through presets in the popup." ),
"Successive Tabs while holding %s down will cycle through "
"presets in the popup." ),
KeyNameFromKeyCode( PRESET_SWITCH_KEY ),
KeyNameFromKeyCode( PRESET_SWITCH_KEY ) ) );
m_cbViewports->SetToolTip( wxString::Format( _( "Save and restore camera position and zoom.\n"
"Use %s+Tab to activate selector.\n"
"Successive Tabs while holding %s down will "
"cycle through viewports in the popup." ),
"Successive Tabs while holding %s down will cycle through "
"viewports in the popup." ),
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ),
KeyNameFromKeyCode( VIEWPORT_SWITCH_KEY ) ) );
@@ -273,22 +309,19 @@ void APPEARANCE_CONTROLS_3D::CommonSettingsChanged()
rebuildControls();
UpdateLayerCtls();
syncLayerPresetSelection();
const wxString& currentPreset = m_frame->GetAdapter().m_Cfg->m_CurrentPreset;
if( currentPreset == FOLLOW_PCB || currentPreset == FOLLOW_PLOT_SETTINGS )
updateLayerPresetWidget( currentPreset );
else
syncLayerPresetSelection();
}
void APPEARANCE_CONTROLS_3D::ApplyLayerPreset( const wxString& aPresetName )
{
if( aPresetName == FOLLOW_PCB || aPresetName == FOLLOW_PLOT_SETTINGS )
{
m_frame->GetAdapter().m_Cfg->m_CurrentPreset = aPresetName;
UpdateLayerCtls();
m_frame->NewDisplay( true );
}
else if( LAYER_PRESET_3D* preset = m_frame->GetAdapter().m_Cfg->FindPreset( aPresetName ) )
{
doApplyLayerPreset( *preset );
}
doApplyLayerPreset( aPresetName );
// Move to front of MRU list
if( m_presetMRU.Index( aPresetName ) != wxNOT_FOUND )
@@ -420,6 +453,10 @@ void APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged( int aLayer, bool isVisibl
default:
visibleLayers.set( aLayer, isVisible );
if( aLayer >= LAYER_3D_USER_1 && aLayer <= LAYER_3D_USER_45 )
killFollow = true;
break;
}
@@ -435,8 +472,7 @@ void APPEARANCE_CONTROLS_3D::OnLayerVisibilityChanged( int aLayer, bool isVisibl
if( doFastRefresh && m_frame->GetAdapter().m_Cfg->m_Render.engine == RENDER_ENGINE::OPENGL )
{
RENDER_3D_OPENGL* renderer =
static_cast<RENDER_3D_OPENGL*>( m_frame->GetCanvas()->GetCurrentRender() );
RENDER_3D_OPENGL* renderer = static_cast<RENDER_3D_OPENGL*>( m_frame->GetCanvas()->GetCurrentRender() );
renderer->Load3dModelsIfNeeded();
m_frame->GetCanvas()->Request_refresh();
}
@@ -453,7 +489,6 @@ void APPEARANCE_CONTROLS_3D::onColorSwatchChanged( COLOR_SWATCH* aSwatch )
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
m_frame->GetAdapter().SetVisibleLayers( visibleLayers );
m_frame->GetAdapter().SetLayerColors( colors );
int layer = aSwatch->GetId();
COLOR4D newColor = aSwatch->GetSwatchColor();
@@ -467,7 +502,12 @@ void APPEARANCE_CONTROLS_3D::onColorSwatchChanged( COLOR_SWATCH* aSwatch )
m_frame->GetAdapter().SetLayerColors( colors );
syncLayerPresetSelection();
const wxString& currentPreset = m_frame->GetAdapter().m_Cfg->m_CurrentPreset;
if( currentPreset == FOLLOW_PCB || currentPreset == FOLLOW_PLOT_SETTINGS )
updateLayerPresetWidget( currentPreset );
else
syncLayerPresetSelection();
m_frame->NewDisplay( true );
}
@@ -480,6 +520,7 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
std::bitset<LAYER_3D_END> visibleLayers = m_frame->GetAdapter().GetVisibleLayers();
std::map<int, COLOR4D> colors = m_frame->GetAdapter().GetLayerColors();
std::map<int, COLOR4D> defaultColors = m_frame->GetAdapter().GetDefaultColors();
LSET enabled = m_frame->GetBoard()->GetEnabledLayers();
m_layerSettings.clear();
m_layersOuterSizer->Clear( true );
@@ -534,8 +575,13 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
sizer->AddSpacer( 5 );
wxStaticText* label = new wxStaticText( m_windowLayers, layer,
aSetting->GetLabel() );
wxString layerName = aSetting->GetLabel();
PCB_LAYER_ID boardLayer = Map3DLayerToPCBLayer( layer );
if( boardLayer != UNDEFINED_LAYER )
layerName = m_frame->GetBoard()->GetLayerName( boardLayer );
wxStaticText* label = new wxStaticText( m_windowLayers, layer, layerName );
label->Wrap( -1 );
label->SetToolTip( aSetting->GetTooltip() );
@@ -545,9 +591,10 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
}
else
{
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE(
m_windowLayers, layer, KiBitmapBundle( BITMAPS::visibility ),
KiBitmapBundle( BITMAPS::visibility_off ), aSetting->m_Visible );
BITMAP_TOGGLE* btn_visible = new BITMAP_TOGGLE( m_windowLayers, layer,
KiBitmapBundle( BITMAPS::visibility ),
KiBitmapBundle( BITMAPS::visibility_off ),
aSetting->m_Visible );
btn_visible->Bind( TOGGLE_CHANGED,
[this]( wxCommandEvent& aEvent )
@@ -580,9 +627,18 @@ void APPEARANCE_CONTROLS_3D::rebuildLayers()
std::unique_ptr<APPEARANCE_SETTING_3D>& setting = m_layerSettings.back();
if( setting->m_Spacer )
{
m_layersOuterSizer->AddSpacer( m_pointSize );
}
else if( setting->m_Id >= LAYER_3D_USER_1 && setting->m_Id <= LAYER_3D_USER_45 )
{
if( enabled.test( Map3DLayerToPCBLayer( setting->m_Id ) ) )
appendLayer( setting );
}
else
{
appendLayer( setting );
}
m_layerSettingsMap[setting->m_Id] = setting.get();
}
@@ -611,12 +667,8 @@ void APPEARANCE_CONTROLS_3D::UpdateLayerCtls()
// if cfg->m_UseStackupColors is set, board colors cannot be modified locally, but
// other colors can be
if( std::find( inStackupColors.begin(), inStackupColors.end(), setting->m_Id )
!= inStackupColors.end() )
{
if( cfg )
setting->m_Ctl_color->SetReadOnly( cfg->m_UseStackupColors );
}
if( alg::contains( inStackupColors, setting->m_Id ) && cfg )
setting->m_Ctl_color->SetReadOnly( cfg->m_UseStackupColors );
}
}
@@ -663,11 +715,8 @@ void APPEARANCE_CONTROLS_3D::syncLayerPresetSelection()
presets.begin(), presets.end(),
[&]( const LAYER_PRESET_3D& aPreset )
{
if( aPreset.name.Lower() == _( "legacy colors" )
&& m_cbUseBoardStackupColors->GetValue() )
{
if( aPreset.name.Lower() == _( "legacy colors" ) && m_cbUseBoardStackupColors->GetValue() )
return false;
}
for( int layer = LAYER_3D_BOARD; layer < LAYER_3D_END; ++layer )
{
@@ -731,17 +780,11 @@ void APPEARANCE_CONTROLS_3D::onLayerPresetChanged( wxCommandEvent& aEvent )
if( index == 0 )
{
name = FOLLOW_PCB;
cfg->m_CurrentPreset = name;
UpdateLayerCtls();
m_frame->NewDisplay( true );
doApplyLayerPreset( FOLLOW_PCB );
}
else if( index == 1 )
{
name = FOLLOW_PLOT_SETTINGS;
cfg->m_CurrentPreset = name;
UpdateLayerCtls();
m_frame->NewDisplay( true );
doApplyLayerPreset( FOLLOW_PLOT_SETTINGS );
}
else if( index == count - 3 )
{
@@ -821,16 +864,16 @@ void APPEARANCE_CONTROLS_3D::onLayerPresetChanged( wxCommandEvent& aEvent )
if( cfg->m_CurrentPreset == name )
cfg->m_CurrentPreset = wxEmptyString;
m_presetMRU.Remove( name );
if( m_presetMRU.Index( name ) >= 0 )
m_presetMRU.Remove( name );
}
resetSelection();
return;
}
else if( LAYER_PRESET_3D* preset = cfg->FindPreset( m_cbLayerPresets->GetStringSelection() ) )
else
{
name = preset->name;
doApplyLayerPreset( *preset );
doApplyLayerPreset( m_cbLayerPresets->GetStringSelection() );
}
// Move to front of MRU list
@@ -843,16 +886,28 @@ void APPEARANCE_CONTROLS_3D::onLayerPresetChanged( wxCommandEvent& aEvent )
}
void APPEARANCE_CONTROLS_3D::doApplyLayerPreset( const LAYER_PRESET_3D& aPreset )
void APPEARANCE_CONTROLS_3D::doApplyLayerPreset( const wxString& aPresetName )
{
BOARD_ADAPTER& adapter = m_frame->GetAdapter();
adapter.m_Cfg->m_CurrentPreset = aPreset.name;
adapter.SetVisibleLayers( aPreset.layers );
adapter.SetLayerColors( aPreset.colors );
if( aPresetName == FOLLOW_PCB || aPresetName == FOLLOW_PLOT_SETTINGS )
{
adapter.m_Cfg->m_CurrentPreset = aPresetName;
adapter.SetVisibleLayers( adapter.GetVisibleLayers() );
}
else if( LAYER_PRESET_3D* preset = adapter.m_Cfg->FindPreset( aPresetName ) )
{
adapter.m_Cfg->m_CurrentPreset = aPresetName;
adapter.SetVisibleLayers( preset->layers );
adapter.SetLayerColors( preset->colors );
if( aPreset.name.Lower() == _( "legacy colors" ) )
adapter.m_Cfg->m_UseStackupColors = false;
if( preset->name.Lower() == _( "legacy colors" ) )
adapter.m_Cfg->m_UseStackupColors = false;
}
else
{
return;
}
UpdateLayerCtls();
m_frame->NewDisplay( true );
@@ -922,8 +977,7 @@ void APPEARANCE_CONTROLS_3D::onViewportChanged( wxCommandEvent& aEvent )
{
m_viewports[name] = VIEWPORT3D( name, m_frame->GetCurrentCamera().GetViewMatrix() );
index = m_cbViewports->Insert( name, index-1,
static_cast<void*>( &m_viewports[name] ) );
index = m_cbViewports->Insert( name, index-1, static_cast<void*>( &m_viewports[name] ) );
}
else
{
+1 -1
View File
@@ -157,7 +157,7 @@ private:
void onLayerPresetChanged( wxCommandEvent& aEvent ) override;
void doApplyLayerPreset( const LAYER_PRESET_3D& aPreset );
void doApplyLayerPreset( const wxString& aPresetName );
void onViewportChanged( wxCommandEvent& aEvent ) override;
void onUpdateViewportsCb( wxUpdateUIEvent& aEvent ) override;
@@ -11,7 +11,7 @@
APPEARANCE_CONTROLS_3D_BASE::APPEARANCE_CONTROLS_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : WX_PANEL( parent, id, pos, size, style, name )
{
this->SetMinSize( wxSize( 200,360 ) );
this->SetMinSize( wxSize( 210,360 ) );
m_sizerOuter = new wxBoxSizer( wxVERTICAL );
@@ -45,7 +45,7 @@
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="maximum_size"></property>
<property name="minimum_size">200,360</property>
<property name="minimum_size">210,360</property>
<property name="name">APPEARANCE_CONTROLS_3D_BASE</property>
<property name="pos"></property>
<property name="size">-1,-1</property>
+14 -18
View File
@@ -64,32 +64,28 @@ void PANEL_3D_DISPLAY_OPTIONS::loadViewSettings( EDA_3D_VIEWER_SETTINGS* aCfg )
bool PANEL_3D_DISPLAY_OPTIONS::TransferDataToWindow()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
loadViewSettings( cfg );
loadViewSettings( GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
return true;
}
bool PANEL_3D_DISPLAY_OPTIONS::TransferDataFromWindow()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
{
// Set visibility of items
cfg->m_Render.show_zones = m_checkBoxAreas->GetValue();
cfg->m_Render.subtract_mask_from_silk = m_checkBoxSubtractMaskFromSilk->GetValue();
cfg->m_Render.clip_silk_on_via_annuli = m_checkBoxClipSilkOnViaAnnulus->GetValue();
cfg->m_Render.differentiate_plated_copper = m_checkBoxRenderPlatedPadsAsPlated->GetValue();
// Set visibility of items
cfg->m_Render.show_zones = m_checkBoxAreas->GetValue();
cfg->m_Render.subtract_mask_from_silk = m_checkBoxSubtractMaskFromSilk->GetValue();
cfg->m_Render.clip_silk_on_via_annuli = m_checkBoxClipSilkOnViaAnnulus->GetValue();
cfg->m_Render.differentiate_plated_copper = m_checkBoxRenderPlatedPadsAsPlated->GetValue();
cfg->m_Render.material_mode = static_cast<MATERIAL_MODE>( m_materialProperties->GetSelection() );
cfg->m_Render.material_mode = static_cast<MATERIAL_MODE>( m_materialProperties->GetSelection() );
// Camera Options
cfg->m_Camera.animation_enabled = m_checkBoxEnableAnimation->GetValue();
cfg->m_Camera.moving_speed_multiplier = m_sliderAnimationSpeed->GetValue();
cfg->m_Camera.rotation_increment = m_spinCtrlRotationAngle->GetValue();
// Camera Options
cfg->m_Camera.animation_enabled = m_checkBoxEnableAnimation->GetValue();
cfg->m_Camera.moving_speed_multiplier = m_sliderAnimationSpeed->GetValue();
cfg->m_Camera.rotation_increment = m_spinCtrlRotationAngle->GetValue();
}
return true;
}
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -25,7 +25,7 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
bSizeLeft->Add( m_renderOptionsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizeLeft->Add( m_staticline4, 0, wxEXPAND|wxBOTTOM, 5 );
bSizeLeft->Add( m_staticline4, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxFlexGridSizer* fgSizer2;
fgSizer2 = new wxFlexGridSizer( 0, 1, 5, 0 );
@@ -33,7 +33,7 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_checkBoxClipSilkOnViaAnnulus = new wxCheckBox( this, wxID_ANY, _("Clip silkscreen at via annuli"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxLEFT, 5 );
fgSizer2->Add( m_checkBoxClipSilkOnViaAnnulus, 0, wxTOP|wxLEFT, 5 );
m_checkBoxSubtractMaskFromSilk = new wxCheckBox( this, wxID_ANY, _("Clip silkscreen at solder mask edges"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer2->Add( m_checkBoxSubtractMaskFromSilk, 0, wxLEFT, 5 );
@@ -76,22 +76,22 @@ PANEL_3D_DISPLAY_OPTIONS_BASE::PANEL_3D_DISPLAY_OPTIONS_BASE( wxWindow* parent,
bSizerRight->Add( m_cameraOptionsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline5 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerRight->Add( m_staticline5, 0, wxEXPAND|wxBOTTOM, 5 );
bSizerRight->Add( m_staticline5, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxBoxSizer* bSizerRotAngle;
bSizerRotAngle = new wxBoxSizer( wxHORIZONTAL );
m_staticTextRotAngle = new wxStaticText( this, wxID_ANY, _("Rotation increment:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRotAngle->Wrap( -1 );
bSizerRotAngle->Add( m_staticTextRotAngle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bSizerRotAngle->Add( m_staticTextRotAngle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_spinCtrlRotationAngle = new wxSpinCtrlDouble( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 359, 10, 1 );
m_spinCtrlRotationAngle->SetDigits( 0 );
bSizerRotAngle->Add( m_spinCtrlRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bSizerRotAngle->Add( m_spinCtrlRotationAngle, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_staticTextRotAngleUnits = new wxStaticText( this, wxID_ANY, _("deg"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRotAngleUnits->Wrap( -1 );
bSizerRotAngle->Add( m_staticTextRotAngleUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
bSizerRotAngle->Add( m_staticTextRotAngleUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
bSizerRight->Add( bSizerRotAngle, 0, wxTOP|wxLEFT, 5 );
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -27,7 +27,6 @@
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_3D_DISPLAY_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
+14 -19
View File
@@ -49,39 +49,34 @@ void PANEL_3D_OPENGL_OPTIONS::loadSettings( EDA_3D_VIEWER_SETTINGS* aCfg )
m_checkBoxDisableAAMove->SetValue( aCfg->m_Render.opengl_AA_disableOnMove );
m_checkBoxDisableMoveThickness->SetValue( aCfg->m_Render.opengl_thickness_disableOnMove );
m_checkBoxDisableMoveVias->SetValue( aCfg->m_Render.opengl_vias_disableOnMove );
m_checkBoxDisableMoveVias->SetValue( aCfg->m_Render.opengl_microvias_disableOnMove );
m_checkBoxDisableMoveHoles->SetValue( aCfg->m_Render.opengl_holes_disableOnMove );
}
bool PANEL_3D_OPENGL_OPTIONS::TransferDataToWindow()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
loadSettings( cfg );
loadSettings( GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
return true;
}
bool PANEL_3D_OPENGL_OPTIONS::TransferDataFromWindow()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
{
cfg->m_Render.opengl_copper_thickness = m_checkBoxCuThickness->GetValue();
cfg->m_Render.show_model_bbox = m_checkBoxBoundingBoxes->GetValue();
cfg->m_Render.highlight_on_rollover = m_checkBoxHighlightOnRollOver->GetValue();
cfg->m_Render.opengl_copper_thickness = m_checkBoxCuThickness->GetValue();
cfg->m_Render.show_model_bbox = m_checkBoxBoundingBoxes->GetValue();
cfg->m_Render.highlight_on_rollover = m_checkBoxHighlightOnRollOver->GetValue();
cfg->m_Render.opengl_AA_mode = static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() );
cfg->m_Render.opengl_selection_color = m_selectionColorSwatch->GetSwatchColor();
cfg->m_Render.opengl_AA_mode =
static_cast<ANTIALIASING_MODE>( m_choiceAntiAliasing->GetSelection() );
cfg->m_Render.opengl_selection_color = m_selectionColorSwatch->GetSwatchColor();
cfg->m_Render.opengl_AA_disableOnMove = m_checkBoxDisableAAMove->GetValue();
cfg->m_Render.opengl_thickness_disableOnMove = m_checkBoxDisableMoveThickness->GetValue();
cfg->m_Render.opengl_vias_disableOnMove = m_checkBoxDisableMoveVias->GetValue();
cfg->m_Render.opengl_holes_disableOnMove = m_checkBoxDisableMoveHoles->GetValue();
cfg->m_Render.opengl_AA_disableOnMove = m_checkBoxDisableAAMove->GetValue();
cfg->m_Render.opengl_thickness_disableOnMove = m_checkBoxDisableMoveThickness->GetValue();
cfg->m_Render.opengl_microvias_disableOnMove = m_checkBoxDisableMoveVias->GetValue();
cfg->m_Render.opengl_holes_disableOnMove = m_checkBoxDisableMoveHoles->GetValue();
}
return true;
}
@@ -32,7 +32,7 @@ PANEL_3D_OPENGL_OPTIONS_BASE::PANEL_3D_OPENGL_OPTIONS_BASE( wxWindow* parent, wx
m_checkBoxBoundingBoxes = new wxCheckBox( this, wxID_ANY, _("Show model bounding boxes"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerMargins->Add( m_checkBoxBoundingBoxes, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_checkBoxCuThickness = new wxCheckBox( this, wxID_ANY, _("Show copper and tech layers thickness (very slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxCuThickness = new wxCheckBox( this, wxID_ANY, _("Show copper and tech layers thickness (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
bSizerMargins->Add( m_checkBoxCuThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_checkBoxHighlightOnRollOver = new wxCheckBox( this, wxID_ANY, _("Highlight items on rollover"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -88,10 +88,10 @@ PANEL_3D_OPENGL_OPTIONS_BASE::PANEL_3D_OPENGL_OPTIONS_BASE( wxWindow* parent, wx
m_checkBoxDisableMoveThickness = new wxCheckBox( this, wxID_ANY, _("Disable thickness"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3->Add( m_checkBoxDisableMoveThickness, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_checkBoxDisableMoveVias = new wxCheckBox( this, wxID_ANY, _("Disable vias"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxDisableMoveVias = new wxCheckBox( this, wxID_ANY, _("Disable uVia holes"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3->Add( m_checkBoxDisableMoveVias, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_checkBoxDisableMoveHoles = new wxCheckBox( this, wxID_ANY, _("Disable holes"), wxDefaultPosition, wxDefaultSize, 0 );
m_checkBoxDisableMoveHoles = new wxCheckBox( this, wxID_ANY, _("Disable all plated holes"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3->Add( m_checkBoxDisableMoveHoles, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
@@ -299,7 +299,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Show copper and tech layers thickness (very slow)</property>
<property name="label">Show copper and tech layers thickness (slow)</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -977,7 +977,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Disable vias</property>
<property name="label">Disable uVia holes</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -1042,7 +1042,7 @@
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Disable holes</property>
<property name="label">Disable all plated holes</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
@@ -110,85 +110,78 @@ void PANEL_3D_RAYTRACING_OPTIONS::loadSettings( EDA_3D_VIEWER_SETTINGS* aCfg )
bool PANEL_3D_RAYTRACING_OPTIONS::TransferDataToWindow()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
loadSettings( cfg );
loadSettings( GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) );
return true;
}
bool PANEL_3D_RAYTRACING_OPTIONS::TransferDataFromWindow()
{
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
{
cfg->m_Render.raytrace_shadows = m_cbRaytracing_renderShadows->GetValue();
cfg->m_Render.raytrace_backfloor = m_cbRaytracing_addFloor->GetValue();
cfg->m_Render.raytrace_refractions = m_cbRaytracing_showRefractions->GetValue();
cfg->m_Render.raytrace_reflections = m_cbRaytracing_showReflections->GetValue();
cfg->m_Render.raytrace_post_processing = m_cbRaytracing_postProcessing->GetValue();
cfg->m_Render.raytrace_anti_aliasing = m_cbRaytracing_antiAliasing->GetValue();
cfg->m_Render.raytrace_procedural_textures = m_cbRaytracing_proceduralTextures->GetValue();
cfg->m_Render.raytrace_shadows = m_cbRaytracing_renderShadows->GetValue();
cfg->m_Render.raytrace_backfloor = m_cbRaytracing_addFloor->GetValue();
cfg->m_Render.raytrace_refractions = m_cbRaytracing_showRefractions->GetValue();
cfg->m_Render.raytrace_reflections = m_cbRaytracing_showReflections->GetValue();
cfg->m_Render.raytrace_post_processing = m_cbRaytracing_postProcessing->GetValue();
cfg->m_Render.raytrace_anti_aliasing = m_cbRaytracing_antiAliasing->GetValue();
cfg->m_Render.raytrace_procedural_textures = m_cbRaytracing_proceduralTextures->GetValue();
cfg->m_Render.raytrace_nrsamples_shadows = m_numSamples_Shadows->GetValue();
cfg->m_Render.raytrace_nrsamples_reflections = m_numSamples_Reflections->GetValue();
cfg->m_Render.raytrace_nrsamples_refractions = m_numSamples_Refractions->GetValue();
cfg->m_Render.raytrace_nrsamples_shadows = m_numSamples_Shadows->GetValue();
cfg->m_Render.raytrace_nrsamples_reflections = m_numSamples_Reflections->GetValue();
cfg->m_Render.raytrace_nrsamples_refractions = m_numSamples_Refractions->GetValue();
cfg->m_Render.raytrace_spread_shadows =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::PERCENT,
m_spreadFactor_Shadows->GetValue() ) / 100.0f;
cfg->m_Render.raytrace_spread_reflections =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::PERCENT,
m_spreadFactor_Reflections->GetValue() ) / 100.0f;
cfg->m_Render.raytrace_spread_refractions =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::PERCENT,
m_spreadFactor_Refractions->GetValue() ) / 100.0f;
cfg->m_Render.raytrace_spread_shadows =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::PERCENT,
m_spreadFactor_Shadows->GetValue() )
/ 100.0f;
cfg->m_Render.raytrace_spread_reflections =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::PERCENT,
m_spreadFactor_Reflections->GetValue() )
/ 100.0f;
cfg->m_Render.raytrace_spread_refractions =
EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::PERCENT,
m_spreadFactor_Refractions->GetValue() )
/ 100.0f;
cfg->m_Render.raytrace_recursivelevel_reflections = m_recursiveLevel_Reflections->GetValue();
cfg->m_Render.raytrace_recursivelevel_refractions = m_recursiveLevel_Refractions->GetValue();
cfg->m_Render.raytrace_recursivelevel_reflections = m_recursiveLevel_Reflections->GetValue();
cfg->m_Render.raytrace_recursivelevel_refractions = m_recursiveLevel_Refractions->GetValue();
cfg->m_Render.raytrace_lightColorCamera = m_colourPickerCameraLight->GetSwatchColor();
cfg->m_Render.raytrace_lightColorTop = m_colourPickerTopLight->GetSwatchColor();
cfg->m_Render.raytrace_lightColorBottom = m_colourPickerBottomLight->GetSwatchColor();
cfg->m_Render.raytrace_lightColorCamera = m_colourPickerCameraLight->GetSwatchColor();
cfg->m_Render.raytrace_lightColorTop = m_colourPickerTopLight->GetSwatchColor();
cfg->m_Render.raytrace_lightColorBottom = m_colourPickerBottomLight->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[0] = m_colourPickerLight1->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[1] = m_colourPickerLight2->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[2] = m_colourPickerLight3->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[3] = m_colourPickerLight4->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[4] = m_colourPickerLight5->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[5] = m_colourPickerLight6->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[6] = m_colourPickerLight7->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[7] = m_colourPickerLight8->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[0] = m_colourPickerLight1->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[1] = m_colourPickerLight2->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[2] = m_colourPickerLight3->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[3] = m_colourPickerLight4->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[4] = m_colourPickerLight5->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[5] = m_colourPickerLight6->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[6] = m_colourPickerLight7->GetSwatchColor();
cfg->m_Render.raytrace_lightColor[7] = m_colourPickerLight8->GetSwatchColor();
auto get_value =
[]( wxTextCtrl* aCtrl )
{
return EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
aCtrl->GetValue() );
};
auto get_value =
[]( wxTextCtrl* aCtrl )
{
return EDA_UNIT_UTILS::UI::DoubleValueFromString( pcbIUScale, EDA_UNITS::UNSCALED,
aCtrl->GetValue() );
};
cfg->m_Render.raytrace_lightElevation[0] = get_value( m_lightElevation1 );
cfg->m_Render.raytrace_lightElevation[1] = get_value( m_lightElevation2 );
cfg->m_Render.raytrace_lightElevation[2] = get_value( m_lightElevation3 );
cfg->m_Render.raytrace_lightElevation[3] = get_value( m_lightElevation4 );
cfg->m_Render.raytrace_lightElevation[4] = get_value( m_lightElevation5 );
cfg->m_Render.raytrace_lightElevation[5] = get_value( m_lightElevation6 );
cfg->m_Render.raytrace_lightElevation[6] = get_value( m_lightElevation7 );
cfg->m_Render.raytrace_lightElevation[7] = get_value( m_lightElevation8 );
cfg->m_Render.raytrace_lightElevation[0] = get_value( m_lightElevation1 );
cfg->m_Render.raytrace_lightElevation[1] = get_value( m_lightElevation2 );
cfg->m_Render.raytrace_lightElevation[2] = get_value( m_lightElevation3 );
cfg->m_Render.raytrace_lightElevation[3] = get_value( m_lightElevation4 );
cfg->m_Render.raytrace_lightElevation[4] = get_value( m_lightElevation5 );
cfg->m_Render.raytrace_lightElevation[5] = get_value( m_lightElevation6 );
cfg->m_Render.raytrace_lightElevation[6] = get_value( m_lightElevation7 );
cfg->m_Render.raytrace_lightElevation[7] = get_value( m_lightElevation8 );
cfg->m_Render.raytrace_lightAzimuth[0] = get_value( m_lightAzimuth1 );
cfg->m_Render.raytrace_lightAzimuth[1] = get_value( m_lightAzimuth2 );
cfg->m_Render.raytrace_lightAzimuth[2] = get_value( m_lightAzimuth3 );
cfg->m_Render.raytrace_lightAzimuth[3] = get_value( m_lightAzimuth4 );
cfg->m_Render.raytrace_lightAzimuth[4] = get_value( m_lightAzimuth5 );
cfg->m_Render.raytrace_lightAzimuth[5] = get_value( m_lightAzimuth6 );
cfg->m_Render.raytrace_lightAzimuth[6] = get_value( m_lightAzimuth7 );
cfg->m_Render.raytrace_lightAzimuth[7] = get_value( m_lightAzimuth8 );
cfg->m_Render.raytrace_lightAzimuth[0] = get_value( m_lightAzimuth1 );
cfg->m_Render.raytrace_lightAzimuth[1] = get_value( m_lightAzimuth2 );
cfg->m_Render.raytrace_lightAzimuth[2] = get_value( m_lightAzimuth3 );
cfg->m_Render.raytrace_lightAzimuth[3] = get_value( m_lightAzimuth4 );
cfg->m_Render.raytrace_lightAzimuth[4] = get_value( m_lightAzimuth5 );
cfg->m_Render.raytrace_lightAzimuth[5] = get_value( m_lightAzimuth6 );
cfg->m_Render.raytrace_lightAzimuth[6] = get_value( m_lightAzimuth7 );
cfg->m_Render.raytrace_lightAzimuth[7] = get_value( m_lightAzimuth8 );
}
return true;
}
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -19,22 +19,25 @@ PANEL_3D_RAYTRACING_OPTIONS_BASE::PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* pa
bSizerMain->Add( m_renderingLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 13 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM, 5 );
bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
bSizerMain->Add( 0, 5, 0, wxEXPAND, 5 );
wxGridSizer* gSizer1;
gSizer1 = new wxGridSizer( 0, 1, 0, 20 );
m_cbRaytracing_proceduralTextures = new wxCheckBox( this, wxID_ANY, _("Procedural textures (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_proceduralTextures->SetValue(true);
gSizer1->Add( m_cbRaytracing_proceduralTextures, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
gSizer1->Add( m_cbRaytracing_proceduralTextures, 0, wxRIGHT|wxLEFT, 5 );
m_cbRaytracing_addFloor = new wxCheckBox( this, wxID_ANY, _("Add floor (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_addFloor->SetValue(true);
gSizer1->Add( m_cbRaytracing_addFloor, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
gSizer1->Add( m_cbRaytracing_addFloor, 0, wxRIGHT|wxLEFT, 5 );
m_cbRaytracing_antiAliasing = new wxCheckBox( this, wxID_ANY, _("Anti-aliasing (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_antiAliasing->SetValue(true);
gSizer1->Add( m_cbRaytracing_antiAliasing, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
gSizer1->Add( m_cbRaytracing_antiAliasing, 0, wxRIGHT|wxLEFT, 5 );
m_cbRaytracing_postProcessing = new wxCheckBox( this, wxID_ANY, _("Screen space ambient occlusions and global illumination reflections (slow)"), wxDefaultPosition, wxDefaultSize, 0 );
m_cbRaytracing_postProcessing->SetValue(true);
@@ -123,7 +126,7 @@ PANEL_3D_RAYTRACING_OPTIONS_BASE::PANEL_3D_RAYTRACING_OPTIONS_BASE( wxWindow* pa
bSizerMain->Add( m_lightsLabel, 0, wxTOP|wxRIGHT|wxLEFT, 13 );
m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bSizerMain->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM, 5 );
bSizerMain->Add( m_staticline2, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
wxBoxSizer* bLightsSizer;
bLightsSizer = new wxBoxSizer( wxVERTICAL );
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@@ -27,7 +27,6 @@
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_3D_RAYTRACING_OPTIONS_BASE
///////////////////////////////////////////////////////////////////////////////
+26 -32
View File
@@ -27,6 +27,7 @@
#include "panel_preview_3d_model.h"
#include <dialogs/dialog_unit_entry.h>
#include <3d_canvas/eda_3d_canvas.h>
#include <3d_rendering/opengl/render_3d_opengl.h>
#include <tool/tool_manager.h>
#include <tool/tool_dispatcher.h>
#include <tools/eda_3d_actions.h>
@@ -64,12 +65,11 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
m_dummyBoard = new BOARD();
m_dummyBoard->SetProject( &aFrame->Prj(), true );
m_dummyBoard->SetEmbeddedFilesDelegate( aFrame->GetBoard() );
// This board will only be used to hold a footprint for viewing
m_dummyBoard->SetBoardUse( BOARD_USE::FPHOLDER );
m_bodyStyleShowAll = true;
BOARD_DESIGN_SETTINGS parent_bds = aFrame->GetDesignSettings();
BOARD_DESIGN_SETTINGS& dummy_bds = m_dummyBoard->GetDesignSettings();
dummy_bds.SetBoardThickness( parent_bds.GetBoardThickness() );
@@ -212,10 +212,7 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
// TODO(JE) use all control options
m_boardAdapter.m_MousewheelPanning = settings->m_Input.scroll_modifier_zoom != 0;
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
EDA_3D_VIEWER_SETTINGS* cfg = mgr.GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" );
if( cfg )
if( EDA_3D_VIEWER_SETTINGS* cfg = GetAppSettings<EDA_3D_VIEWER_SETTINGS>( "3d_viewer" ) )
{
// Save the 3D viewer render settings, to restore it after closing the preview
m_initialRender = cfg->m_Render;
@@ -225,16 +222,6 @@ void PANEL_PREVIEW_3D_MODEL::loadSettings()
m_previewPane->SetAnimationEnabled( cfg->m_Camera.animation_enabled );
m_previewPane->SetMovingSpeedMultiplier( cfg->m_Camera.moving_speed_multiplier );
m_previewPane->SetProjectionMode( cfg->m_Camera.projection_mode );
// Ensure the board body is always shown, and do not use the settings of the 3D viewer
cfg->m_Render.show_copper_top = m_bodyStyleShowAll;
cfg->m_Render.show_copper_bottom = m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_top = m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_bottom = m_bodyStyleShowAll;
cfg->m_Render.show_solderpaste = m_bodyStyleShowAll;
cfg->m_Render.show_zones = m_bodyStyleShowAll;
cfg->m_Render.show_board_body = m_bodyStyleShowAll;
cfg->m_Render.use_board_editor_copper_colors = false;
}
}
@@ -286,7 +273,7 @@ wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
wxString PANEL_PREVIEW_3D_MODEL::formatOffsetValue( double aValue )
{
// Convert from internal units (mm) to user units
if( m_userUnits == EDA_UNITS::INCHES )
if( m_userUnits == EDA_UNITS::INCH )
aValue /= 25.4;
else if( m_userUnits == EDA_UNITS::MILS )
aValue /= 25.4 / 1e3;
@@ -405,13 +392,7 @@ void PANEL_PREVIEW_3D_MODEL::setBodyStyleView( wxCommandEvent& event )
if( !cfg )
return;
m_bodyStyleShowAll = !m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_top = m_bodyStyleShowAll;
cfg->m_Render.show_soldermask_bottom = m_bodyStyleShowAll;
cfg->m_Render.show_solderpaste = m_bodyStyleShowAll;
cfg->m_Render.show_zones = m_bodyStyleShowAll;
cfg->m_Render.show_board_body = m_bodyStyleShowAll;
cfg->m_Render.preview_show_board_body = !cfg->m_Render.preview_show_board_body;
m_previewPane->ReloadRequest();
m_previewPane->Refresh();
@@ -444,7 +425,9 @@ void PANEL_PREVIEW_3D_MODEL::View3DSettings( wxCommandEvent& event )
void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
wxSpinButton* spinCtrl = dynamic_cast<wxSpinButton*>( event.GetEventObject() );
wxCHECK( spinCtrl, /* void */ );
wxTextCtrl * textCtrl = xscale;
@@ -471,7 +454,10 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementScale( wxSpinEvent& event, double aSign
void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aSign )
{
wxSpinButton* spinCtrl = (wxSpinButton*) aEvent.GetEventObject();
wxSpinButton* spinCtrl = dynamic_cast<wxSpinButton*>( aEvent.GetEventObject() );
wxCHECK( spinCtrl, /* void */ );
wxTextCtrl* textCtrl = xrot;
if( spinCtrl == m_spinYrot )
@@ -497,7 +483,9 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementRotation( wxSpinEvent& aEvent, double aS
void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
wxSpinButton* spinCtrl = dynamic_cast<wxSpinButton*>( event.GetEventObject() );
wxCHECK( spinCtrl, /* void */ );
wxTextCtrl * textCtrl = xoff;
@@ -511,7 +499,7 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
if( wxGetMouseState().ShiftDown( ) )
step_mm = OFFSET_INCREMENT_MM_FINE;
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCH )
{
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000;
@@ -533,7 +521,9 @@ void PANEL_PREVIEW_3D_MODEL::doIncrementOffset( wxSpinEvent& event, double aSign
void PANEL_PREVIEW_3D_MODEL::onMouseWheelScale( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( event.GetEventObject() );
wxCHECK( textCtrl, /* void */ );
double step = SCALE_INCREMENT;
@@ -556,7 +546,9 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelScale( wxMouseEvent& event )
void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( event.GetEventObject() );
wxCHECK( textCtrl, /* void */ );
double step = ROTATION_INCREMENT;
@@ -579,14 +571,16 @@ void PANEL_PREVIEW_3D_MODEL::onMouseWheelRot( wxMouseEvent& event )
void PANEL_PREVIEW_3D_MODEL::onMouseWheelOffset( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( event.GetEventObject() );
wxCHECK( textCtrl, /* void */ );
double step_mm = OFFSET_INCREMENT_MM;
if( event.ShiftDown( ) )
step_mm = OFFSET_INCREMENT_MM_FINE;
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCHES )
if( m_userUnits == EDA_UNITS::MILS || m_userUnits == EDA_UNITS::INCH )
{
step_mm = 25.4*OFFSET_INCREMENT_MIL/1000.0;
+4 -4
View File
@@ -222,11 +222,11 @@ private:
int m_selected; /// Index into m_parentInfoList
EDA_UNITS m_userUnits;
bool m_bodyStyleShowAll; /// true if the board body is show
/// The 3d viewer Render initial settings (must be saved and restored)
EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS m_initialRender;
std::unique_ptr<NL_FOOTPRINT_PROPERTIES_PLUGIN> m_spaceMouse;
/// The 3d viewer Render initial settings (must be saved and restored)
EDA_3D_VIEWER_SETTINGS::RENDER_SETTINGS m_initialRender;
std::unique_ptr<NL_FOOTPRINT_PROPERTIES_PLUGIN> m_spaceMouse;
};
#endif // PANEL_PREVIEW_3D_MODEL_H
@@ -158,7 +158,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Opacity") ), wxVERTICAL );
m_opacity = new wxSlider( sbSizer4->GetStaticBox(), wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
sbSizer4->Add( m_opacity, 0, wxRIGHT|wxLEFT, 2 );
sbSizer4->Add( m_opacity, 0, wxRIGHT|wxLEFT|wxEXPAND, 2 );
bSizerLeft->Add( sbSizer4, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
@@ -1889,7 +1889,7 @@
<property name="permission">none</property>
<object class="sizeritem" expanded="true">
<property name="border">2</property>
<property name="flag">wxRIGHT|wxLEFT</property>
<property name="flag">wxRIGHT|wxLEFT|wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxSlider" expanded="true">
<property name="BottomDockable">1</property>
+3 -2
View File
@@ -168,9 +168,9 @@
Thomas Gambier
Ashutosh Gangwar
Alessandro Gatti
Zenn Geeraerts
Alex Gellen
Robert Antoni Buj Gelonch
Robert Antoni Buj Genlonch
Hal Gentz
Lucas Gerads
Davide Gerhard
@@ -228,6 +228,7 @@
Mario Hros
Hubert Hu
Josue Huaroto
Eli Hughes
Huibean
Matt Huszagh
José Ignacio
@@ -621,7 +622,7 @@
欠陥電気
木 王
郝弘毅
Damjan Prerad
See git repo on GitLab for contributors at
https://gitlab.com/kicad/code/kicad/-/graphs/master
+96 -70
View File
@@ -22,7 +22,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#
cmake_minimum_required( VERSION 3.21 FATAL_ERROR )
cmake_minimum_required( VERSION 3.22 FATAL_ERROR )
# Generate DEPFILES without transforming relative paths
cmake_policy( SET CMP0116 OLD )
@@ -62,6 +62,21 @@ set( CMAKE_MODULE_PATH "${KICAD_CMAKE_MODULE_PATH}" )
include( ConfigurePlatform )
if( WIN32 )
# Without WIN32_LEAN_AND_MEAN defined including windows.h pulls in legacy
# winsocks.h which conflicts with winsocks2.h used by modern libraries such
# as curl.
# There is no harm in defining this globally, at worst some additional
# headers have to be included explicitly.
add_compile_definitions( WIN32_LEAN_AND_MEAN )
endif()
if( APPLE )
# Apple, in their infinite wisdom, has decided to mark OpenGL as deprecated.
# Luckily we can silence warnings about its deprecation.
add_compile_definitions( GL_SILENCE_DEPRECATION=1 )
endif()
# Create a flag to identify the non-Apple unix systems
if( UNIX AND NOT APPLE )
set( UNIX_NOT_APPLE ON )
@@ -115,12 +130,6 @@ option( KICAD_UPDATE_CHECK
"Build in update check"
ON )
# EGL is only needed on Linux with Wayland
cmake_dependent_option( KICAD_USE_EGL
"Build KiCad with EGL backend support for Wayland."
OFF "UNIX_NOT_APPLE"
OFF)
cmake_dependent_option( KICAD_USE_BUNDLED_GLEW
"Use the bundled version of GLEW - only available when KICAD_USE_EGL is set"
ON "KICAD_USE_EGL"
@@ -286,16 +295,6 @@ add_compile_definitions( $<$<BOOL:${KICAD_GAL_PROFILE}>:KICAD_GAL_PROFILE> )
add_compile_definitions( $<$<BOOL:${KICAD_WIN32_VERIFY_CODESIGN}>:KICAD_WIN32_VERIFY_CODESIGN> )
add_compile_definitions( $<$<BOOL:${KICAD_UPDATE_CHECK}>:KICAD_UPDATE_CHECK> )
if( KICAD_USE_EGL )
message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" )
add_compile_definitions( KICAD_USE_EGL )
endif()
if( KICAD_WAYLAND )
message( STATUS "Configuring KiCad to support Wayland features" )
add_compile_definitions( KICAD_WAYLAND )
endif()
if( KICAD_IPC_API )
add_definitions( -DKICAD_IPC_API )
endif()
@@ -755,43 +754,6 @@ if( KICAD_BUILD_I18N )
find_package( Gettext REQUIRED )
endif()
#
# Find OpenGL library, required
#
if( KICAD_USE_EGL )
find_package( OpenGL REQUIRED COMPONENTS OpenGL EGL )
else()
set( OpenGL_GL_PREFERENCE "LEGACY" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
find_package( OpenGL REQUIRED )
endif()
#
# Find GLEW library, required
#
# The EGL canvas on GTK requires the use of a GLEW version compiled with an EGL flag.
# The one built in the thirdparty directory has the flag for EGL set, so we use it unless told
# otherwise. Then we search for the system GLEW version and use that instead.
#
if( KICAD_USE_EGL AND KICAD_USE_BUNDLED_GLEW AND UNIX AND NOT APPLE )
if( OpenGL_EGL_FOUND )
message( STATUS "Found OpenGL EGL library: ${OPENGL_egl_LIBRARY}" )
else()
message( FATAL_ERROR "OpenGL EGL library not found" )
endif()
# Add the custom GLEW target
add_subdirectory( thirdparty/glew )
# Set the standard package variables to point to our custom target to mimic the system version.
set( GLEW_LIBRARIES glew )
set( GLEW_FOUND TRUE )
include_directories( SYSTEM $<TARGET_PROPERTY:glew,INCLUDE_DIRECTORIES> )
else()
find_package( GLEW REQUIRED )
check_find_package_result( GLEW_FOUND "GLEW" )
include_directories( SYSTEM ${GLEW_INCLUDE_DIR} )
endif()
#
# Find GLM library, required
#
@@ -824,7 +786,7 @@ find_package( Pixman 0.30 REQUIRED )
include_directories( SYSTEM ${PIXMAN_INCLUDE_DIR} )
# Find libgit2, required
find_package( libgit2 REQUIRED )
find_package( libgit2 1.5 REQUIRED )
# Set include directories for libgit
include_directories(${LIBGIT2_INCLUDE_DIRS})
@@ -876,24 +838,37 @@ if( OCC_VERSION_STRING VERSION_LESS 7.5.0 )
endif()
include_directories( SYSTEM ${OCC_INCLUDE_DIR} )
if( KICAD_USE_CMAKE_FINDPROTOBUF )
# Try to find Protobuf with modern approach first, fallback to legacy if needed
set( _protobuf_found FALSE )
if( NOT KICAD_USE_CMAKE_FINDPROTOBUF )
message( STATUS "Attempting to find Protobuf using CONFIG mode..." )
find_package( Protobuf QUIET CONFIG )
if( Protobuf_FOUND )
set( Protobuf_LIBRARY "protobuf::libprotobuf" )
set( _protobuf_found TRUE )
message( STATUS "Found Protobuf using CONFIG mode" )
else()
message( STATUS "CONFIG mode failed, falling back to FindProtobuf.cmake" )
set( KICAD_USE_CMAKE_FINDPROTOBUF ON )
endif()
endif()
if( NOT _protobuf_found )
message( STATUS "Using FindProtobuf.cmake to locate Protobuf..." )
include( FindProtobuf )
find_package( Protobuf REQUIRED )
else()
find_package( Protobuf REQUIRED CONFIG )
set( Protobuf_LIBRARY "protobuf::libprotobuf" )
if( Protobuf_FOUND )
message( STATUS "Found Protobuf using FindProtobuf.cmake" )
endif()
endif()
if( NOT Protobuf_PROTOC_EXECUTABLE )
if( NOT KICAD_USE_CMAKE_FINDPROTOBUF)
set( Protobuf_PROTOC_EXECUTABLE "protobuf::protoc" )
else()
MESSAGE( FATAL_ERROR "Protobuf compiler not found. Please install protobuf-compiler." )
endif()
endif()
if( NOT Protobuf_INCLUDE_DIR )
get_target_property( Protobuf_INCLUDE_DIR protobuf::libprotobuf INTERFACE_INCLUDE_DIRECTORIES )
if( NOT KICAD_USE_CMAKE_FINDPROTOBUF)
set( Protobuf_PROTOC_EXECUTABLE "protobuf::protoc" )
else()
MESSAGE( FATAL_ERROR "Protobuf compiler not found. Please install protobuf-compiler." )
endif()
endif()
@@ -1060,7 +1035,7 @@ include( ${wxWidgets_USE_FILE} )
# Detect wxWidgets port being used
if( wxWidgets_FIND_STYLE STREQUAL "win32" )
string(REGEX MATCH "^[msw|qt|gtk]*" KICAD_WX_PORT "${WX_CONFIGURATION}")
string(REGEX MATCH "(msw|qt|gtk)" KICAD_WX_PORT "${WX_CONFIGURATION}")
if( KICAD_WX_PORT STREQUAL "qt" )
add_compile_definitions( __WXQT__ )
@@ -1068,7 +1043,7 @@ if( wxWidgets_FIND_STYLE STREQUAL "win32" )
add_compile_definitions( __WXGTK__ )
endif()
elseif( _wx_selected_config )
string(REGEX MATCH "^[msw|qt|gtk|osx]*" KICAD_WX_PORT "${_wx_selected_config}")
string(REGEX MATCH "(msw|qt|gtk|osx)" KICAD_WX_PORT "${_wx_selected_config}")
endif()
if( KICAD_WX_PORT )
@@ -1077,6 +1052,8 @@ else()
message( FATAL_ERROR "Unable to detect wxWidgets port")
endif()
message(STATUS "wxUSE_GLCANVAS_EGL=${wxWidgets_GLCANVAS_EGL}")
if( NOT MSVC )
if( ${wxWidgets_VERSION_STRING} VERSION_LESS 3.2 )
message( FATAL_ERROR "wxWidgets 3.2.0 or greater is required" )
@@ -1093,6 +1070,55 @@ if( MINGW )
endif()
endif()
#
# Find OpenGL library, required
#
if( wxWidgets_GLCANVAS_EGL EQUAL 1 )
set( KICAD_USE_EGL ON )
find_package( OpenGL REQUIRED COMPONENTS OpenGL EGL )
else()
set( KICAD_USE_EGL OFF )
set( OpenGL_GL_PREFERENCE "LEGACY" ) # CMake 3.11+ setting; see 'cmake --help-policy CMP0072'
find_package( OpenGL REQUIRED )
endif()
if( KICAD_USE_EGL )
message( STATUS "Configuring KiCad for the wxGLCanvas EGL backend" )
add_compile_definitions( KICAD_USE_EGL )
endif()
if( KICAD_WAYLAND )
message( STATUS "Configuring KiCad to support Wayland features" )
add_compile_definitions( KICAD_WAYLAND )
endif()
#
# Find GLEW library, required
#
# The EGL canvas on GTK requires the use of a GLEW version compiled with an EGL flag.
# The one built in the thirdparty directory has the flag for EGL set, so we use it unless told
# otherwise. Then we search for the system GLEW version and use that instead.
#
if( KICAD_USE_EGL AND KICAD_USE_BUNDLED_GLEW )
if( OpenGL_EGL_FOUND )
message( STATUS "Found OpenGL EGL library: ${OPENGL_egl_LIBRARY}" )
else()
message( FATAL_ERROR "OpenGL EGL library not found" )
endif()
# Add the custom GLEW target
add_subdirectory( thirdparty/glew )
# Set the standard package variables to point to our custom target to mimic the system version.
set( GLEW_LIBRARIES glew )
set( GLEW_FOUND TRUE )
include_directories( SYSTEM $<TARGET_PROPERTY:glew,INCLUDE_DIRECTORIES> )
else()
find_package( GLEW REQUIRED )
check_find_package_result( GLEW_FOUND "GLEW" )
include_directories( SYSTEM ${GLEW_INCLUDE_DIR} )
endif()
if( APPLE )
# Remove app bundles in ${KICAD_BIN} before installing anything new.
# Must be defined before all includes so that it is executed first.
+74 -47
View File
@@ -1,56 +1,83 @@
{
"version": 3,
"version": 9,
"configurePresets": [
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
{
"name": "base",
"hidden": true,
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"toolchainFile": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake",
"condition": {
"type": "equals",
"lhs": "${hostSystemName}",
"rhs": "Windows"
},
"cacheVariables": {
"KICAD_BUILD_QA_TESTS": "OFF",
"KICAD_BUILD_I18N": "ON",
"KICAD_SCRIPTING_WXPYTHON": "ON"
}
},
"cacheVariables": {
"KICAD_BUILD_QA_TESTS": "OFF",
"KICAD_BUILD_I18N": "ON",
"KICAD_SCRIPTING_WXPYTHON": "ON"
}
},
{
"name": "win64",
"hidden": true,
"cacheVariables": {
"KICAD_WIN32_DPI_AWARE": "ON",
"CMAKE_INSTALL_PREFIX": "out",
"CMAKE_PDB_OUTPUT_DIRECTORY": "out/pdb"
{
"name": "win64",
"hidden": true,
"cacheVariables": {
"KICAD_WIN32_DPI_AWARE": "ON",
"CMAKE_INSTALL_PREFIX": "out",
"CMAKE_PDB_OUTPUT_DIRECTORY": "out/pdb"
},
"architecture": {
"value": "x64",
"strategy": "external"
},
"inherits": [
"base"
]
},
"architecture": {
"value": "x64",
"strategy": "external"
{
"name": "x64-debug",
"displayName": "x64 Debug",
"description": "Sets debug build type and x64 arch",
"inherits": "win64",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
"inherits": [
"base"
]
},
{
"name": "x64-debug",
"displayName": "x64 Debug",
"description": "Sets debug build type and x64 arch",
"inherits": "win64",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
{
"name": "x64-release",
"displayName": "x64 Release",
"description": "Sets release build type",
"inherits": "win64",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
},
{
"name": "x64-release",
"displayName": "x64 Release",
"description": "Sets release build type",
"inherits": "win64",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
],
"buildPresets": [
{
"name": "kicad",
"configurePreset": "x64-debug",
"configuration": "Debug",
"targets": [
"install"
]
}
],
"workflowPresets": [
{
"name": "kicad",
"description": "kicad",
"displayName": "kicad",
"steps": [
{
"type": "configure",
"name": "x64-debug"
},
{
"type": "build",
"name": "kicad"
}
]
}
}
]
}
+2 -3
View File
@@ -6,7 +6,6 @@ AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: true
AlignOperands: true
AlignTrailingComments: true
AllowAllConstructorInitializersOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
@@ -24,8 +23,7 @@ BreakBeforeBraces: Allman
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: AfterColon
BreakStringLiterals: true
ColumnLimit: 100
ConstructorInitializerAllOnOneLineOrOnePerLine: false
ColumnLimit: 120
ConstructorInitializerIndentWidth: 8
ContinuationIndentWidth: 8
Cpp11BracedListStyle: false
@@ -39,6 +37,7 @@ KeepEmptyLinesAtTheStartOfBlocks: false
Language: Cpp
MaxEmptyLinesToKeep: 2
NamespaceIndentation: Inner
PackConstructorInitializers: Never
PointerAlignment: Left
ReflowComments: false
SortIncludes: false
+60
View File
@@ -58,6 +58,30 @@ message GraphicsDefaultsResponse
kiapi.board.GraphicsDefaults defaults = 1;
}
enum BoardOriginType
{
BOT_UNKNOWN = 0;
BOT_GRID = 1;
BOT_DRILL = 2;
}
// Returns a Vector2 with the specified origin point
message GetBoardOrigin
{
kiapi.common.types.DocumentSpecifier board = 1;
BoardOriginType type = 2;
}
message SetBoardOrigin
{
kiapi.common.types.DocumentSpecifier board = 1;
BoardOriginType type = 2;
kiapi.common.types.Vector2 origin = 3;
}
/*
* Net management
*/
@@ -165,6 +189,42 @@ message PadShapeAsPolygonResponse
repeated kiapi.common.types.PolygonWithHoles polygons = 2;
}
// Tests if the given set of items with padstacks (pads or vias) has content on the given set of layers.
// This is a dynamic call rather than a property of the padstack because pads and vias can be set to only include
// shapes on connected copper layers, and whether or not the pad is connected can't be determined in isolation.
// To optimize API call performance, multiple items and multiple layers to test may be passed in with this
// command message. The return will include the results for each valid item on each valid layer.
// Note that not all layers make sense for a given item (for example, testing against BL_UNDEFINED never makes
// sense). In general, the internal KiCad APIs will not return an error when testing non-sensical layers for a given
// item, and instead will return a default of "true" for any such layers.
message CheckPadstackPresenceOnLayers
{
kiapi.common.types.DocumentSpecifier board = 1;
repeated kiapi.common.types.KIID items = 2;
repeated kiapi.board.types.BoardLayer layers = 3;
}
enum PadstackPresence
{
PSP_UNKNOWN = 0;
PSP_PRESENT = 1; // The padstack has a shape on a given layer (is flashed)
PSP_NOT_PRESENT = 2; // The padstack has no shape on a given layer (is not flashed)
}
message PadstackPresenceEntry
{
kiapi.common.types.KIID item = 1;
kiapi.board.types.BoardLayer layer = 2;
PadstackPresence presence = 3;
}
message PadstackPresenceResponse
{
repeated PadstackPresenceEntry entries = 1;
}
// PCB editor commands
// returns BoardLayers
+112 -3
View File
@@ -89,6 +89,42 @@ enum BoardLayer
BL_User_8 = 60;
BL_User_9 = 61;
BL_Rescue = 62;
BL_User_10 = 63;
BL_User_11 = 64;
BL_User_12 = 65;
BL_User_13 = 66;
BL_User_14 = 67;
BL_User_15 = 68;
BL_User_16 = 69;
BL_User_17 = 70;
BL_User_18 = 71;
BL_User_19 = 72;
BL_User_20 = 73;
BL_User_21 = 74;
BL_User_22 = 75;
BL_User_23 = 76;
BL_User_24 = 77;
BL_User_25 = 78;
BL_User_26 = 79;
BL_User_27 = 80;
BL_User_28 = 81;
BL_User_29 = 82;
BL_User_30 = 83;
BL_User_31 = 84;
BL_User_32 = 85;
BL_User_33 = 86;
BL_User_34 = 87;
BL_User_35 = 88;
BL_User_36 = 89;
BL_User_37 = 90;
BL_User_38 = 91;
BL_User_39 = 92;
BL_User_40 = 93;
BL_User_41 = 94;
BL_User_42 = 95;
BL_User_43 = 96;
BL_User_44 = 97;
BL_User_45 = 98;
}
message NetCode
@@ -258,15 +294,31 @@ message PadStackLayer
enum SolderMaskMode
{
SMM_UNKOWN = 0;
SMM_UNKNOWN = 0;
SMM_MASKED = 1;
SMM_UNMASKED = 2;
SMM_FROM_DESIGN_RULES = 3;
}
enum ViaCoveringMode
{
VCM_UNKNOWN = 0;
VCM_COVERED = 1;
VCM_UNCOVERED = 2;
VCM_FROM_DESIGN_RULES = 3;
}
enum ViaPluggingMode
{
VPM_UNKNOWN = 0;
VPM_PLUGGED = 1;
VPM_UNPLUGGED = 2;
VPM_FROM_DESIGN_RULES = 3;
}
enum SolderPasteMode
{
SPM_UNKOWN = 0;
SPM_UNKNOWN = 0;
SPM_PASTE = 1;
SPM_NO_PASTE = 2;
SPM_FROM_DESIGN_RULES = 3;
@@ -283,6 +335,9 @@ message PadStackOuterLayer
// NOTE: At present, KiCad does not support different solder paste expansion settings for the top and bottom layers
SolderPasteOverrides solder_paste_settings = 4;
ViaPluggingMode plugging_mode = 5;
ViaCoveringMode covering_mode = 6;
}
enum DrillShape
@@ -293,6 +348,22 @@ enum DrillShape
DS_UNDEFINED = 3;
}
enum ViaDrillCappingMode
{
VDCM_UNKNOWN = 0;
VDCM_CAPPED = 1;
VDCM_UNCAPPED = 2;
VDCM_FROM_DESIGN_RULES = 3;
}
enum ViaDrillFillingMode
{
VDFM_UNKNOWN = 0;
VDFM_FILLED = 1;
VDFM_UNFILLED = 2;
VDFM_FROM_DESIGN_RULES = 3;
}
message DrillProperties
{
// Lowest (closest to F_Cu) layer this drill exists on.
@@ -306,6 +377,10 @@ message DrillProperties
kiapi.common.types.Vector2 diameter = 3;
DrillShape shape = 4;
ViaDrillCappingMode capped = 5;
ViaDrillFillingMode filled = 6;
}
// A pad stack definition for a multilayer pad or via.
@@ -534,6 +609,7 @@ enum PlacementRuleSourceType
PRST_UNKNOWN = 0;
PRST_SHEET_NAME = 1;
PRST_COMPONENT_CLASS = 2;
PRST_GROUP = 3;
}
message RuleAreaSettings
@@ -572,6 +648,14 @@ message ZoneFilledPolygons
kiapi.common.types.PolySet shapes = 2;
}
message ZoneLayerProperties
{
BoardLayer layer = 1;
kiapi.common.types.Vector2 hatching_offset = 2;
}
message Zone
{
kiapi.common.types.KIID id = 1;
@@ -598,6 +682,8 @@ message Zone
ZoneBorderSettings border = 11;
kiapi.common.types.LockedState locked = 12;
repeated ZoneLayerProperties layer_properties = 13;
}
// An aligned dimension is drawn parallel to the line segment between the start and end points
@@ -755,7 +841,9 @@ message ReferenceImage
message Group
{
// TODO
kiapi.common.types.KIID id = 1;
string name = 2;
repeated kiapi.common.types.KIID items = 3;
}
message FieldId
@@ -768,6 +856,9 @@ message Field
FieldId id = 1;
string name = 2;
BoardText text = 3;
// Since 9.0.1
bool visible = 4;
}
enum FootprintMountingStyle
@@ -821,6 +912,19 @@ message Footprint3DModel
double opacity = 6;
}
message JumperGroup
{
repeated string pad_names = 1;
}
message JumperSettings
{
/// If true, duplicate pad names in this footprint are jumpered together
bool duplicate_names_are_jumpered = 1;
repeated JumperGroup groups = 2;
}
// A footprint definition (i.e. what would be in a library)
message Footprint
{
@@ -838,6 +942,8 @@ message Footprint
// All footprint items except for mandatory fields
repeated google.protobuf.Any items = 11;
JumperSettings jumpers = 12;
}
// An instance of a footprint on a board
@@ -857,4 +963,7 @@ message FootprintInstance
FootprintAttributes attributes = 11;
FootprintDesignRuleOverrides overrides = 12;
// The sheet path to the associated symbol for this footprint instance, if one exists
kiapi.common.types.SheetPath symbol_path = 13;
}
@@ -222,6 +222,14 @@ message GetItems
repeated kiapi.common.types.KiCadObjectType types = 2;
}
message GetItemsById
{
// Specifies which document to query, which fields to return, etc.
kiapi.common.types.ItemHeader header = 1;
repeated kiapi.common.types.KIID items = 2;
}
message GetItemsResponse
{
// Specifies which document was modified, which fields are included in items, etc.
+5 -2
View File
@@ -291,7 +291,10 @@ message TextAttributes
bool italic = 7;
bool bold = 8;
bool underlined = 9;
// Deprecated since 9.0.1 (text items are now always visible, only Fields can be hidden)
bool visible = 10;
bool mirrored = 11;
bool multiline = 12;
bool keep_upright = 13;
@@ -305,7 +308,7 @@ message Text
kiapi.common.types.Vector2 position = 2;
kiapi.common.types.TextAttributes attributes = 3;
// Reserved for future use; base objects don't support locking right nos
// Reserved for future use; base objects don't support locking right now
//kiapi.common.types.LockedState locked = 4;
string text = 5;
@@ -318,7 +321,7 @@ message TextBox
kiapi.common.types.Vector2 bottom_right = 3;
kiapi.common.types.TextAttributes attributes = 4;
// Reserved for future use; base objects don't support locking right nos
// Reserved for future use; base objects don't support locking right now
//kiapi.common.types.LockedState locked = 5;
string text = 6;
+2
View File
@@ -84,6 +84,8 @@ enum KiCadObjectType
KOT_WSG_TEXT = 48;
KOT_WSG_BITMAP = 49;
KOT_WSG_PAGE = 50;
KOT_SCH_GROUP = 51;
}
// Mapped to GR_TEXT_H_ALIGN_T
+9 -9
View File
@@ -51,7 +51,7 @@ IMAGE_SIZE::IMAGE_SIZE()
m_outputSize = 0.0;
m_originalDPI = DEFAULT_DPI;
m_originalSizePixels = 0;
m_unit = EDA_UNITS::MILLIMETRES;
m_unit = EDA_UNITS::MM;
}
@@ -61,9 +61,9 @@ void IMAGE_SIZE::SetOutputSizeFromInitialImageSize()
m_originalDPI = std::max( 1, m_originalDPI );
// Set the m_outputSize value from the m_originalSizePixels and the selected unit
if( m_unit == EDA_UNITS::MILLIMETRES )
if( m_unit == EDA_UNITS::MM )
m_outputSize = (double)GetOriginalSizePixels() / m_originalDPI * 25.4;
else if( m_unit == EDA_UNITS::INCHES )
else if( m_unit == EDA_UNITS::INCH )
m_outputSize = (double)GetOriginalSizePixels() / m_originalDPI;
else
m_outputSize = m_originalDPI;
@@ -74,9 +74,9 @@ int IMAGE_SIZE::GetOutputDPI()
{
int outputDPI;
if( m_unit == EDA_UNITS::MILLIMETRES )
if( m_unit == EDA_UNITS::MM )
outputDPI = GetOriginalSizePixels() / ( m_outputSize / 25.4 );
else if( m_unit == EDA_UNITS::INCHES )
else if( m_unit == EDA_UNITS::INCH )
outputDPI = GetOriginalSizePixels() / m_outputSize;
else
outputDPI = KiROUND( m_outputSize );
@@ -98,11 +98,11 @@ void IMAGE_SIZE::SetUnit( EDA_UNITS aUnit )
// Convert m_outputSize to mm:
double size_mm;
if( m_unit == EDA_UNITS::MILLIMETRES )
if( m_unit == EDA_UNITS::MM )
{
size_mm = m_outputSize;
}
else if( m_unit == EDA_UNITS::INCHES )
else if( m_unit == EDA_UNITS::INCH )
{
size_mm = m_outputSize * 25.4;
}
@@ -117,11 +117,11 @@ void IMAGE_SIZE::SetUnit( EDA_UNITS aUnit )
}
// Convert m_outputSize to new value:
if( aUnit == EDA_UNITS::MILLIMETRES )
if( aUnit == EDA_UNITS::MM )
{
m_outputSize = size_mm;
}
else if( aUnit == EDA_UNITS::INCHES )
else if( aUnit == EDA_UNITS::INCH )
{
m_outputSize = size_mm / 25.4;
}
+42 -5
View File
@@ -30,11 +30,15 @@
#include <common.h>
#include <math/util.h> // for KiROUND
#include <potracelib.h>
#include <vector>
#include <wx/arrstr.h>
#include <wx/clipbrd.h>
#include <wx/dnd.h>
#include <wx/rawbmp.h>
#include <wx/msgdlg.h>
#include <wx/dcclient.h>
#include <wx/log.h>
#include <wx/string.h>
#define DEFAULT_DPI 300 // the image DPI used in formats that do not define a DPI
@@ -58,8 +62,11 @@ BITMAP2CMP_PANEL::BITMAP2CMP_PANEL( BITMAP2CMP_FRAME* aParent ) :
m_buttonExportFile->Enable( false );
m_buttonExportClipboard->Enable( false );
}
m_InitialPicturePanel->SetDropTarget( new DROP_FILE( this ) );
m_GreyscalePicturePanel->SetDropTarget( new DROP_FILE( this ) );
m_BNPicturePanel->SetDropTarget( new DROP_FILE( this ) );
}
wxWindow* BITMAP2CMP_PANEL::GetCurrentPage()
{
@@ -266,9 +273,9 @@ wxString BITMAP2CMP_PANEL::formatOutputSize( double aSize )
{
wxString text;
if( getUnitFromSelection() == EDA_UNITS::MILLIMETRES )
if( getUnitFromSelection() == EDA_UNITS::MM )
text.Printf( wxS( "%.1f" ), aSize );
else if( getUnitFromSelection() == EDA_UNITS::INCHES )
else if( getUnitFromSelection() == EDA_UNITS::INCH )
text.Printf( wxS( "%.2f" ), aSize );
else
text.Printf( wxT( "%d" ), KiROUND( aSize ) );
@@ -295,10 +302,10 @@ EDA_UNITS BITMAP2CMP_PANEL::getUnitFromSelection()
// return the EDA_UNITS from the m_PixelUnit choice
switch( m_PixelUnit->GetSelection() )
{
case 1: return EDA_UNITS::INCHES;
case 1: return EDA_UNITS::INCH;
case 2: return EDA_UNITS::UNSCALED;
case 0:
default: return EDA_UNITS::MILLIMETRES;
default: return EDA_UNITS::MM;
}
}
@@ -562,3 +569,33 @@ void BITMAP2CMP_PANEL::OnFormatChange( wxCommandEvent& event )
m_layerLabel->Enable( m_rbFootprint->GetValue() );
m_layerCtrl->Enable( m_rbFootprint->GetValue() );
}
DROP_FILE::DROP_FILE( BITMAP2CMP_PANEL* panel ) :
m_panel( panel )
{
}
bool DROP_FILE::OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames )
{
m_panel->SetFocus();
// If a file is already loaded
if( m_panel->GetOutputSizeX().GetOriginalSizePixels() != 0 )
{
wxString cap = _( "Replace Loaded File?" );
wxString msg = _( "There is already a file loaded. Do you want to replace it?" );
wxMessageDialog acceptFileDlg( m_panel, msg, cap, wxYES_NO | wxICON_QUESTION | wxYES_DEFAULT );
int replace = acceptFileDlg.ShowModal();
if( replace == wxID_NO )
return false;
}
std::vector<wxString> fNameVec;
fNameVec.insert( fNameVec.begin(), filenames.begin(), filenames.end() );
m_panel->OpenProjectFiles( fNameVec );
return true;
}
+15 -1
View File
@@ -25,7 +25,7 @@
#include <bitmap2cmp_panel_base.h>
#include <eda_units.h>
#include <wx/dnd.h>
class BITMAP2CMP_FRAME;
class BITMAP2CMP_SETTINGS;
@@ -134,4 +134,18 @@ private:
bool m_negative;
double m_aspectRatio;
};
class DROP_FILE : public wxFileDropTarget
{
public:
DROP_FILE( BITMAP2CMP_PANEL* panel );
DROP_FILE() = delete;
bool OnDropFiles( wxCoord x, wxCoord y, const wxArrayString& filenames ) override;
private:
BITMAP2CMP_PANEL* m_panel;
};
#endif// BITMAP2CMP_PANEL
+1 -2
View File
@@ -48,9 +48,7 @@ set( OCC_LIBS_COMMON
TKLCAF
TKMath
TKMesh
TKMeshVS
TKOffset
TKOpenGl
TKPrim
TKRWMesh
TKService
@@ -138,6 +136,7 @@ else(WIN32)
HINTS
${OCC_LIBRARY_DIR}
/usr
/usr/opencascade
/usr/local
/usr/local/opencascade
/opt/opencascade
+1 -1
View File
@@ -37,7 +37,7 @@ unset(_Python_NAMES)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
# Disabling the "search every possible place" code for now
# see https://gitlab.com/kicad/code/kicad/-/issues/8553
+1 -1
View File
@@ -44,7 +44,7 @@ cmake_find_frameworks(Python)
set(_PYTHON1_VERSIONS 1.6 1.5)
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
set(_PYTHON3_VERSIONS 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set(_PYTHON3_VERSIONS 3.14 3.13 3.12 3.11 3.10 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
if(PythonLibs_FIND_VERSION)
if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$")
+23
View File
@@ -520,6 +520,15 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
set(WX_LIB_DIR_PREFIX vc)
endif()
set( EXTRA_LIB_PATH "" )
if(VCPKG_TOOLCHAIN)
if( CMAKE_BUILD_TYPE STREQUAL "Debug" )
set( EXTRA_LIB_PATH "${WX_ROOT_DIR}/debug/lib" )
else()
set( EXTRA_LIB_PATH "${WX_ROOT_DIR}/lib" )
endif()
endif()
if(BUILD_SHARED_LIBS)
find_path(wxWidgets_LIB_DIR
NAMES
@@ -536,6 +545,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll # prefer shared
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib
${EXTRA_LIB_PATH}
DOC "Path to wxWidgets libraries"
NO_DEFAULT_PATH
)
@@ -555,6 +565,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
PATHS
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_lib # prefer static
${WX_ROOT_DIR}/lib/${WX_LIB_DIR_PREFIX}_dll
${EXTRA_LIB_PATH}
DOC "Path to wxWidgets libraries"
NO_DEFAULT_PATH
)
@@ -614,6 +625,10 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
set(WX_USE_REL_AND_DBG FALSE)
endif()
if( VCPKG_TOOLCHAIN )
set(WX_USE_REL_AND_DBG FALSE)
endif()
# Get configuration parameters from the name.
WX_GET_NAME_COMPONENTS(${wxWidgets_CONFIGURATION} PF UNV UCD DBG)
@@ -784,6 +799,14 @@ else()
DBG_MSG_V("wxWidgets_CXX_FLAGS=${wxWidgets_CXX_FLAGS}")
execute_process(
COMMAND sh -c "echo '#include <wx/platform.h>' ; echo CMAKE_WXTEST_RESULT wxUSE_GLCANVAS_EGL"
COMMAND ${CMAKE_CXX_COMPILER} ${wxWidgets_CXX_FLAGS} -E -
COMMAND grep CMAKE_WXTEST_RESULT
COMMAND cut "-d " -f2
OUTPUT_STRIP_TRAILING_WHITESPACE
OUTPUT_VARIABLE wxWidgets_GLCANVAS_EGL )
# parse definitions from cxxflags;
# drop -D* from CXXFLAGS and the -D prefix
string(REGEX MATCHALL "-D[^;]+"
+2
View File
@@ -259,6 +259,8 @@ if( MSVC )
string( APPEND WARN_FLAGS_CXX " /wd5204 /wd4265" )
# disable "layout of class may have changed from a previous version of the compiler"
string( APPEND WARN_FLAGS_CXX " /wd4371" )
# disable "'this': used in base member initializer list"
string( APPEND WARN_FLAGS_CXX " /wd4355" )
# disable "relative include path contains '..'"
string( APPEND WARN_FLAGS_CXX " /wd4464" )
# disable "'const' variable is not used"
+48 -4
View File
@@ -71,11 +71,14 @@ set( KICOMMON_SRCS
jobs/job_export_pcb_dxf.cpp
jobs/job_export_pcb_gerber.cpp
jobs/job_export_pcb_gerbers.cpp
jobs/job_export_pcb_hpgl.cpp
jobs/job_export_pcb_ipc2581.cpp
jobs/job_export_pcb_ipcd356.cpp
jobs/job_export_pcb_odb.cpp
jobs/job_export_pcb_pdf.cpp
jobs/job_export_pcb_plot.cpp
jobs/job_export_pcb_pos.cpp
jobs/job_export_pcb_ps.cpp
jobs/job_export_pcb_svg.cpp
jobs/job_export_pcb_gencad.cpp
jobs/job_export_pcb_3d.cpp
@@ -112,10 +115,15 @@ set( KICOMMON_SRCS
settings/settings_manager.cpp
project/board_project_settings.cpp
project/component_class_settings.cpp
project/net_settings.cpp
project/project_archiver.cpp
project/project_file.cpp
project/project_local_settings.cpp
project/time_domain_parameters.cpp
# This is basically a settings object, but for the toolbar
tool/ui/toolbar_configuration.cpp
dialogs/dialog_migrate_settings.cpp
dialogs/dialog_migrate_settings_base.cpp
@@ -140,6 +148,7 @@ set( KICOMMON_SRCS
design_block_info_impl.cpp
advanced_config.cpp
app_monitor.cpp
asset_archive.cpp
array_axis.cpp
array_options.cpp
@@ -236,6 +245,7 @@ target_link_libraries( kicommon
fmt::fmt
CURL::libcurl
picosha2
rapidcsv
${ZSTD_LIBRARY}
${wxWidgets_LIBRARIES}
${LIBGIT2_LIBRARIES}
@@ -257,7 +267,7 @@ if( KICAD_USE_SENTRY )
target_link_libraries( kicommon
sentry )
set_property(SOURCE pgm_base.cpp APPEND PROPERTY COMPILE_DEFINITIONS KICAD_SENTRY_DSN="${KICAD_SENTRY_DSN}")
set_property(SOURCE app_monitor.cpp APPEND PROPERTY COMPILE_DEFINITIONS KICAD_SENTRY_DSN="${KICAD_SENTRY_DSN}")
endif()
if( KICAD_IPC_API )
@@ -348,6 +358,8 @@ set( COMMON_DLG_SRCS
dialogs/dialog_color_picker_base.cpp
dialogs/dialog_configure_paths.cpp
dialogs/dialog_configure_paths_base.cpp
dialogs/dialog_design_block_properties.cpp
dialogs/dialog_design_block_properties_base.cpp
dialogs/dialog_display_html_text_base.cpp
dialogs/dialog_edit_library_tables.cpp
dialogs/dialog_embed_files.cpp
@@ -356,6 +368,8 @@ set( COMMON_DLG_SRCS
dialogs/dialog_global_design_block_lib_table_config.cpp
dialogs/dialog_grid_settings.cpp
dialogs/dialog_grid_settings_base.cpp
dialogs/dialog_group_properties.cpp
dialogs/dialog_group_properties_base.cpp
dialogs/dialog_hotkey_list.cpp
dialogs/dialog_HTML_reporter_base.cpp
dialogs/dialog_import_choose_project.cpp
@@ -404,10 +418,15 @@ set( COMMON_DLG_SRCS
dialogs/panel_plugin_settings.cpp
dialogs/panel_plugin_settings_base.cpp
dialogs/panel_setup_netclasses.cpp
dialogs/panel_printer_list.cpp
dialogs/panel_printer_list_base.cpp
dialogs/panel_setup_netclasses_base.cpp
dialogs/panel_setup_severities.cpp
dialogs/panel_text_variables.cpp
dialogs/panel_text_variables_base.cpp
dialogs/panel_toolbar_customization.cpp
dialogs/panel_toolbar_customization_base.cpp
)
if( KICAD_USE_SENTRY )
@@ -418,9 +437,11 @@ endif()
set( COMMON_WIDGET_SRCS
widgets/app_progress_dialog.cpp
widgets/wx_bitmap_combobox.cpp
widgets/bitmap_toggle.cpp
widgets/button_row_panel.cpp
widgets/color_swatch.cpp
widgets/design_block_pane.cpp
widgets/filter_combobox.cpp
widgets/font_choice.cpp
widgets/footprint_choice.cpp
@@ -431,6 +452,7 @@ set( COMMON_WIDGET_SRCS
widgets/gal_options_panel_base.cpp
widgets/grid_bitmap_toggle.cpp
widgets/grid_button.cpp
widgets/grid_checkbox.cpp
widgets/grid_color_swatch_helpers.cpp
widgets/grid_combobox.cpp
widgets/grid_icon_text_helpers.cpp
@@ -445,6 +467,7 @@ set( COMMON_WIDGET_SRCS
widgets/mathplot.cpp
widgets/msgpanel.cpp
widgets/paged_dialog.cpp
widgets/panel_design_block_chooser.cpp
widgets/properties_panel.cpp
widgets/search_pane.cpp
widgets/search_pane_base.cpp
@@ -507,7 +530,6 @@ set( PLOTTERS_CONTROL_SRCS
plotters/plotter.cpp
plotters/DXF_plotter.cpp
plotters/GERBER_plotter.cpp
plotters/HPGL_plotter.cpp
plotters/PDF_plotter.cpp
plotters/PS_plotter.cpp
plotters/SVG_plotter.cpp
@@ -536,6 +558,16 @@ set( COMMON_IO_SRCS
# EasyEDA pro
io/easyedapro/easyedapro_parser.cpp
io/easyedapro/easyedapro_import_utils.cpp
io/csv.cpp
)
set ( COMMON_TRANSLINE_CALCULATION_SRCS
transline_calculations/transline_calculation_base.cpp
transline_calculations/microstrip.cpp
transline_calculations/coupled_microstrip.cpp
transline_calculations/stripline.cpp
transline_calculations/coupled_stripline.cpp
)
set( COMMON_IMPORT_GFX_SRCS
@@ -572,6 +604,7 @@ set( COMMON_SRCS
${FONT_SRCS}
${COMMON_IMPORT_GFX_SRCS}
${COMMON_GIT_SRCS}
${COMMON_TRANSLINE_CALCULATION_SRCS}
base_screen.cpp
bin_mod.cpp
bitmap_base.cpp
@@ -585,6 +618,7 @@ set( COMMON_SRCS
eda_dde.cpp
eda_doc.cpp
eda_draw_frame.cpp
eda_group.cpp
eda_item.cpp
eda_shape.cpp
eda_text.cpp
@@ -606,6 +640,7 @@ set( COMMON_SRCS
lib_table_grid_tricks.cpp
lib_tree_model.cpp
lib_tree_model_adapter.cpp
design_block_tree_model_adapter.cpp
marker_base.cpp
origin_transforms.cpp
printout.cpp
@@ -639,12 +674,14 @@ set( COMMON_SRCS
tool/construction_manager.cpp
tool/common_tools.cpp
tool/conditional_menu.cpp
tool/design_block_control.cpp
tool/edit_constraints.cpp
tool/edit_points.cpp
tool/editor_conditions.cpp
tool/embed_tool.cpp
tool/grid_helper.cpp
tool/grid_menu.cpp
tool/group_tool.cpp
tool/library_editor_control.cpp
tool/picker_tool.cpp
tool/point_editor_behavior.cpp
@@ -766,7 +803,10 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/teardrop/teardrop_parameters.cpp #needed by board_design_settings.cpp
${CMAKE_SOURCE_DIR}/pcbnew/router/pns_meander.cpp #needed by board_design_settings.cpp
${CMAKE_SOURCE_DIR}/pcbnew/board.cpp
${CMAKE_SOURCE_DIR}/pcbnew/component_class_manager.cpp #needed by board.cpp
${CMAKE_SOURCE_DIR}/pcbnew/component_classes/component_class.cpp
${CMAKE_SOURCE_DIR}/pcbnew/component_classes/component_class_assignment_rule.cpp
${CMAKE_SOURCE_DIR}/pcbnew/component_classes/component_class_cache_proxy.cpp
${CMAKE_SOURCE_DIR}/pcbnew/component_classes/component_class_manager.cpp
${CMAKE_SOURCE_DIR}/pcbnew/board_item.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_dimension.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_shape.cpp
@@ -810,7 +850,6 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/kicad_netlist_reader.cpp
${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/legacy_netlist_reader.cpp
${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/netlist_reader.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pad_custom_shape_functions.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_draw_panel_gal.cpp
${CMAKE_SOURCE_DIR}/pcbnew/netlist_reader/pcb_netlist.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_origin_transforms.cpp
@@ -826,6 +865,7 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/teardrop/teardrop_parameters.cpp
${CMAKE_SOURCE_DIR}/pcbnew/teardrop/teardrop_utils.cpp
${CMAKE_SOURCE_DIR}/pcbnew/zone_settings.cpp
${CMAKE_SOURCE_DIR}/pcbnew/pcb_board_outline.cpp
# IO files
${CMAKE_SOURCE_DIR}/pcbnew/pcb_io/pcb_io.cpp
@@ -841,6 +881,10 @@ set( PCB_COMMON_SRCS
${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_editor_conditions.cpp
${CMAKE_SOURCE_DIR}/pcbnew/tools/pcb_viewer_tools.cpp
${CMAKE_SOURCE_DIR}/pcbnew/length_delay_calculation/length_delay_calculation.cpp
${CMAKE_SOURCE_DIR}/pcbnew/length_delay_calculation/length_delay_calculation_item.cpp
${CMAKE_SOURCE_DIR}/pcbnew/length_delay_calculation/time_domain_parameters_user_defined.cpp
widgets/net_selector.cpp
)
+35 -25
View File
@@ -98,13 +98,10 @@ static const wxChar AllowManualCanvasScale[] = wxT( "AllowManualCanvasScale" );
static const wxChar UpdateUIEventInterval[] = wxT( "UpdateUIEventInterval" );
static const wxChar V3DRT_BevelHeight_um[] = wxT( "V3DRT_BevelHeight_um" );
static const wxChar V3DRT_BevelExtentFactor[] = wxT( "V3DRT_BevelExtentFactor" );
static const wxChar EnableDesignBlocks[] = wxT( "EnableDesignBlocks" );
static const wxChar EnablePcbDesignBlocks[] = wxT( "EnablePcbDesignBlocks" );
static const wxChar EnableGenerators[] = wxT( "EnableGenerators" );
static const wxChar EnableGit[] = wxT( "EnableGit" );
static const wxChar EnableLibWithText[] = wxT( "EnableLibWithText" );
static const wxChar EnableLibDir[] = wxT( "EnableLibDir" );
static const wxChar EnableEeschemaPrintCairo[] = wxT( "EnableEeschemaPrintCairo" );
static const wxChar EnableEeschemaExportClipboardCairo[] = wxT( "EnableEeschemaExportClipboardCairo" );
static const wxChar DisambiguationTime[] = wxT( "DisambiguationTime" );
static const wxChar PcbSelectionVisibilityRatio[] = wxT( "PcbSelectionVisibilityRatio" );
static const wxChar FontErrorSize[] = wxT( "FontErrorSize" );
@@ -127,6 +124,10 @@ static const wxChar MsgPanelShowUuids[] = wxT( "MsgPanelShowUuids" );
static const wxChar MaximumThreads[] = wxT( "MaximumThreads" );
static const wxChar NetInspectorBulkUpdateOptimisationThreshold[] =
wxT( "NetInspectorBulkUpdateOptimisationThreshold" );
static const wxChar ExcludeFromSimulationLineWidth[] = wxT( "ExcludeFromSimulationLineWidth" );
static const wxChar GitIconRefreshInterval[] = wxT( "GitIconRefreshInterval" );
static const wxChar ConfigurableToolbars[] = wxT( "ConfigurableToolbars" );
static const wxChar MaxPastedTextLength[] = wxT( "MaxPastedTextLength" );
} // namespace KEYS
@@ -255,15 +256,11 @@ ADVANCED_CFG::ADVANCED_CFG()
m_CompactSave = false;
m_UpdateUIEventInterval = 0;
m_ShowRepairSchematic = false;
m_EnableDesignBlocks = true;
m_EnablePcbDesignBlocks = false;
m_EnableGenerators = false;
m_EnableGit = true;
m_EnableLibWithText = false;
m_EnableLibDir = false;
m_EnableEeschemaPrintCairo = true;
m_EnableEeschemaExportClipboardCairo = true;
m_3DRT_BevelHeight_um = 30;
m_3DRT_BevelExtentFactor = 1.0 / 16.0;
@@ -305,7 +302,15 @@ ADVANCED_CFG::ADVANCED_CFG()
m_MinimumMarkerSeparationDistance = 0.15;
m_NetInspectorBulkUpdateOptimisationThreshold = 25;
m_NetInspectorBulkUpdateOptimisationThreshold = 100;
m_ExcludeFromSimulationLineWidth = 25;
m_GitIconRefreshInterval = 10000;
m_ConfigurableToolbars = false;
m_MaxPastedTextLength = 100;
loadFromConfigFile();
}
@@ -487,8 +492,8 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
m_DisambiguationMenuDelay,
50, 10000 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableDesignBlocks,
&m_EnableDesignBlocks, m_EnableDesignBlocks ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnablePcbDesignBlocks, &m_EnablePcbDesignBlocks,
m_EnablePcbDesignBlocks ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableGenerators,
&m_EnableGenerators, m_EnableGenerators ) );
@@ -496,23 +501,12 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableAPILogging,
&m_EnableAPILogging, m_EnableAPILogging ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableGit,
&m_EnableGit, m_EnableGit ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableLibWithText,
&m_EnableLibWithText, m_EnableLibWithText ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableLibDir,
&m_EnableLibDir, m_EnableLibDir ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableEeschemaPrintCairo,
&m_EnableEeschemaPrintCairo,
m_EnableEeschemaPrintCairo ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableEeschemaExportClipboardCairo,
&m_EnableEeschemaExportClipboardCairo,
m_EnableEeschemaExportClipboardCairo ) );
configParams.push_back( new PARAM_CFG_DOUBLE( true, AC_KEYS::PcbSelectionVisibilityRatio,
&m_PcbSelectionVisibilityRatio,
m_PcbSelectionVisibilityRatio, 0.0, 1.0 ) );
@@ -531,11 +525,11 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::TriangulateSimplificationLevel,
&m_TriangulateSimplificationLevel,
m_TriangulateSimplificationLevel, 0, 1000 ) );
m_TriangulateSimplificationLevel, 5, 1000 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::TriangulateMinimumArea,
&m_TriangulateMinimumArea,
m_TriangulateMinimumArea, 0, 100000 ) );
m_TriangulateMinimumArea, 25, 100000 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::EnableCacheFriendlyFracture,
&m_EnableCacheFriendlyFracture,
@@ -592,6 +586,22 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
&m_NetInspectorBulkUpdateOptimisationThreshold,
m_NetInspectorBulkUpdateOptimisationThreshold, 0, 1000 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::ExcludeFromSimulationLineWidth,
&m_ExcludeFromSimulationLineWidth,
m_ExcludeFromSimulationLineWidth, 1, 100 ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::GitIconRefreshInterval,
&m_GitIconRefreshInterval,
m_GitIconRefreshInterval, 0, 100000 ) );
configParams.push_back( new PARAM_CFG_BOOL( true, AC_KEYS::ConfigurableToolbars,
&m_ConfigurableToolbars,
m_ConfigurableToolbars ) );
configParams.push_back( new PARAM_CFG_INT( true, AC_KEYS::MaxPastedTextLength,
&m_MaxPastedTextLength,
m_MaxPastedTextLength, 0, 100000 ) );
// Special case for trace mask setting...we just grab them and set them immediately
// Because we even use wxLogTrace inside of advanced config
wxString traceMasks;
+74
View File
@@ -53,6 +53,7 @@ KICAD_T FromProtoEnum( types::KiCadObjectType aValue )
case types::KiCadObjectType::KOT_PCB_DIMENSION: return PCB_DIMENSION_T;
case types::KiCadObjectType::KOT_PCB_ZONE: return PCB_ZONE_T;
case types::KiCadObjectType::KOT_PCB_GROUP: return PCB_GROUP_T;
case types::KiCadObjectType::KOT_SCH_GROUP: return SCH_GROUP_T;
case types::KiCadObjectType::KOT_SCH_MARKER: return SCH_MARKER_T;
case types::KiCadObjectType::KOT_SCH_JUNCTION: return SCH_JUNCTION_T;
case types::KiCadObjectType::KOT_SCH_NO_CONNECT: return SCH_NO_CONNECT_T;
@@ -126,6 +127,7 @@ types::KiCadObjectType ToProtoEnum( KICAD_T aValue )
case SCH_TABLECELL_T: return types::KiCadObjectType::KOT_SCH_TABLECELL;
case SCH_LABEL_T: return types::KiCadObjectType::KOT_SCH_LABEL;
case SCH_GLOBAL_LABEL_T: return types::KiCadObjectType::KOT_SCH_GLOBAL_LABEL;
case SCH_GROUP_T: return types::KiCadObjectType::KOT_SCH_GROUP;
case SCH_HIER_LABEL_T: return types::KiCadObjectType::KOT_SCH_HIER_LABEL;
case SCH_DIRECTIVE_LABEL_T: return types::KiCadObjectType::KOT_SCH_DIRECTIVE_LABEL;
case SCH_FIELD_T: return types::KiCadObjectType::KOT_SCH_FIELD;
@@ -214,6 +216,42 @@ PCB_LAYER_ID FromProtoEnum( board::types::BoardLayer aValue )
case board::types::BoardLayer::BL_User_8: return User_8;
case board::types::BoardLayer::BL_User_9: return User_9;
case board::types::BoardLayer::BL_Rescue: return Rescue;
case board::types::BoardLayer::BL_User_10: return User_10;
case board::types::BoardLayer::BL_User_11: return User_11;
case board::types::BoardLayer::BL_User_12: return User_12;
case board::types::BoardLayer::BL_User_13: return User_13;
case board::types::BoardLayer::BL_User_14: return User_14;
case board::types::BoardLayer::BL_User_15: return User_15;
case board::types::BoardLayer::BL_User_16: return User_16;
case board::types::BoardLayer::BL_User_17: return User_17;
case board::types::BoardLayer::BL_User_18: return User_18;
case board::types::BoardLayer::BL_User_19: return User_19;
case board::types::BoardLayer::BL_User_20: return User_20;
case board::types::BoardLayer::BL_User_21: return User_21;
case board::types::BoardLayer::BL_User_22: return User_22;
case board::types::BoardLayer::BL_User_23: return User_23;
case board::types::BoardLayer::BL_User_24: return User_24;
case board::types::BoardLayer::BL_User_25: return User_25;
case board::types::BoardLayer::BL_User_26: return User_26;
case board::types::BoardLayer::BL_User_27: return User_27;
case board::types::BoardLayer::BL_User_28: return User_28;
case board::types::BoardLayer::BL_User_29: return User_29;
case board::types::BoardLayer::BL_User_30: return User_30;
case board::types::BoardLayer::BL_User_31: return User_31;
case board::types::BoardLayer::BL_User_32: return User_32;
case board::types::BoardLayer::BL_User_33: return User_33;
case board::types::BoardLayer::BL_User_34: return User_34;
case board::types::BoardLayer::BL_User_35: return User_35;
case board::types::BoardLayer::BL_User_36: return User_36;
case board::types::BoardLayer::BL_User_37: return User_37;
case board::types::BoardLayer::BL_User_38: return User_38;
case board::types::BoardLayer::BL_User_39: return User_39;
case board::types::BoardLayer::BL_User_40: return User_40;
case board::types::BoardLayer::BL_User_41: return User_41;
case board::types::BoardLayer::BL_User_42: return User_42;
case board::types::BoardLayer::BL_User_43: return User_43;
case board::types::BoardLayer::BL_User_44: return User_44;
case board::types::BoardLayer::BL_User_45: return User_45;
case board::types::BoardLayer::BL_UNKNOWN: return UNDEFINED_LAYER;
default:
@@ -290,6 +328,42 @@ board::types::BoardLayer ToProtoEnum( PCB_LAYER_ID aValue )
case User_8: return board::types::BoardLayer::BL_User_8;
case User_9: return board::types::BoardLayer::BL_User_9;
case Rescue: return board::types::BoardLayer::BL_Rescue;
case User_10: return board::types::BoardLayer::BL_User_10;
case User_11: return board::types::BoardLayer::BL_User_11;
case User_12: return board::types::BoardLayer::BL_User_12;
case User_13: return board::types::BoardLayer::BL_User_13;
case User_14: return board::types::BoardLayer::BL_User_14;
case User_15: return board::types::BoardLayer::BL_User_15;
case User_16: return board::types::BoardLayer::BL_User_16;
case User_17: return board::types::BoardLayer::BL_User_17;
case User_18: return board::types::BoardLayer::BL_User_18;
case User_19: return board::types::BoardLayer::BL_User_19;
case User_20: return board::types::BoardLayer::BL_User_20;
case User_21: return board::types::BoardLayer::BL_User_21;
case User_22: return board::types::BoardLayer::BL_User_22;
case User_23: return board::types::BoardLayer::BL_User_23;
case User_24: return board::types::BoardLayer::BL_User_24;
case User_25: return board::types::BoardLayer::BL_User_25;
case User_26: return board::types::BoardLayer::BL_User_26;
case User_27: return board::types::BoardLayer::BL_User_27;
case User_28: return board::types::BoardLayer::BL_User_28;
case User_29: return board::types::BoardLayer::BL_User_29;
case User_30: return board::types::BoardLayer::BL_User_30;
case User_31: return board::types::BoardLayer::BL_User_31;
case User_32: return board::types::BoardLayer::BL_User_32;
case User_33: return board::types::BoardLayer::BL_User_33;
case User_34: return board::types::BoardLayer::BL_User_34;
case User_35: return board::types::BoardLayer::BL_User_35;
case User_36: return board::types::BoardLayer::BL_User_36;
case User_37: return board::types::BoardLayer::BL_User_37;
case User_38: return board::types::BoardLayer::BL_User_38;
case User_39: return board::types::BoardLayer::BL_User_39;
case User_40: return board::types::BoardLayer::BL_User_40;
case User_41: return board::types::BoardLayer::BL_User_41;
case User_42: return board::types::BoardLayer::BL_User_42;
case User_43: return board::types::BoardLayer::BL_User_43;
case User_44: return board::types::BoardLayer::BL_User_44;
case User_45: return board::types::BoardLayer::BL_User_45;
default:
wxCHECK_MSG( false, board::types::BoardLayer::BL_UNKNOWN,
"Unhandled case in ToProtoEnum<PCB_LAYER_ID>");
+1 -1
View File
@@ -19,7 +19,7 @@
*/
#include <magic_enum.hpp>
#include <nlohmann/json.hpp>
#include <json_common.h>
#include <wx/log.h>
#include <wx/regex.h>
#include <wx/stdstream.h>
+9
View File
@@ -21,6 +21,7 @@
#include <magic_enum.hpp>
#include <api/api_utils.h>
#include <geometry/shape_poly_set.h>
#include <kiid.h>
#include <wx/log.h>
const wxChar* const traceApi = wxT( "KICAD_API" );
@@ -232,4 +233,12 @@ KICOMMON_API KIGFX::COLOR4D UnpackColor( const types::Color& aInput )
return KIGFX::COLOR4D( r, g, b, a );
}
KICOMMON_API void PackSheetPath( types::SheetPath& aOutput, const KIID_PATH& aInput )
{
aOutput.clear_path();
for( const KIID& entry : aInput )
aOutput.add_path()->set_value( entry.AsStdString() );
}
} // namespace kiapi::common
+480
View File
@@ -0,0 +1,480 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright The KiCad Developers, see AUTHORS.TXT for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <app_monitor.h>
#include <pgm_base.h>
#include <magic_enum.hpp>
#include <kiplatform/policy.h>
#include <policy_keys.h>
#include <paths.h>
#include <wx/filename.h>
#include <wx/ffile.h>
#include <boost/uuid/uuid_io.hpp>
#include <boost/uuid/uuid_generators.hpp>
#include <build_version.h>
#ifdef KICAD_USE_SENTRY
#include <sentry.h>
#endif
using namespace APP_MONITOR;
SENTRY::SENTRY() :
m_isOptedIn( false )
{
}
void SENTRY::Init()
{
#ifdef KICAD_USE_SENTRY
sentryInit();
#endif
}
void SENTRY::Cleanup()
{
#ifdef KICAD_USE_SENTRY
sentry_close();
#endif
}
void SENTRY::AddTag( const wxString& aKey, const wxString& aValue )
{
#ifdef KICAD_USE_SENTRY
sentry_set_tag( aKey.c_str(), aValue.c_str() );
#endif
}
void SENTRY::SetSentryOptIn( bool aOptIn )
{
#ifdef KICAD_USE_SENTRY
if( aOptIn )
{
// Opting in (when not opted in before) may require reading the uid off disk
// as it was skipped previously.
readOrCreateUid();
if( !m_sentry_optin_fn.Exists() )
{
wxFFile sentryInitFile( m_sentry_optin_fn.GetFullPath(), "w" );
sentryInitFile.Write( "" );
sentryInitFile.Close();
}
m_isOptedIn = true;
}
else
{
if( m_sentry_optin_fn.Exists() )
{
wxRemoveFile( m_sentry_optin_fn.GetFullPath() );
sentry_close();
}
m_isOptedIn = false;
}
#else
m_isOptedIn = false;
#endif
}
wxString SENTRY::sentryCreateUid()
{
boost::uuids::uuid uuid = boost::uuids::random_generator()();
wxString userGuid = boost::uuids::to_string( uuid );
wxFFile sentryInitFile( m_sentry_uid_fn.GetFullPath(), "w" );
sentryInitFile.Write( userGuid );
sentryInitFile.Close();
return userGuid;
}
void SENTRY::ResetSentryId()
{
m_sentryUid = sentryCreateUid();
}
const wxString& SENTRY::GetSentryId()
{
return m_sentryUid;
}
void SENTRY::readOrCreateUid()
{
wxFFile sentryInitFile( m_sentry_uid_fn.GetFullPath() );
sentryInitFile.ReadAll( &m_sentryUid );
sentryInitFile.Close();
if( m_sentryUid.IsEmpty() || m_sentryUid.length() != 36 )
{
ResetSentryId();
}
}
void SENTRY::sentryInit()
{
#ifdef KICAD_USE_SENTRY
m_sentry_optin_fn = wxFileName( PATHS::GetUserCachePath(), "sentry-opt-in" );
m_sentry_uid_fn = wxFileName( PATHS::GetUserCachePath(), "sentry-uid" );
if( isConfiguredOptedIn() )
{
m_isOptedIn = true;
readOrCreateUid();
sentry_options_t* options = sentry_options_new();
#ifndef KICAD_SENTRY_DSN
#error "Project configuration error, missing KICAD_SENTRY_DSN"
#endif
// only capture 5% of transactions
sentry_options_set_traces_sample_rate( options, 0.05 );
sentry_options_set_dsn( options, KICAD_SENTRY_DSN );
wxFileName tmp;
tmp.AssignDir( PATHS::GetUserCachePath() );
tmp.AppendDir( "sentry" );
#ifdef __WINDOWS__
sentry_options_set_database_pathw( options, tmp.GetPathWithSep().wc_str() );
#else
sentry_options_set_database_path( options, tmp.GetPathWithSep().c_str() );
#endif
sentry_options_set_symbolize_stacktraces( options, true );
sentry_options_set_auto_session_tracking( options, false );
sentry_options_set_release( options, GetCommitHash().ToStdString().c_str() );
// This just gives us more filtering within sentry, issues still get grouped across
// environments.
sentry_options_set_environment( options, GetMajorMinorVersion().c_str() );
sentry_init( options );
sentry_value_t user = sentry_value_new_object();
sentry_value_set_by_key( user, "id", sentry_value_new_string( m_sentryUid.c_str() ) );
sentry_set_user( user );
sentry_set_tag( "kicad.version", GetBuildVersion().ToStdString().c_str() );
}
#endif
}
bool SENTRY::isConfiguredOptedIn()
{
// policy takes precedence
KIPLATFORM::POLICY::PBOOL policyState = KIPLATFORM::POLICY::GetPolicyBool( POLICY_KEY_DATACOLLECTION );
if( policyState != KIPLATFORM::POLICY::PBOOL::NOT_CONFIGURED )
{
return policyState == KIPLATFORM::POLICY::PBOOL::ENABLED;
}
return m_sentry_optin_fn.Exists();
}
bool SENTRY::IsOptedIn()
{
#ifdef KICAD_USE_SENTRY
// always override with policy, just in case
KIPLATFORM::POLICY::PBOOL policyState = KIPLATFORM::POLICY::GetPolicyBool( POLICY_KEY_DATACOLLECTION );
if( policyState != KIPLATFORM::POLICY::PBOOL::NOT_CONFIGURED )
{
return policyState == KIPLATFORM::POLICY::PBOOL::ENABLED;
}
return m_isOptedIn;
#else
return false;
#endif
}
void SENTRY::LogAssert( const ASSERT_CACHE_KEY& aKey, const wxString& aAssertMsg )
{
#ifdef KICAD_USE_SENTRY
if( !APP_MONITOR::SENTRY::Instance()->IsOptedIn() )
{
return;
}
// We use an assert cache to avoid collecting too many events
// Because they can come from functions that are called hundreds of times in loops
if( m_assertCache.find( aKey ) == m_assertCache.end() )
{
sentry_value_t exc = sentry_value_new_exception( "assert", aAssertMsg.c_str() );
sentry_value_set_stacktrace( exc, NULL, 0 );
sentry_value_t sentryEvent = sentry_value_new_event();
sentry_event_add_exception( sentryEvent, exc );
sentry_capture_event( sentryEvent );
m_assertCache.insert( aKey );
}
#endif
}
void SENTRY::LogException( const wxString& aMsg )
{
#ifdef KICAD_USE_SENTRY
if( !APP_MONITOR::SENTRY::Instance()->IsOptedIn() )
{
return;
}
sentry_value_t exc = sentry_value_new_exception( "exception", aMsg.c_str() );
sentry_value_set_stacktrace( exc, NULL, 0 );
sentry_value_t sentryEvent = sentry_value_new_event();
sentry_event_add_exception( sentryEvent, exc );
sentry_capture_event( sentryEvent );
#endif
}
#ifdef KICAD_USE_SENTRY
static std::string GetSentryBreadCrumbType( BREADCRUMB_TYPE aType )
{
// the only special case due to collisions with defines
if( aType == BREADCRUMB_TYPE::DBG )
return "debug";
if( aType == BREADCRUMB_TYPE::ERR )
return "error";
std::string ret( magic_enum::enum_name( aType ) );
std::transform( ret.begin(), ret.end(), ret.begin(),
[]( unsigned char c )
{
return std::tolower( c );
} );
return ret;
}
static std::string GetSentryBreadCrumbLevel( BREADCRUMB_LEVEL aLevel )
{
// the only special case due to collisions with defines
if( aLevel == BREADCRUMB_LEVEL::DBG )
return "debug";
if( aLevel == BREADCRUMB_LEVEL::ERR )
return "error";
std::string ret( magic_enum::enum_name( aLevel ) );
std::transform( ret.begin(), ret.end(), ret.begin(),
[]( unsigned char c )
{
return std::tolower( c );
} );
return ret;
}
#endif
namespace APP_MONITOR
{
SENTRY* SENTRY::m_instance = nullptr;
bool operator<( const ASSERT_CACHE_KEY& aKey1, const ASSERT_CACHE_KEY& aKey2 )
{
return aKey1.file < aKey2.file || aKey1.line < aKey2.line || aKey1.func < aKey2.func || aKey1.cond < aKey2.cond;
}
void AddBreadcrumb( BREADCRUMB_TYPE aType, const wxString& aMsg, const wxString& aCategory, BREADCRUMB_LEVEL aLevel )
{
#ifdef KICAD_USE_SENTRY
if( !SENTRY::Instance()->IsOptedIn() )
{
return;
}
std::string type = GetSentryBreadCrumbType( aType );
sentry_value_t crumb = sentry_value_new_breadcrumb( type.c_str(), aMsg.c_str() );
sentry_value_set_by_key( crumb, "category", sentry_value_new_string( aCategory.c_str() ) );
if( aType == BREADCRUMB_TYPE::ERR )
{
std::string level = GetSentryBreadCrumbLevel( aLevel );
sentry_value_set_by_key( crumb, "level", sentry_value_new_string( level.c_str() ) );
}
sentry_add_breadcrumb( crumb );
#endif
}
void AddNavigationBreadcrumb( const wxString& aMsg, const wxString& aCategory )
{
#ifdef KICAD_USE_SENTRY
AddBreadcrumb( BREADCRUMB_TYPE::NAVIGATION, aMsg, aCategory, BREADCRUMB_LEVEL::INFO );
#endif
}
void AddTransactionBreadcrumb( const wxString& aMsg, const wxString& aCategory )
{
#ifdef KICAD_USE_SENTRY
AddBreadcrumb( BREADCRUMB_TYPE::TRANSACTION, aMsg, aCategory, BREADCRUMB_LEVEL::INFO );
#endif
}
#ifdef KICAD_USE_SENTRY
class TRANSACTION_IMPL
{
public:
TRANSACTION_IMPL( const std::string& aName, const std::string& aOperation )
{
m_ctx = sentry_transaction_context_new( aName.c_str(), aOperation.c_str() );
}
~TRANSACTION_IMPL() {
Finish();
// note m_ctx is handled by sentry
}
void Start()
{
m_tx = sentry_transaction_start( m_ctx, sentry_value_new_null() );
}
void Finish()
{
FinishSpan();
if( m_tx )
{
sentry_transaction_finish( m_tx );
m_tx = nullptr;
}
}
void StartSpan( const std::string& aOperation, const std::string& aDescription )
{
if( m_span )
return;
if( !m_tx )
return;
m_span = sentry_transaction_start_child( m_tx, aOperation.c_str(), aDescription.c_str() );
}
void FinishSpan()
{
if( m_span )
{
sentry_span_finish( m_span );
m_span = nullptr;
}
}
private:
sentry_transaction_context_t* m_ctx = nullptr;
sentry_transaction_t* m_tx = nullptr;
sentry_span_t* m_span = nullptr;
};
#endif
}
TRANSACTION::TRANSACTION( const std::string& aName, const std::string& aOperation )
{
#ifdef KICAD_USE_SENTRY
if( SENTRY::Instance()->IsOptedIn() )
{
m_impl = new TRANSACTION_IMPL( aName, aOperation );
}
#endif
}
TRANSACTION::~TRANSACTION()
{
#ifdef KICAD_USE_SENTRY
delete m_impl;
#endif
}
void TRANSACTION::Start()
{
#ifdef KICAD_USE_SENTRY
if( m_impl )
{
m_impl->Start();
}
#endif
}
void TRANSACTION::StartSpan( const std::string& aOperation, const std::string& aDescription )
{
#ifdef KICAD_USE_SENTRY
if( m_impl )
{
m_impl->StartSpan( aOperation, aDescription );
}
#endif
}
void TRANSACTION::Finish()
{
#ifdef KICAD_USE_SENTRY
if( m_impl )
{
m_impl->Finish();
}
#endif
}
void TRANSACTION::FinishSpan()
{
#ifdef KICAD_USE_SENTRY
if( m_impl )
{
m_impl->FinishSpan();
}
#endif
}
-1
View File
@@ -134,7 +134,6 @@ void ARRAY_AXIS::SetStep( int aStep )
wxString ARRAY_AXIS::GetItemNumber( int n ) const
{
wxString itemNum;
const wxString& alphabet = GetAlphabet();
const bool nonUnitColsStartAt0 = schemeNonUnitColsStartAt0( m_type );
+5
View File
@@ -133,6 +133,11 @@ ARRAY_OPTIONS::TRANSFORM ARRAY_CIRCULAR_OPTIONS::GetTransform( int n, const VECT
// n'th step
angle = EDA_ANGLE( m_angle.AsDegrees() * n, DEGREES_T );
angle += m_angleOffset;
if( m_clockwise )
angle = -angle;
VECTOR2I new_pos = aPos;
RotatePoint( new_pos, m_centre, angle );
+4 -5
View File
@@ -173,9 +173,10 @@ private:
BACKGROUND_JOB_REPORTER::BACKGROUND_JOB_REPORTER( BACKGROUND_JOBS_MONITOR* aMonitor,
std::shared_ptr<BACKGROUND_JOB> aJob ) :
const std::shared_ptr<BACKGROUND_JOB>& aJob ) :
PROGRESS_REPORTER_BASE( 1 ),
m_monitor( aMonitor ), m_job( aJob )
m_monitor( aMonitor ),
m_job( aJob )
{
}
@@ -305,10 +306,8 @@ void BACKGROUND_JOBS_MONITOR::ShowList( wxWindow* aParent, wxPoint aPos )
std::shared_lock<std::shared_mutex> lock( m_mutex, std::try_to_lock );
for( std::shared_ptr<BACKGROUND_JOB> job : m_jobs )
{
for( const std::shared_ptr<BACKGROUND_JOB>& job : m_jobs )
list->Add( job );
}
lock.unlock();
+1 -1
View File
@@ -208,7 +208,7 @@ bool BITMAP_BASE::SaveImageData( wxOutputStream& aOutStream ) const
else
{
// Write the contents of m_imageData to the stream.
aOutStream.Write( m_imageData.GetData(), m_imageData.GetBufSize() );
aOutStream.Write( m_imageData.GetData(), m_imageData.GetDataLen() );
}
return true;
+10
View File
@@ -102,6 +102,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_16.png" ), 16, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_16.png" ), 16, wxT( "light" ) );
@@ -185,6 +187,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_dark_16.png" ), 16, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_dark_16.png" ), 16, wxT( "dark" ) );
@@ -268,6 +272,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_32.png" ), 32, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_32.png" ), 32, wxT( "light" ) );
@@ -351,6 +357,8 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::text_valign_top].emplace_back( BITMAPS::text_valign_top, wxT( "text_valign_top_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_center].emplace_back( BITMAPS::text_valign_center, wxT( "text_valign_center_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_valign_bottom].emplace_back( BITMAPS::text_valign_bottom, wxT( "text_valign_bottom_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility].emplace_back( BITMAPS::text_visibility, wxT( "text_visibility_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_visibility_off].emplace_back( BITMAPS::text_visibility_off, wxT( "text_visibility_off_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_bold].emplace_back( BITMAPS::text_bold, wxT( "text_bold_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_italic].emplace_back( BITMAPS::text_italic, wxT( "text_italic_dark_32.png" ), 32, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::text_mirrored].emplace_back( BITMAPS::text_mirrored, wxT( "text_mirrored_dark_32.png" ), 32, wxT( "dark" ) );
@@ -4893,6 +4901,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::color_code_tolerance].emplace_back( BITMAPS::color_code_tolerance, wxT( "color_code_tolerance.png" ), -1, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::color_code_value].emplace_back( BITMAPS::color_code_value, wxT( "color_code_value.png" ), -1, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::color_code_value_and_name].emplace_back( BITMAPS::color_code_value_and_name, wxT( "color_code_value_and_name.png" ), -1, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::coupled_stripline].emplace_back( BITMAPS::coupled_stripline, wxT( "coupled_stripline.png" ), -1, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::creepage_clearance].emplace_back( BITMAPS::creepage_clearance, wxT( "creepage_clearance.png" ), -1, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::cpw].emplace_back( BITMAPS::cpw, wxT( "cpw.png" ), -1, wxT( "light" ) );
aBitmapInfoCache[BITMAPS::cpw_back].emplace_back( BITMAPS::cpw_back, wxT( "cpw_back.png" ), -1, wxT( "light" ) );
@@ -4928,6 +4937,7 @@ void BuildBitmapInfo( std::unordered_map<BITMAPS, std::vector<BITMAP_INFO>>& aBi
aBitmapInfoCache[BITMAPS::color_code_tolerance].emplace_back( BITMAPS::color_code_tolerance, wxT( "color_code_tolerance_dark.png" ), -1, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::color_code_value].emplace_back( BITMAPS::color_code_value, wxT( "color_code_value_dark.png" ), -1, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::color_code_value_and_name].emplace_back( BITMAPS::color_code_value_and_name, wxT( "color_code_value_and_name_dark.png" ), -1, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::coupled_stripline].emplace_back( BITMAPS::coupled_stripline, wxT( "coupled_stripline_dark.png" ), -1, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::creepage_clearance].emplace_back( BITMAPS::creepage_clearance, wxT( "creepage_clearance_dark.png" ), -1, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::cpw].emplace_back( BITMAPS::cpw, wxT( "cpw_dark.png" ), -1, wxT( "dark" ) );
aBitmapInfoCache[BITMAPS::cpw_back].emplace_back( BITMAPS::cpw_back, wxT( "cpw_back_dark.png" ), -1, wxT( "dark" ) );
+28 -14
View File
@@ -31,6 +31,7 @@
#include <build_version.h>
#include <tuple>
#include <mutex>
// kicad_curl.h must be included before wx headers, to avoid
// conflicts for some defines, at least on Windows
@@ -51,6 +52,9 @@ extern std::string GetCurlLibVersion();
#include <kicad_build_version.h>
#undef INCLUDE_KICAD_VERSION
// Mutex for wxPlatformInfo
static std::recursive_mutex s_platformInfoMutex;
// Remember OpenGL info
static wxString s_glVendor;
static wxString s_glRenderer;
@@ -66,8 +70,10 @@ void SetOpenGLInfo( const char* aVendor, const char* aRenderer, const char* aVer
wxString GetPlatformGetBitnessName()
{
wxPlatformInfo platform;
return platform.GetBitnessName();
// wxPlatformInfo is not thread-safe, so protect it
std::unique_lock lock(s_platformInfoMutex);
return wxPlatformInfo().GetBitnessName();
}
@@ -157,7 +163,6 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
#endif
<< " build";
wxPlatformInfo platform;
aMsg << "Application: " << aTitle;
aMsg << " " << wxGetCpuArchitectureName() << " on " << wxGetNativeCpuArchitectureName();
@@ -187,14 +192,19 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
// Linux uses the lsb-release program to get the description of the OS, if lsb-release
// isn't installed, then the string will be empty and we fallback to the method used on
// the other platforms (to at least get the kernel/uname info).
if( osDescription.empty() )
osDescription = wxGetOsDescription();
if( osDescription.empty() )
osDescription = wxGetOsDescription();
aMsg << "Platform: "
<< osDescription << ", "
<< GetPlatformGetBitnessName() << ", "
<< platform.GetEndiannessName() << ", "
<< platform.GetPortIdName();
{
// wxPlatformInfo is not thread-safe, so protect it
std::unique_lock lock( s_platformInfoMutex );
aMsg << "Platform: "
<< osDescription << ", "
<< GetPlatformGetBitnessName() << ", "
<< wxPlatformInfo().GetEndiannessName() << ", "
<< wxPlatformInfo().GetPortIdName();
}
#ifdef __WXGTK__
if( wxTheApp && wxTheApp->IsGUI() )
@@ -240,11 +250,15 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
// Get the GTK+ version where possible.
#ifdef __WXGTK__
int major, minor;
{
// wxPlatformInfo is not thread-safe, so protect it
std::unique_lock lock( s_platformInfoMutex );
int major, minor;
major = wxPlatformInfo().Get().GetToolkitMajorVersion();
minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
aMsg << " GTK+ " << major << "." << minor;
major = wxPlatformInfo().GetToolkitMajorVersion();
minor = wxPlatformInfo().GetToolkitMinorVersion();
aMsg << " GTK+ " << major << "." << minor;
}
#endif
aMsg << eol;
+69 -1
View File
@@ -26,6 +26,12 @@
#include <wx/clipbrd.h>
#include <wx/image.h>
#include <wx/log.h>
#include <wx/string.h>
#include <wx/sstream.h>
#include <sstream>
#include <io/csv.h>
bool SaveClipboard( const std::string& aTextUTF8 )
@@ -106,4 +112,66 @@ std::unique_ptr<wxImage> GetImageFromClipboard()
}
return image;
}
}
bool SaveTabularDataToClipboard( const std::vector<std::vector<wxString>>& aData )
{
wxLogNull doNotLog; // disable logging of failed clipboard actions
if( wxTheClipboard->Open() )
{
wxDataObjectComposite* data = new wxDataObjectComposite();
// Set plain text CSV
{
wxStringOutputStream os;
CSV_WRITER writer( os );
writer.WriteLines( aData );
data->Add( new wxTextDataObject( os.GetString() ), true );
}
// At this point, it would be great if we could add some format that spreadsheet
// programs can understand without asking the user for options: perhaps SYLK or DIF.
// But it doesn't seem like WX allows to put arbitrary MIME types on the clipboard,
// even with wxCustomDataObject( wxDataFormat( "mime/type" ) ), which just ends up as
// wxDF_PRIVATE, and wxDF_SYLK/DIF aren't mapped on GTK.
wxTheClipboard->SetData( data );
wxTheClipboard->Flush(); // Allow data to be available after closing KiCad
wxTheClipboard->Close();
return true;
}
return false;
}
bool GetTabularDataFromClipboard( std::vector<std::vector<wxString>>& aData )
{
// Again, it would be ideal if we could detect a spreadsheet mimetype here,
// but WX doesn't seem to do that on Linux, at least.
bool ok = false;
// First try for text data
if( wxTheClipboard->Open() )
{
if( wxTheClipboard->IsSupported( wxDF_TEXT ) )
{
wxTextDataObject data;
if( wxTheClipboard->GetData( data ) )
{
ok = AutoDecodeCSV( data.GetText(), aData );
}
}
// We could also handle .csv wxDF_FILENAMEs here
wxTheClipboard->Close();
}
return ok;
}
+13 -28
View File
@@ -28,6 +28,7 @@
#include <core/kicad_algo.h>
#include <commit.h>
#include <eda_item.h>
#include <eda_group.h>
#include <macros.h>
COMMIT::COMMIT()
@@ -38,14 +39,12 @@ COMMIT::COMMIT()
COMMIT::~COMMIT()
{
for( COMMIT_LINE& ent : m_changes )
{
if( ent.m_copy )
delete ent.m_copy;
}
delete ent.m_copy;
}
COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType, BASE_SCREEN* aScreen )
COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType, BASE_SCREEN* aScreen,
RECURSE_MODE aRecurse )
{
// CHT_MODIFY and CHT_DONE are not compatible
wxASSERT( ( aChangeType & ( CHT_MODIFY | CHT_DONE ) ) != ( CHT_MODIFY | CHT_DONE ) );
@@ -56,32 +55,25 @@ COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType, BASE_SCREEN* aS
{
case CHT_ADD:
makeEntry( aItem, CHT_ADD | flag, nullptr, aScreen );
return *this;
break;
case CHT_REMOVE:
wxASSERT( m_deletedItems.find( aItem ) == m_deletedItems.end() );
m_deletedItems.insert( aItem );
makeEntry( aItem, CHT_REMOVE | flag, nullptr, aScreen );
return *this;
makeEntry( aItem, CHT_REMOVE | flag, makeImage( aItem ), aScreen );
if( EDA_GROUP* parentGroup = aItem->GetParentGroup() )
Modify( parentGroup->AsEdaItem(), aScreen, RECURSE_MODE::NO_RECURSE );
break;
case CHT_MODIFY:
{
EDA_ITEM* parent = parentObject( aItem );
EDA_ITEM* clone = makeImage( parent );
wxASSERT( clone );
if( clone )
return createModified( parent, clone, flag, aScreen );
createModified( parent, makeImage( parent ), flag, aScreen );
break;
}
case CHT_GROUP:
case CHT_UNGROUP:
makeEntry( aItem, aChangeType, nullptr, aScreen );
return *this;
default:
wxFAIL;
}
@@ -91,7 +83,7 @@ COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType, BASE_SCREEN* aS
COMMIT& COMMIT::Stage( std::vector<EDA_ITEM*> &container, CHANGE_TYPE aChangeType,
BASE_SCREEN *aScreen )
BASE_SCREEN *aScreen )
{
for( EDA_ITEM* item : container )
Stage( item, aChangeType, aScreen);
@@ -154,9 +146,6 @@ COMMIT& COMMIT::createModified( EDA_ITEM* aItem, EDA_ITEM* aCopy, int aExtraFlag
void COMMIT::makeEntry( EDA_ITEM* aItem, CHANGE_TYPE aType, EDA_ITEM* aCopy, BASE_SCREEN *aScreen )
{
// Expect an item copy if it is going to be modified
wxASSERT( !!aCopy == ( ( aType & CHT_TYPE ) == CHT_MODIFY ) );
COMMIT_LINE ent;
ent.m_item = aItem;
@@ -190,8 +179,6 @@ CHANGE_TYPE COMMIT::convert( UNDO_REDO aType ) const
{
case UNDO_REDO::NEWITEM: return CHT_ADD;
case UNDO_REDO::DELETED: return CHT_REMOVE;
case UNDO_REDO::REGROUP: return CHT_GROUP;
case UNDO_REDO::UNGROUP: return CHT_UNGROUP;
case UNDO_REDO::CHANGED: return CHT_MODIFY;
default: wxASSERT( false ); return CHT_MODIFY;
}
@@ -204,8 +191,6 @@ UNDO_REDO COMMIT::convert( CHANGE_TYPE aType ) const
{
case CHT_ADD: return UNDO_REDO::NEWITEM;
case CHT_REMOVE: return UNDO_REDO::DELETED;
case CHT_GROUP: return UNDO_REDO::REGROUP;
case CHT_UNGROUP: return UNDO_REDO::UNGROUP;
case CHT_MODIFY: return UNDO_REDO::CHANGED;
default: wxASSERT( false ); return UNDO_REDO::CHANGED;
}
+7 -5
View File
@@ -40,7 +40,7 @@
#include <wx/regex.h>
#ifdef _WIN32
#include <Windows.h>
#include <windows.h>
#endif
@@ -118,11 +118,12 @@ wxString ExpandTextVars( const wxString& aSource,
}
wxString GetTextVars( const wxString& aSource )
wxString GetGeneratedFieldDisplayName( const wxString& aSource )
{
std::function<bool( wxString* )> tokenExtractor =
[&]( wxString* token ) -> bool
{
*token = *token; // token value is the token name
return true;
};
@@ -130,9 +131,10 @@ wxString GetTextVars( const wxString& aSource )
}
bool IsTextVar( const wxString& aSource )
bool IsGeneratedField( const wxString& aSource )
{
return aSource.StartsWith( wxS( "${" ) );
static wxRegEx expr( wxS( "^\\$\\{\\w*\\}$" ) );
return expr.Matches( aSource );
}
@@ -431,7 +433,7 @@ wxString EnsureFileExtension( const wxString& aFilename, const wxString& aExtens
// extension, such as "Schematic_1.1".
if( newFilename.Lower().AfterLast( '.' ) != aExtension )
{
if( newFilename.Last() != '.' )
if( !newFilename.EndsWith( '.' ) )
newFilename.Append( '.' );
newFilename.Append( aExtension );
+25 -23
View File
@@ -31,8 +31,6 @@
#include <wx/msgdlg.h>
#include <wx/choicdlg.h>
#include <wx/crt.h>
/**
* Flag to enable confirmation dialog debugging output.
*
@@ -53,7 +51,7 @@ bool AskOverrideLock( wxWindow* aParent, const wxString& aMessage )
+ wxS( "\n" ) );
dlg.SetYesNoLabels( _( "&Cancel" ), _( "&Open Anyway" ) );
#else
wxMessageDialog dlg( aParent, aMessage, _( "File Open Warning" ),
KICAD_MESSAGE_DIALOG_BASE dlg( aParent, aMessage, _( "File Open Warning" ),
wxYES_NO | wxICON_ERROR | wxCENTER );
dlg.SetExtendedMessage( _( "Interleaved saves may produce very unexpected results." ) );
dlg.SetYesNoLabels( _( "&Cancel" ), _( "&Open Anyway" ) );
@@ -67,8 +65,9 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage, bool* aApp
{
static bool s_apply_to_all = false;
wxRichMessageDialog dlg( parent, aMessage, _( "Save Changes?" ),
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_WARNING | wxCENTER );
KICAD_RICH_MESSAGE_DIALOG_BASE dlg( parent, aMessage, _( "Save Changes?" ),
wxYES_NO | wxCANCEL |
wxYES_DEFAULT | wxICON_WARNING | wxCENTER );
dlg.SetExtendedMessage( _( "If you don't save, all your changes will be permanently lost." )
+ wxS( "\n" ) );
dlg.SetYesNoLabels( _( "&Save" ), _( "&Discard Changes" ) );
@@ -105,7 +104,7 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage )
wxWindowDisabler disable( true );
#endif
wxMessageDialog dlg( parent, aMessage, _( "Save Changes?" ),
KICAD_MESSAGE_DIALOG_BASE dlg( parent, aMessage, _( "Save Changes?" ),
wxYES_NO | wxCANCEL | wxYES_DEFAULT | wxICON_WARNING | wxCENTER );
dlg.SetExtendedMessage( _( "If you don't save, all your changes will be permanently lost." ) );
dlg.SetYesNoLabels( _( "&Save" ), _( "&Discard Changes" ) );
@@ -118,8 +117,8 @@ int UnsavedChangesDialog( wxWindow* parent, const wxString& aMessage )
bool ConfirmRevertDialog( wxWindow* parent, const wxString& aMessage )
{
wxMessageDialog dlg( parent, aMessage, wxEmptyString,
wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER );
KICAD_MESSAGE_DIALOG_BASE dlg( parent, aMessage, wxEmptyString,
wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER );
dlg.SetExtendedMessage( _( "Your current changes will be permanently lost." ) );
dlg.SetOKCancelLabels( _( "&Revert" ), _( "&Cancel" ) );
@@ -144,8 +143,8 @@ int OKOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxStrin
const wxString& aDetailedMessage, const wxString& aOKLabel,
const wxString& aCancelLabel, bool* aApplyToAll )
{
wxRichMessageDialog dlg( aParent, aMessage, aWarning,
wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER );
KICAD_RICH_MESSAGE_DIALOG_BASE dlg( aParent, aMessage, aWarning,
wxOK | wxCANCEL | wxOK_DEFAULT | wxICON_WARNING | wxCENTER );
dlg.SetOKCancelLabels( ( aOKLabel.IsEmpty() ) ? _( "&OK" ) : aOKLabel,
( aCancelLabel.IsEmpty() ) ? _( "&Cancel" ) : aCancelLabel );
@@ -167,7 +166,7 @@ int OKOrCancelDialog( wxWindow* aParent, const wxString& aWarning, const wxStrin
// DisplayError should be deprecated, use DisplayErrorMessage instead
void DisplayError( wxWindow* aParent, const wxString& aText, int aDisplayTime )
void DisplayError( wxWindow* aParent, const wxString& aText )
{
if( !wxTheApp || !wxTheApp->IsMainLoopRunning() )
{
@@ -181,11 +180,11 @@ void DisplayError( wxWindow* aParent, const wxString& aText, int aDisplayTime )
return;
}
wxMessageDialog* dlg;
int icon = aDisplayTime > 0 ? wxICON_INFORMATION : wxICON_ERROR;
KICAD_MESSAGE_DIALOG_BASE* dlg;
dlg = new wxMessageDialog( aParent, aText, _( "Warning" ),
wxOK | wxCENTRE | wxRESIZE_BORDER | icon | wxSTAY_ON_TOP );
dlg = new KICAD_MESSAGE_DIALOG_BASE( aParent, aText, _( "Error" ),
wxOK | wxCENTRE | wxRESIZE_BORDER |
wxICON_ERROR | wxSTAY_ON_TOP );
dlg->ShowModal();
dlg->Destroy();
@@ -206,10 +205,11 @@ void DisplayErrorMessage( wxWindow* aParent, const wxString& aText, const wxStri
return;
}
wxMessageDialog* dlg;
KICAD_MESSAGE_DIALOG_BASE* dlg;
dlg = new wxMessageDialog( aParent, aText, _( "Error" ),
wxOK | wxCENTRE | wxRESIZE_BORDER | wxICON_ERROR | wxSTAY_ON_TOP );
dlg = new KICAD_MESSAGE_DIALOG_BASE( aParent, aText, _( "Error" ),
wxOK | wxCENTRE | wxRESIZE_BORDER |
wxICON_ERROR | wxSTAY_ON_TOP );
if( !aExtraInfo.IsEmpty() )
dlg->SetExtendedMessage( aExtraInfo );
@@ -233,11 +233,12 @@ void DisplayInfoMessage( wxWindow* aParent, const wxString& aMessage, const wxSt
return;
}
wxMessageDialog* dlg;
KICAD_MESSAGE_DIALOG_BASE* dlg;
int icon = wxICON_INFORMATION;
dlg = new wxMessageDialog( aParent, aMessage, _( "Information" ),
wxOK | wxCENTRE | wxRESIZE_BORDER | icon | wxSTAY_ON_TOP );
dlg = new KICAD_MESSAGE_DIALOG_BASE( aParent, aMessage, _( "Information" ),
wxOK | wxCENTRE | wxRESIZE_BORDER |
icon | wxSTAY_ON_TOP );
if( !aExtraInfo.IsEmpty() )
dlg->SetExtendedMessage( aExtraInfo );
@@ -263,8 +264,9 @@ bool IsOK( wxWindow* aParent, const wxString& aMessage )
#endif
#if !defined( __WXGTK__ )
wxRichMessageDialog dlg( aParent, aMessage, _( "Confirmation" ),
wxOK | wxCANCEL | wxOK_DEFAULT | wxCENTRE | icon | wxSTAY_ON_TOP );
KICAD_RICH_MESSAGE_DIALOG_BASE dlg( aParent, aMessage, _( "Confirmation" ),
wxOK | wxCANCEL | wxOK_DEFAULT |
wxCENTRE | icon | wxSTAY_ON_TOP );
#else
wxMessageDialog dlg( aParent, aMessage, _( "Confirmation" ),
wxOK | wxCANCEL | wxOK_DEFAULT | wxCENTRE | icon | wxSTAY_ON_TOP );
+1 -1
View File
@@ -33,7 +33,7 @@
const int dblibSchemaVersion = 1;
DATABASE_FIELD_MAPPING::DATABASE_FIELD_MAPPING( std::string aColumn, std::string aName,
DATABASE_FIELD_MAPPING::DATABASE_FIELD_MAPPING( const std::string& aColumn, const std::string& aName,
bool aVisibleOnAdd, bool aVisibleInChooser,
bool aShowName, bool aInheritProperties ) :
column( aColumn ),
+13 -3
View File
@@ -21,9 +21,13 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef DESIGN_BLOCK_H
#define DESIGN_BLOCK_H
#include <kicommon.h>
#include <lib_id.h>
#include <nlohmann/json.hpp>
#include <json_common.h>
class KICOMMON_API DESIGN_BLOCK
@@ -41,6 +45,9 @@ public:
const wxString& GetSchematicFile() const { return m_schematicFile; }
void SetSchematicFile( const wxString& aFile ) { m_schematicFile = aFile; }
const wxString& GetBoardFile() const { return m_boardFile; }
void SetBoardFile( const wxString& aFile ) { m_boardFile = aFile; }
void SetFields( nlohmann::ordered_map<wxString, wxString>& aFields )
{
m_fields = std::move( aFields );
@@ -55,9 +62,12 @@ public:
private:
LIB_ID m_lib_id;
wxString m_schematicFile; ///< File name and path for schematic symbol.
wxString m_schematicFile; ///< File name and path for schematic file.
wxString m_boardFile; ///< File name and path for board file
wxString m_libDescription; ///< File name and path for documentation file.
wxString m_keywords; ///< Search keywords to find footprint in library.
wxString m_keywords; ///< Search keywords to find design block in library.
nlohmann::ordered_map<wxString, wxString> m_fields;
};
#endif
+2
View File
@@ -72,7 +72,9 @@ std::vector<SEARCH_TERM> DESIGN_BLOCK_INFO::GetSearchTerms()
{
std::vector<SEARCH_TERM> terms;
terms.emplace_back( SEARCH_TERM( GetLibNickname(), 4 ) );
terms.emplace_back( SEARCH_TERM( GetName(), 8 ) );
terms.emplace_back( SEARCH_TERM( GetLIB_ID().Format(), 16 ) );
wxStringTokenizer keywordTokenizer( GetKeywords(), wxS( " " ), wxTOKEN_STRTOK );
+2 -5
View File
@@ -21,11 +21,9 @@
#include <design_block_info_impl.h>
#include <design_block.h>
#include <design_block_info.h>
#include <design_block_lib_table.h>
#include <kiway.h>
#include <locale_io.h>
#include <lib_id.h>
#include <progress_reporter.h>
#include <string_utils.h>
#include <thread_pool.h>
@@ -33,7 +31,6 @@
#include <kiplatform/io.h>
#include <wx/textfile.h>
#include <wx/txtstrm.h>
#include <wx/wfstream.h>
@@ -44,7 +41,8 @@ void DESIGN_BLOCK_INFO_IMPL::load()
wxASSERT( dbtable );
const DESIGN_BLOCK* design_block = dbtable->GetEnumeratedDesignBlock( m_nickname, m_dbname );
std::unique_ptr<const DESIGN_BLOCK> design_block( dbtable->GetEnumeratedDesignBlock( m_nickname,
m_dbname ) );
if( design_block )
{
@@ -128,7 +126,6 @@ bool DESIGN_BLOCK_LIST_IMPL::ReadDesignBlockFiles( DESIGN_BLOCK_LIB_TABLE* aTabl
m_queue.push( nickname );
}
if( m_progress_reporter )
{
m_progress_reporter->SetMaxProgress( (int) m_queue.size() );
+76 -23
View File
@@ -74,8 +74,10 @@ DESIGN_BLOCK_IO_MGR::DESIGN_BLOCK_FILE_T
DESIGN_BLOCK_IO_MGR::GuessPluginTypeFromLibPath( const wxString& aLibPath, int aCtl )
{
if( IO_RELEASER<DESIGN_BLOCK_IO>( FindPlugin( KICAD_SEXP ) )->CanReadLibrary( aLibPath )
&& aCtl != KICTL_NONKICAD_ONLY )
&& aCtl != KICTL_NONKICAD_ONLY )
{
return KICAD_SEXP;
}
return DESIGN_BLOCK_IO_MGR::FILE_TYPE_NONE;
}
@@ -265,7 +267,9 @@ void DESIGN_BLOCK_IO::DesignBlockEnumerate( wxArrayString& aDesignBlockNames,
wxDir dir( aLibraryPath );
if( !dir.IsOpened() )
return;
{
THROW_IO_ERROR( wxString::Format( _( "Design block '%s' does not exist." ), aLibraryPath ) );
}
wxString dirname;
wxString fileSpec = wxT( "*." ) + wxString( FILEEXT::KiCadDesignBlockPathExtension );
@@ -287,17 +291,23 @@ DESIGN_BLOCK* DESIGN_BLOCK_IO::DesignBlockLoad( const wxString& aLibraryPath,
+ FILEEXT::KiCadDesignBlockPathExtension + wxFileName::GetPathSeparator();
wxString dbSchPath = dbPath + aDesignBlockName + wxT( "." )
+ FILEEXT::KiCadSchematicFileExtension;
wxString dbPcbPath = dbPath + aDesignBlockName + wxT( "." ) + FILEEXT::KiCadPcbFileExtension;
wxString dbMetadataPath = dbPath + aDesignBlockName + wxT( "." ) + FILEEXT::JsonFileExtension;
if( !wxFileExists( dbSchPath ) )
return nullptr;
if( !wxDir::Exists( dbPath ) )
THROW_IO_ERROR( wxString::Format( _( "Design block '%s' does not exist." ), dbPath ) );
DESIGN_BLOCK* newDB = new DESIGN_BLOCK();
// Library name needs to be empty for when we fill it in with the correct library nickname
// one layer above
newDB->SetLibId( LIB_ID( wxEmptyString, aDesignBlockName ) );
newDB->SetSchematicFile( dbSchPath );
if( wxFileExists( dbSchPath ) )
newDB->SetSchematicFile( dbSchPath );
if( wxFileExists( dbPcbPath ) )
newDB->SetBoardFile( dbPcbPath );
// Parse the JSON file if it exists
if( wxFileExists( dbMetadataPath ) )
@@ -333,16 +343,27 @@ DESIGN_BLOCK* DESIGN_BLOCK_IO::DesignBlockLoad( const wxString& aLibraryPath,
}
catch( ... )
{
delete newDB;
THROW_IO_ERROR( wxString::Format(
_( "Design block metadata file '%s' could not be read." ), dbMetadataPath ) );
}
}
return newDB;
}
bool DESIGN_BLOCK_IO::DesignBlockExists( const wxString& aLibraryPath,
const wxString& aDesignBlockName,
const std::map<std::string, UTF8>* aProperties )
{
wxString dbPath = aLibraryPath + wxFileName::GetPathSeparator() + aDesignBlockName + wxT( "." )
+ FILEEXT::KiCadDesignBlockPathExtension + wxFileName::GetPathSeparator();
return wxDir::Exists( dbPath );
}
void DESIGN_BLOCK_IO::DesignBlockSave( const wxString& aLibraryPath,
const DESIGN_BLOCK* aDesignBlock,
const std::map<std::string, UTF8>* aProperties )
@@ -353,12 +374,23 @@ void DESIGN_BLOCK_IO::DesignBlockSave( const wxString& aLibra
THROW_IO_ERROR( _( "Design block does not have a valid library ID." ) );
}
wxFileName schematicFile( aDesignBlock->GetSchematicFile() );
if( !schematicFile.FileExists() )
if( aDesignBlock->GetSchematicFile().IsEmpty() && aDesignBlock->GetBoardFile().IsEmpty() )
{
THROW_IO_ERROR( wxString::Format( _( "Schematic source file '%s' does not exist." ),
schematicFile.GetFullPath() ) );
THROW_IO_ERROR( _( "Design block does not have a schematic or board file." ) );
}
wxFileName schematicFile( aDesignBlock->GetSchematicFile() );
wxFileName boardFile( aDesignBlock->GetBoardFile() );
if( !aDesignBlock->GetSchematicFile().IsEmpty() && !schematicFile.FileExists() )
{
THROW_IO_ERROR(
wxString::Format( _( "Schematic source file '%s' does not exist." ), schematicFile.GetFullPath() ) );
}
if( !aDesignBlock->GetBoardFile().IsEmpty() && !boardFile.FileExists() )
{
THROW_IO_ERROR( wxString::Format( _( "Board source file '%s' does not exist." ), boardFile.GetFullPath() ) );
}
// Create the design block folder
@@ -376,23 +408,44 @@ void DESIGN_BLOCK_IO::DesignBlockSave( const wxString& aLibra
}
}
// The new schematic file name is based on the design block name, not the source sheet name
wxString dbSchematicFile = dbFolder.GetFullPath() + aDesignBlock->GetLibId().GetLibItemName()
+ wxT( "." ) + FILEEXT::KiCadSchematicFileExtension;
// If the source and destination files are the same, then we don't need to copy the file
// as we are just updating the metadata
if( schematicFile.GetFullPath() != dbSchematicFile )
if( !aDesignBlock->GetSchematicFile().IsEmpty() )
{
// Copy the source sheet file to the design block folder, under the design block name
if( !wxCopyFile( schematicFile.GetFullPath(), dbSchematicFile ) )
// The new schematic file name is based on the design block name, not the source sheet name
wxString dbSchematicFile = dbFolder.GetFullPath() + aDesignBlock->GetLibId().GetLibItemName() + wxT( "." )
+ FILEEXT::KiCadSchematicFileExtension;
// If the source and destination files are the same, then we don't need to copy the file
// as we are just updating the metadata
if( schematicFile.GetFullPath() != dbSchematicFile )
{
THROW_IO_ERROR( wxString::Format(
_( "Schematic file '%s' could not be saved as design block at '%s'." ),
schematicFile.GetFullPath(), dbSchematicFile ) );
// Copy the source sheet file to the design block folder, under the design block name
if( !wxCopyFile( schematicFile.GetFullPath(), dbSchematicFile ) )
{
THROW_IO_ERROR(
wxString::Format( _( "Schematic file '%s' could not be saved as design block at '%s'." ),
schematicFile.GetFullPath(), dbSchematicFile ) );
}
}
}
if( !aDesignBlock->GetBoardFile().IsEmpty() )
{
// The new Board file name is based on the design block name, not the source sheet name
wxString dbBoardFile = dbFolder.GetFullPath() + aDesignBlock->GetLibId().GetLibItemName() + wxT( "." )
+ FILEEXT::KiCadPcbFileExtension;
// If the source and destination files are the same, then we don't need to copy the file
// as we are just updating the metadata
if( boardFile.GetFullPath() != dbBoardFile )
{
// Copy the source sheet file to the design block folder, under the design block name
if( !wxCopyFile( boardFile.GetFullPath(), dbBoardFile ) )
{
THROW_IO_ERROR( wxString::Format( _( "Board file '%s' could not be saved as design block at '%s'." ),
boardFile.GetFullPath(), dbBoardFile ) );
}
}
}
wxString dbMetadataFile = dbFolder.GetFullPath() + aDesignBlock->GetLibId().GetLibItemName()
+ wxT( "." ) + FILEEXT::JsonFileExtension;
+1 -4
View File
@@ -76,10 +76,7 @@ public:
}
bool DesignBlockExists( const wxString& aLibraryPath, const wxString& aDesignBlockName,
const std::map<std::string, UTF8>* aProperties = nullptr )
{
return DesignBlockLoad( aLibraryPath, aDesignBlockName, true, aProperties ) != nullptr;
}
const std::map<std::string, UTF8>* aProperties = nullptr );
DESIGN_BLOCK* ImportDesignBlock( const wxString& aDesignBlockPath,
wxString& aDesignBlockNameOut,
+51 -32
View File
@@ -73,6 +73,23 @@ void DESIGN_BLOCK_LIB_TABLE_ROW::SetType( const wxString& aType )
}
bool DESIGN_BLOCK_LIB_TABLE_ROW::Refresh()
{
if( !plugin )
{
wxArrayString dummyList;
plugin.reset( DESIGN_BLOCK_IO_MGR::FindPlugin( type ) );
SetLoaded( false );
plugin->DesignBlockEnumerate( dummyList, GetFullURI( true ), true, GetProperties() );
SetLoaded( true );
return true;
}
return false;
}
DESIGN_BLOCK_LIB_TABLE::DESIGN_BLOCK_LIB_TABLE( DESIGN_BLOCK_LIB_TABLE* aFallBackTable ) :
LIB_TABLE( aFallBackTable )
{
@@ -205,7 +222,8 @@ void DESIGN_BLOCK_LIB_TABLE::Parse( LIB_TABLE_LEXER* in )
row->SetVisible();
break;
default: in->Unexpected( tok );
default:
in->Unexpected( tok );
}
in->NeedRIGHT();
@@ -253,7 +271,9 @@ bool DESIGN_BLOCK_LIB_TABLE::operator==( const DESIGN_BLOCK_LIB_TABLE& aDesignBl
{
if( (DESIGN_BLOCK_LIB_TABLE_ROW&) m_rows[i]
!= (DESIGN_BLOCK_LIB_TABLE_ROW&) aDesignBlockTable.m_rows[i] )
{
return false;
}
}
return true;
@@ -268,8 +288,8 @@ void DESIGN_BLOCK_LIB_TABLE::Format( OUTPUTFORMATTER* aOutput, int aIndentLevel
aOutput->Print( aIndentLevel, "(design_block_lib_table\n" );
aOutput->Print( aIndentLevel + 1, "(version %d)\n", m_version );
for( LIB_TABLE_ROWS_CITER it = m_rows.begin(); it != m_rows.end(); ++it )
it->Format( aOutput, aIndentLevel + 1 );
for( const LIB_TABLE_ROW& row : m_rows)
row.Format( aOutput, aIndentLevel + 1 );
aOutput->Print( aIndentLevel, ")\n" );
}
@@ -330,9 +350,9 @@ const DESIGN_BLOCK_LIB_TABLE_ROW* DESIGN_BLOCK_LIB_TABLE::FindRow( const wxStrin
if( !row )
{
wxString msg = wxString::Format(
_( "design-block-lib-table files contain no library named '%s'." ), aNickname );
THROW_IO_ERROR( msg );
THROW_IO_ERROR( wxString::Format( _( "design-block-lib-table files contain no library "
"named '%s'." ),
aNickname ) );
}
if( !row->plugin )
@@ -430,7 +450,7 @@ DESIGN_BLOCK_LIB_TABLE::DesignBlockSave( const wxString& aNickname,
std::unique_ptr<DESIGN_BLOCK> design_block( row->plugin->DesignBlockLoad(
row->GetFullURI( true ), DesignBlockname, row->GetProperties() ) );
if( design_block.get() )
if( design_block )
return SAVE_SKIPPED;
}
@@ -490,14 +510,12 @@ DESIGN_BLOCK_LIB_TABLE::DesignBlockLoadWithOptionalNickname( const LIB_ID& aDesi
// nickname is empty, sequentially search (alphabetically) all libs/nicks for first match:
else
{
std::vector<wxString> nicks = GetLogicalLibs();
// Search each library going through libraries alphabetically.
for( unsigned i = 0; i < nicks.size(); ++i )
for( const wxString& library : GetLogicalLibs() )
{
// DesignBlockLoad() returns NULL on not found, does not throw exception
// unless there's an IO_ERROR.
DESIGN_BLOCK* ret = DesignBlockLoad( nicks[i], DesignBlockname, aKeepUUID );
DESIGN_BLOCK* ret = DesignBlockLoad( library, DesignBlockname, aKeepUUID );
if( ret )
return ret;
@@ -520,7 +538,8 @@ public:
explicit PCM_DESIGN_BLOCK_LIB_TRAVERSER( const wxString& aPath, DESIGN_BLOCK_LIB_TABLE& aTable,
const wxString& aPrefix ) :
m_lib_table( aTable ),
m_path_prefix( aPath ), m_lib_prefix( aPrefix )
m_path_prefix( aPath ),
m_lib_prefix( aPrefix )
{
wxFileName f( aPath, wxS( "" ) );
m_prefix_dir_count = f.GetDirCount();
@@ -535,12 +554,11 @@ public:
// consider a directory to be a lib if it's name ends with the design block lib dir
// extension it is under $KICADn_3RD_PARTY/design_blocks/<pkgid>/ i.e. has nested
// level of at least +3.
if( dirPath.EndsWith( wxString::Format( wxS( ".%s" ),
FILEEXT::KiCadDesignBlockLibPathExtension ) )
if( dirPath.EndsWith( wxString::Format( wxS( ".%s" ), FILEEXT::KiCadDesignBlockLibPathExtension ) )
&& dir.GetDirCount() >= m_prefix_dir_count + 3 )
{
wxString versionedPath = wxString::Format(
wxS( "${%s}" ), ENV_VAR::GetVersionedEnvVarName( wxS( "3RD_PARTY" ) ) );
wxString versionedPath;
versionedPath.Printf( wxS( "${%s}" ), ENV_VAR::GetVersionedEnvVarName( wxS( "3RD_PARTY" ) ) );
wxArrayString parts = dir.GetDirs();
parts.RemoveAt( 0, m_prefix_dir_count );
@@ -551,22 +569,27 @@ public:
if( !m_lib_table.HasLibraryWithPath( libPath ) )
{
wxString name = parts.Last().substr( 0, parts.Last().length() - 7 );
wxString nickname = wxString::Format( wxS( "%s%s" ), m_lib_prefix, name );
wxString nickname;
nickname.Printf( wxS( "%s%s" ),
m_lib_prefix,
name );
if( m_lib_table.HasLibrary( nickname ) )
{
int increment = 1;
do
{
nickname =
wxString::Format( wxS( "%s%s_%d" ), m_lib_prefix, name, increment );
increment++;
nickname.Printf( wxS( "%s%s_%d" ),
m_lib_prefix,
name,
increment++ );
} while( m_lib_table.HasLibrary( nickname ) );
}
m_lib_table.InsertRow( new DESIGN_BLOCK_LIB_TABLE_ROW(
nickname, libPath, wxT( "KiCad" ), wxEmptyString,
_( "Added by Plugin and Content Manager" ) ) );
m_lib_table.InsertRow( new DESIGN_BLOCK_LIB_TABLE_ROW( nickname, libPath, wxT( "KiCad" ),
wxEmptyString,
_( "Added by Plugin and Content Manager" ) ) );
}
}
@@ -603,8 +626,7 @@ bool DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable( DESIGN_BLOCK_LIB_TABLE& aTable )
SystemDirsAppend( &ss );
const ENV_VAR_MAP& envVars = Pgm().GetLocalEnvVariables();
std::optional<wxString> v =
ENV_VAR::GetVersionedEnvVarValue( envVars, wxT( "TEMPLATE_DIR" ) );
std::optional<wxString> v = ENV_VAR::GetVersionedEnvVarValue( envVars, wxT( "TEMPLATE_DIR" ) );
if( v && !v->IsEmpty() )
ss.AddPaths( *v, 0 );
@@ -623,16 +645,14 @@ bool DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable( DESIGN_BLOCK_LIB_TABLE& aTable )
aTable.clear();
aTable.Load( fn.GetFullPath() );
SETTINGS_MANAGER& mgr = Pgm().GetSettingsManager();
KICAD_SETTINGS* settings = mgr.GetAppSettings<KICAD_SETTINGS>( "kicad" );
KICAD_SETTINGS* cfg = GetAppSettings<KICAD_SETTINGS>( "kicad" );
const ENV_VAR_MAP& env = Pgm().GetLocalEnvVariables();
wxString packagesPath;
if( std::optional<wxString> v = ENV_VAR::GetVersionedEnvVarValue( env, wxT( "3RD_PARTY" ) ) )
packagesPath = *v;
if( settings->m_PcmLibAutoAdd )
if( cfg && cfg->m_PcmLibAutoAdd )
{
// Scan for libraries in PCM packages directory
@@ -641,15 +661,14 @@ bool DESIGN_BLOCK_LIB_TABLE::LoadGlobalTable( DESIGN_BLOCK_LIB_TABLE& aTable )
if( d.DirExists() )
{
PCM_DESIGN_BLOCK_LIB_TRAVERSER traverser( packagesPath, aTable,
settings->m_PcmLibPrefix );
PCM_DESIGN_BLOCK_LIB_TRAVERSER traverser( packagesPath, aTable, cfg->m_PcmLibPrefix );
wxDir dir( d.GetPath() );
dir.Traverse( traverser );
}
}
if( settings->m_PcmLibAutoRemove )
if( cfg && cfg->m_PcmLibAutoRemove )
{
// Remove PCM libraries that no longer exist
std::vector<wxString> to_remove;
@@ -25,30 +25,32 @@
#include <project/project_file.h>
#include <wx/log.h>
#include <wx/tokenzr.h>
#include <settings/app_settings.h>
#include <string_utils.h>
#include <eda_pattern_match.h>
#include <design_block.h>
#include <design_block_lib_table.h>
#include <design_block_info.h>
#include <design_block_tree_model_adapter.h>
#include <tools/sch_design_block_control.h>
wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>
DESIGN_BLOCK_TREE_MODEL_ADAPTER::Create( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings )
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool )
{
auto* adapter = new DESIGN_BLOCK_TREE_MODEL_ADAPTER( aParent, aLibs, aSettings );
adapter->m_frame = aParent;
auto* adapter = new DESIGN_BLOCK_TREE_MODEL_ADAPTER( aParent, aLibs, aSettings, aContextMenuTool );
return wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>( adapter );
}
DESIGN_BLOCK_TREE_MODEL_ADAPTER::DESIGN_BLOCK_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent,
LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings ) :
LIB_TREE_MODEL_ADAPTER( aParent, wxT( "pinned_design_block_libs" ), aSettings ),
DESIGN_BLOCK_TREE_MODEL_ADAPTER::DESIGN_BLOCK_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool ) :
LIB_TREE_MODEL_ADAPTER( aParent, wxT( "pinned_design_block_libs" ),
Kiface().KifaceSettings()->m_DesignBlockChooserPanel.tree ),
m_libs( (DESIGN_BLOCK_LIB_TABLE*) aLibs ),
m_frame( aParent )
m_frame( aParent ),
m_contextMenuTool( aContextMenuTool )
{
}
@@ -74,8 +76,7 @@ void DESIGN_BLOCK_TREE_MODEL_ADAPTER::AddLibraries( EDA_BASE_FRAME* aParent )
bool pinned = alg::contains( cfg->m_Session.pinned_design_block_libs, libName )
|| alg::contains( project.m_PinnedDesignBlockLibs, libName );
DoAddLibrary( libName, library->GetDescr(), getDesignBlocks( aParent, libName ), pinned,
true );
DoAddLibrary( libName, library->GetDescr(), getDesignBlocks( aParent, libName ), pinned, true );
}
m_tree.AssignIntrinsicRanks();
@@ -88,23 +89,20 @@ void DESIGN_BLOCK_TREE_MODEL_ADAPTER::ClearLibraries()
}
std::vector<LIB_TREE_ITEM*>
DESIGN_BLOCK_TREE_MODEL_ADAPTER::getDesignBlocks( EDA_BASE_FRAME* aParent,
const wxString& aLibName )
std::vector<LIB_TREE_ITEM*> DESIGN_BLOCK_TREE_MODEL_ADAPTER::getDesignBlocks( EDA_BASE_FRAME* aParent,
const wxString& aLibName )
{
std::vector<LIB_TREE_ITEM*> libList;
auto fullListStart = DESIGN_BLOCK_LIB_TABLE::GetGlobalList().GetList().begin();
auto fullListEnd = DESIGN_BLOCK_LIB_TABLE::GetGlobalList().GetList().end();
std::unique_ptr<DESIGN_BLOCK_INFO> dummy =
std::make_unique<DESIGN_BLOCK_INFO_IMPL>( aLibName, wxEmptyString );
std::unique_ptr<DESIGN_BLOCK_INFO> dummy = std::make_unique<DESIGN_BLOCK_INFO_IMPL>( aLibName, wxEmptyString );
// List is sorted, so use a binary search to find the range of footnotes for our library
auto libBounds = std::equal_range(
fullListStart, fullListEnd, dummy,
[]( const std::unique_ptr<DESIGN_BLOCK_INFO>& a,
const std::unique_ptr<DESIGN_BLOCK_INFO>& b )
[]( const std::unique_ptr<DESIGN_BLOCK_INFO>& a, const std::unique_ptr<DESIGN_BLOCK_INFO>& b )
{
return StrNumCmp( a->GetLibNickname(), b->GetLibNickname(), false ) < 0;
} );
@@ -148,8 +146,7 @@ wxString DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo( LIB_ID const& aLibId, in
catch( const IO_ERROR& ioe )
{
wxLogError( _( "Error loading design block %s from library '%s'." ) + wxS( "\n%s" ),
aLibId.GetLibItemName().wx_str(), aLibId.GetLibNickname().wx_str(),
ioe.What() );
aLibId.GetLibItemName().wx_str(), aLibId.GetLibNickname().wx_str(), ioe.What() );
return wxEmptyString;
}
@@ -193,6 +190,9 @@ wxString DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo( LIB_ID const& aLibId, in
}
html.Replace( "__FIELDS__", fieldTable );
// Design blocks (unlike symbols and footprints) are not cached. We own the pointer.
delete db;
}
else
{
@@ -206,5 +206,5 @@ wxString DESIGN_BLOCK_TREE_MODEL_ADAPTER::GenerateInfo( LIB_ID const& aLibId, in
TOOL_INTERACTIVE* DESIGN_BLOCK_TREE_MODEL_ADAPTER::GetContextMenuTool()
{
return m_frame->GetToolManager()->GetTool<SCH_DESIGN_BLOCK_CONTROL>();
return m_contextMenuTool;
}
@@ -33,9 +33,9 @@ public:
*
* @param aLibs library set from which parts will be loaded
*/
static wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> Create( EDA_BASE_FRAME* aParent,
LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings );
static wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> Create( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool );
void AddLibraries( EDA_BASE_FRAME* aParent );
void ClearLibraries();
@@ -51,16 +51,17 @@ protected:
* Constructor; takes a set of libraries to be included in the search.
*/
DESIGN_BLOCK_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs,
APP_SETTINGS_BASE::LIB_TREE& aSettings );
APP_SETTINGS_BASE::LIB_TREE& aSettings,
TOOL_INTERACTIVE* aContextMenuTool );
std::vector<LIB_TREE_ITEM*> getDesignBlocks( EDA_BASE_FRAME* aParent,
const wxString& aLibName );
std::vector<LIB_TREE_ITEM*> getDesignBlocks( EDA_BASE_FRAME* aParent, const wxString& aLibName );
PROJECT::LIB_TYPE_T getLibType() override { return PROJECT::LIB_TYPE_T::DESIGN_BLOCK_LIB; }
protected:
DESIGN_BLOCK_LIB_TABLE* m_libs;
EDA_BASE_FRAME* m_frame;
TOOL_INTERACTIVE* m_contextMenuTool;
};
#endif // DESIGN_BLOCK_TREE_MODEL_ADAPTER_H
+1
View File
@@ -622,6 +622,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
ADD_DEV( wxT( "Nick Østergaard" ), CONTRIB_DEV );
ADD_DEV( wxT( "木 王" ), CONTRIB_DEV );
ADD_DEV( wxT( "wh201906" ), CONTRIB_DEV );
// The document writers
#define DOC_TEAM _( "Documentation Team" )
+64 -63
View File
@@ -23,6 +23,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <app_monitor.h>
#include <dialog_shim.h>
#include <core/ignore.h>
#include <kiway_player.h>
@@ -42,43 +43,6 @@
#include <algorithm>
/// Toggle a window's "enable" status to disabled, then enabled on destruction.
class WDO_ENABLE_DISABLE
{
wxWindow* m_win;
public:
WDO_ENABLE_DISABLE( wxWindow* aWindow ) :
m_win( aWindow )
{
if( m_win )
m_win->Disable();
}
~WDO_ENABLE_DISABLE()
{
if( m_win )
{
m_win->Enable();
m_win->Raise(); // let's focus back on the parent window
}
}
void SuspendForTrueModal()
{
if( m_win )
m_win->Enable();
}
void ResumeAfterTrueModal()
{
if( m_win )
m_win->Disable();
}
};
BEGIN_EVENT_TABLE( DIALOG_SHIM, wxDialog )
EVT_CHAR_HOOK( DIALOG_SHIM::OnCharHook )
END_EVENT_TABLE()
@@ -87,17 +51,17 @@ END_EVENT_TABLE()
DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& title,
const wxPoint& pos, const wxSize& size, long style,
const wxString& name ) :
wxDialog( aParent, id, title, pos, size, style, name ),
KIWAY_HOLDER( nullptr, KIWAY_HOLDER::DIALOG ),
m_units( EDA_UNITS::MILLIMETRES ),
m_useCalculatedSize( false ),
m_firstPaintEvent( true ),
m_initialFocusTarget( nullptr ),
m_isClosing( false ),
m_qmodal_loop( nullptr ),
m_qmodal_showing( false ),
m_qmodal_parent_disabler( nullptr ),
m_parentFrame( nullptr )
wxDialog( aParent, id, title, pos, size, style, name ),
KIWAY_HOLDER( nullptr, KIWAY_HOLDER::DIALOG ),
m_units( EDA_UNITS::MM ),
m_useCalculatedSize( false ),
m_firstPaintEvent( true ),
m_initialFocusTarget( nullptr ),
m_isClosing( false ),
m_qmodal_loop( nullptr ),
m_qmodal_showing( false ),
m_qmodal_parent_disabler( nullptr ),
m_parentFrame( nullptr )
{
KIWAY_HOLDER* kiwayHolder = nullptr;
m_initialSize = size;
@@ -148,6 +112,9 @@ DIALOG_SHIM::DIALOG_SHIM( wxWindow* aParent, wxWindowID id, const wxString& titl
#endif
Bind( wxEVT_PAINT, &DIALOG_SHIM::OnPaint, this );
wxString msg = wxString::Format( "Opening dialog %s", GetTitle() );
APP_MONITOR::AddNavigationBreadcrumb( msg, "dialog.open" );
}
@@ -521,15 +488,7 @@ int DIALOG_SHIM::ShowModal()
int DIALOG_SHIM::ShowQuasiModal()
{
// This is an exception safe way to zero a pointer before returning.
// Yes, even though DismissModal() clears this first normally, this is
// here in case there's an exception before the dialog is dismissed.
struct NULLER
{
void*& m_what;
NULLER( void*& aPtr ) : m_what( aPtr ) {}
~NULLER() { m_what = nullptr; } // indeed, set it to NULL on destruction
} clear_this( (void*&) m_qmodal_loop );
NULLER raii_nuller( (void*&) m_qmodal_loop );
// release the mouse if it's currently captured as the window having it
// will be disabled when this dialog is shown -- but will still keep the
@@ -545,7 +504,7 @@ int DIALOG_SHIM::ShowQuasiModal()
"window?" ) );
// quasi-modal: disable only my "optimal" parent
m_qmodal_parent_disabler = new WDO_ENABLE_DISABLE( parent );
m_qmodal_parent_disabler = new WINDOW_DISABLER( parent );
// Apple in its infinite wisdom will raise a disabled window before even passing
// us the event, so we have no way to stop it. Instead, we must set an order on
@@ -610,8 +569,6 @@ void DIALOG_SHIM::EndQuasiModal( int retCode )
m_qmodal_loop->Exit( 0 );
else
m_qmodal_loop->ScheduleExit( 0 );
m_qmodal_loop = nullptr;
}
delete m_qmodal_parent_disabler;
@@ -623,6 +580,9 @@ void DIALOG_SHIM::EndQuasiModal( int retCode )
void DIALOG_SHIM::OnCloseWindow( wxCloseEvent& aEvent )
{
wxString msg = wxString::Format( "Closing dialog %s", GetTitle() );
APP_MONITOR::AddNavigationBreadcrumb( msg, "dialog.close" );
if( IsQuasiModal() )
{
EndQuasiModal( wxID_CANCEL );
@@ -698,9 +658,50 @@ void DIALOG_SHIM::OnCharHook( wxKeyEvent& aEvt )
return;
}
}
// shift-return (Mac default) or Ctrl-Return (GTK) for OK
else if( ( aEvt.GetKeyCode() == WXK_RETURN || aEvt.GetKeyCode() == WXK_NUMPAD_ENTER )
&& ( aEvt.ShiftDown() || aEvt.ControlDown() ) )
// shift-return (Mac default) or Ctrl-Return (GTK) for new line input
else if( ( aEvt.GetKeyCode() == WXK_RETURN || aEvt.GetKeyCode() == WXK_NUMPAD_ENTER ) && aEvt.ShiftDown() )
{
wxObject* eventSource = aEvt.GetEventObject();
if( wxTextCtrl* textCtrl = dynamic_cast<wxTextCtrl*>( eventSource ) )
{
// If the text control is not multi-line, we want to close the dialog
if( !textCtrl->IsMultiLine() )
{
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
return;
}
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
wxString eol = "\r\n";
#else
wxString eol = "\n";
#endif
long pos = textCtrl->GetInsertionPoint();
textCtrl->WriteText( eol );
textCtrl->SetInsertionPoint( pos + eol.length() );
return;
}
else if( wxStyledTextCtrl* scintilla = dynamic_cast<wxStyledTextCtrl*>( eventSource ) )
{
wxString eol = "\n";
switch( scintilla->GetEOLMode() )
{
case wxSTC_EOL_CRLF: eol = "\r\n"; break;
case wxSTC_EOL_CR: eol = "\r"; break;
case wxSTC_EOL_LF: eol = "\n"; break;
}
long pos = scintilla->GetCurrentPos();
scintilla->InsertText( pos, eol );
scintilla->GotoPos( pos + eol.length() );
return;
}
return;
}
// command-return (Mac default) or Ctrl-Return (GTK) for OK
else if( ( aEvt.GetKeyCode() == WXK_RETURN || aEvt.GetKeyCode() == WXK_NUMPAD_ENTER ) && aEvt.ControlDown() )
{
wxPostEvent( this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
return;
+4 -2
View File
@@ -423,8 +423,9 @@ void DIALOG_COLOR_PICKER::drawRGBPalette()
// Use Y axis from bottom to top and origin to center
bitmapDC.SetAxisOrientation( true, true );
#if defined( __WXMSW__ )
#if defined( __WXMSW__ ) && !wxCHECK_VERSION( 3, 3, 0 )
// For some reason, SetDeviceOrigin has changed in wxWidgets 3.1.6 or 3.1.7
// It was fixed in wx >= 3.3
bitmapDC.SetDeviceOrigin( half_size, -half_size );
#else
bitmapDC.SetDeviceOrigin( half_size, half_size );
@@ -496,8 +497,9 @@ void DIALOG_COLOR_PICKER::drawHSVPalette()
// Use Y axis from bottom to top and origin to center
bitmapDC.SetAxisOrientation( true, true );
#if defined( __WXMSW__)
#if defined( __WXMSW__ ) && !wxCHECK_VERSION(3,3,0)
// For some reason, SetDeviceOrigin has changed in wxWidgets 3.1.6 or 3.1.7
// It was fixed in wx >= 3.3
bitmapDC.SetDeviceOrigin( half_size, -half_size );
#else
bitmapDC.SetDeviceOrigin( half_size, half_size );
@@ -82,9 +82,6 @@ DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS( wxWindow* aParent ) :
attr->SetEditor( new GRID_CELL_PATH_EDITOR( this, m_EnvVars, &m_curdir, wxEmptyString ) );
m_EnvVars->SetColAttr( TV_VALUE_COL, attr );
// Give a bit more room for combobox editors
m_EnvVars->SetDefaultRowSize( m_EnvVars->GetDefaultRowSize() + FromDIP( 4 ) );
m_EnvVars->PushEventHandler( new GRID_TRICKS( m_EnvVars,
[this]( wxCommandEvent& aEvent )
{

Some files were not shown because too many files have changed in this diff Show More