7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-11 16:50:09 +00:00
Commit Graph

160 Commits

Author SHA1 Message Date
Jeff Young
0a4533703c Performance. 2025-03-24 10:28:41 +00:00
John Beard
14cbce5d0f Pcbnew: fix bad layer maths in stackup dialog
F_Cu | B_Cu is not the same as LSET( F_Cu ) | LSET( B_Cu),
so you cannot do some_lset |= F_Cu | B_Cu (or rather you can, but
it is not what you expect).

F_Cu and B_Cu are just ints, so 0 | 2 == 2. This isn't the
same as setting *bit indices* 0 and 2. OR-ing with 2 is setting
bit index 1, which is F_Mask.

You can set them one by one with lset.set( F_Cu ) or OR with
LSET::ExternalCuMask() helper. But actually, we're trying to set all 'n'
copper layers, and LSET has AllCuMask and we can save all the hassle
in this function.

Thanks to @aris-kimi for finding the problematic code lines and
providing the foundation of this fix.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19855
2025-02-06 13:00:33 +08:00
Seth Hillbrand
6c2a559cbe Set base user layer count
Default colors cycle through repetition for unknown layers.  Allows
importing from complex Altium/CADSTAR boards with more than 10
documentation layers
2025-01-28 12:22:39 -08:00
Jon Evans
7db75e4f50 API: expand board stackup serialization 2025-01-04 15:15:51 -05:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Jeff Young
6686ade45b Remove (somewhat atrophied) manual pretty printing.
Also fixes a bug where the pretty printer didn't insert
linebreaks for a forest (it assumed a single tree root).

Also further regularises bool and quote formatting.
2024-11-28 11:08:16 +00:00
Seth Hillbrand
10e1ba9c6b Fix layer ordering issue in net inspector
B_Cu is always the last layer, so if we are incrementing, we need to
check for matches, not index comparison

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18933
2024-10-18 11:45:07 -07:00
John Beard
3d6d8b9946 Strip richio.h from headers that don't need them
Like the DSNLEXER header, this has visibility in over 700
files, whereas well under half actually use any of it
(quite a bit, but not all, of it actually via DSNLEXER)

Many places already forward-declare the OUTPUTFORMATTER type,
by doing that for the others, it still possible to use the
non-IO methods without having to see richio.h.
2024-10-04 18:06:18 +01:00
jean-pierre charras
024ab7afc7 PANEL_SETUP_BOARD_STACKUP: fix issue when changing copper layer count.
The code is now updated after layer renumbering.
2024-09-22 15:19:28 +02:00
Seth Hillbrand
f3b51b8fbf Fix layer display in stackup dialog panel
The layers need to iterate using the copper iterator, not incrementing
integers
2024-09-10 09:06:55 -07:00
John Beard
d933ed964e Move LAYER_PRESENTATION to widgets/
Since this is code used by widgets for UI presentation purposes.

Also saves some unnexessary includes in headers.
2024-08-07 06:49:53 +08:00
John Beard
db457f52fa Move layer presentation logic to a separate class
The separates it from the LAYER_SELECTOR class - deciding
what color a layer is (say) is separate to managing the
actual selection of the layer. For example, sel_layer.cpp
only needs the presentation logic. This also makes it eaiser
to compose rather than inherit.

Additonally, break out the layer pair swatch function
to this class.

This will also be needed by the layer pair manager UI.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/15227
2024-08-06 23:45:55 +08:00
Seth Hillbrand
e0453d9bcc Further cleanup of LSET
Remove duplicative functions.  Standardize on C++ stdlib formatting
2024-07-08 22:00:53 -07:00
Seth Hillbrand
cc850d0da0 Split out LSEQ/LSET from LAYER_ID
Separate the layer grouping classes for easier modification
2024-07-08 20:59:46 -07:00
Jon Evans
896f56772f Fix warnings 2024-06-11 22:01:06 -04:00
Alex Shvartzkop
d451d2f548 Make board stackup page usable on hidpi. 2024-05-27 01:44:42 +03:00
Jeff Young
032b5a6d65 Fetch board finish before exporting stackup to clipboard.
Also fixes some backward logic in setting modified flag.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17089
2024-05-23 18:30:58 +01:00
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Ian McInerney
2fc96c1d11 Ensure stackup material returned is correct after list item deletion 2024-02-03 18:06:40 +00:00
Ian McInerney
dc6fb73b40 Fix mistake in 7edda82b where any key could delete the material 2024-02-03 17:01:57 +00:00
Ian McInerney
7edda82b2a Hook up delete key in stackup materials list box
Allow the delete key to delete a material from the stackup list, since
otherwise there is no way to delete materials from the list.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16854
2024-02-03 16:39:56 +00:00
Jon Evans
a377fa4201 Add some missing deep comparisions for BOARD_STACKUP 2024-01-25 09:08:27 -05:00
Jon Evans
b8aef58561 Add proper comparison operators for BOARD_DESIGN_SETTINGS and children
BOARD::operator== was just comparing pointers
2024-01-01 13:37:31 -05:00
Jeff Young
c051e66830 Handle units switch in board stackup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16361
2023-12-24 16:18:46 +00:00
Jeff Young
8251fca66a performance efficiencies 2023-12-18 17:39:29 +00:00
Jeff Young
609dedda3c Insert lazily-created-rows at right position in grid sizer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15652
2023-10-02 11:12:18 +01:00
jean-pierre charras
0a26ab1cae PANEL_SETUP_BOARD_STACKUP: save the m_HasDielectricConstrains BOARD_STACKUP member.
This member was not saved in the board stackup data.
Fixes 
https://gitlab.com/kicad/code/kicad/-/issues/15690
2023-09-19 17:47:29 +02:00
jean-pierre charras
abcd753bd3 PANEL_SETUP_BOARD_STACKUP: do not try to init params managed by PANEL_SETUP_BOARD_FINISH
Fixes 
https://gitlab.com/kicad/code/kicad/-/issues/15288
2023-07-29 09:43:32 +02:00
Jeff Young
9481a218c7 Lazy loading of stackup UI widgets. 2023-05-11 14:37:48 +01:00
Jeff Young
03c9b1c202 Move remainder of Board Setup to lazy loading. 2023-05-11 11:43:10 +01:00
jean-pierre charras
1406341d2d Fix a few doxygen errors (no actual code change) 2023-04-19 16:20:24 +02:00
Jon Evans
e2353a2849 PANEL_BOARD_STACKUP: Ensure UI is re-linked to storage when importing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13835
2023-02-10 12:58:04 -05:00
Jeff Young
3af9c658e6 Don't specify fonts in wxFormBuilder. It only leads to pain.
Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-18 12:28:07 +00:00
Jon Evans
595bf70d5d Do not try to read from UI elements that haven't been initialized yet
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13480
2023-01-12 09:16:22 -05:00
jean-pierre charras
1500e3bb80 Pcbnew, minor fix: do not write twice the dielectric color in stackup section in broad file. 2023-01-11 17:45:00 +01:00
Jeff Young
30c9deb9d5 Flat(er) look for paged dialogs. 2023-01-11 01:11:25 +00:00
Wayne Stambaugh
c3ded7a03d Remove board editor standard dialog button static line separators. 2023-01-09 08:49:38 -05:00
jean-pierre charras
593dc9e8b6 Some fixes in Gerber job file:
- Ensure colors use a normalized value (normalized name or RnnGnnBnn notation).
- Better code.
2022-12-06 17:01:37 +01:00
jean-pierre charras
c3dddaf41f panel_board_finish: mark board as modified when a finishing parameter is modified.
Fixes 
https://gitlab.com/kicad/code/kicad/issues/13074
2022-12-05 18:39:18 +01:00
jean-pierre charras
d7368588db stackup manager: fix incorrect handling of colors for multi-layer dielectrics
The dialog allows a color selection for each dielectric layer.
However for a "dielectric" defined by more than one layer, the color was handled
only for the first layer, and not for the other sub-layers.
2022-12-01 16:19:13 +01:00
jean-pierre charras
6aa515e2f8 board_stackup_manager: fix incorrect behavior when adding a new dielectric layer.
Fixes 
https://gitlab.com/kicad/code/kicad/issues/12680
2022-10-20 11:27:35 +02:00
Jeff Young
631980b0ab We were saving the old board pointer, but not updating the current one.
This also makes a few other adjustments to order and to where we look
for the enabled layers which should make it more robust.

Fixes https://gitlab.com/kicad/code/kicad/issues/10925
2022-10-16 18:39:37 +01:00
Jeff Young
19d270fe74 Text size sanity checking for TEXT_ITEMS_GRID.
Oh dear, there was a bunch going on here.  Firstly the move from int
to long long int for ValueFromString() means that we were no longer
catching overflows (as we were C-style casting it back to int in many
places).  But even when the overflow is caught, it would run in to
wxWidgets' empty string bug while trying to log it.

Fixes https://gitlab.com/kicad/code/kicad/issues/12577
2022-10-06 13:19:08 +01:00
Jonathan Haas
6b15231f4b Add code to set better default layer widths.
This affects both the layer count dropdown and the "Adjust dielectric thickness" button. Changing layer widths will now maintain the same total board width and set layer widths to common manufacturer values. Layer widths can be locked (as before) to keep any manually defined values.
2022-09-27 21:24:48 +00:00
Jeff Young
45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Marek Roszko
ece23d434b Split up Double2Str to a format function to make its use case clear 2022-09-17 00:10:22 -04:00
Marek Roszko
3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko
a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Mark Roszko
b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
aris-kimi
4efa13a3e3 Change Loss Tg to Loss Tan.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10699
2022-09-08 16:17:32 +00:00