92 Commits

Author SHA1 Message Date
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
1d45de0d1d Performance.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20506
2025-04-09 18:21:15 +01: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 a1a710dfedec27514a089d2294e8ab516a1ce2d6)
2025-04-04 22:49:05 +03: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
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
Ian McInerney
59a4cc2e4b Default to 4 user defined layers 2025-02-02 23:09:08 +00: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
Wayne Stambaugh
f161d94521 Common folder housekeeping part 2. 2025-01-14 15:25:05 -05:00
Ian McInerney
43a7868994 Fix reading old plot layer settings into new layer IDs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19475
2025-01-04 21:38:37 +00: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
Seth Hillbrand
c2bfdaa6ae Allow SWIG access to lset
SWIG doesn't like initializer lists because they are compile-time
objects

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19326
2024-12-19 12:13:11 -08:00
Jon Evans
603c793f7e Fix off-by-one in LSET::Flip
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19265
2024-12-08 08:26:40 -05:00
Jon Evans
71a0a638a0 Remove unused pad layers and simplify pad colors 2024-11-16 11:27:20 -05:00
Seth Hillbrand
0d9f49ee2e Fix QA with LSET::Flip() 2024-11-15 22:21:31 -06:00
Seth Hillbrand
661759a2d9 Fix bug in flip calculation
Layer count needs to respect PEMDAS.  Causes oob otherwise
2024-11-15 20:19:05 -06:00
Fabien Corona
346e3f4d7c formatting 2024-10-23 19:18:48 +02:00
Fabien Corona
07a0c980f3 DRC : Show paths for clearance and creepage 2024-10-21 15:56:12 +00:00
Marek Roszko
d74caace0a Initial jobset creation and running within the CLI and GUI.
Incomplete, just pushing this before feature freeze, much fixing left
2024-09-30 20:04:53 -04:00
Mike Williams
867cb58175 feature removal: remove Show Hidden Text
Does not work properly since 8.0 introduction of footprint fields.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18656
2024-09-19 15:41:44 -04:00
Jon Evans
8647da613f Fix typo'd comparison in 4e7fcb3b 2024-09-18 18:37:32 -04:00
Jon Evans
4e7fcb3b67 Temporary patches around LSET and negative layers
Probably this should be replaced with a less error-prone
approach.  Right now the LSET -> BASE_SET system is risky
because it is converting a signed enum (PCB_LAYER_ID) to
a size_t in all the underlying operations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18738
2024-09-18 18:36:17 -04:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
Seth Hillbrand
69849ba3ca Replace custom Clamp with std::clamp
Fixes bug in parser that had the elements in the wrong order due to our
custom version not matching the standard order
2024-07-25 19:17:17 +02:00
Alex Shvartzkop
e2bd76bdce Fix OOB access in LSET when opening a PCB file or updating from schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18422
2024-07-23 01:41:01 +03:00
Seth Hillbrand
5db4d10c86 Add some LSET QA 2024-07-16 18:11:29 -07:00
Alex Shvartzkop
77eb197a21 Fix build on GCC 14.1.1. 2024-07-15 13:38:34 +03: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
Seth Hillbrand
293075426b Clean up some LSEQ functions
We are derived from std::vector now.  We don't need our own prima donna
increment and dereference overload as these just create bloat and
non-standard coding practices
2024-07-08 20:59:46 -07:00
Jon Evans
c70ef36739 ADDED: Opacity control for filled graphic shapes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18253
2024-06-26 22:29:58 -04:00
Wayne Stambaugh
5fa274ead0 Add board layer view stack up sequence from front layer to back layer.
The old bottom to top layer stack up sequence from back to front layer was
only used for plotting so it was renamed appropriately.  This will be used
for future board object select disambiguation improvements.
2023-12-11 15:07:58 -05:00
Jon Evans
0b136ae0df CLI: Allow controlling layer order for multilayer plots 2023-10-11 00:18:58 +00:00
Jeff Young
c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
Jeff Young
f480cbf93f Treat internal copper layers as side-specific.
Fixes https://gitlab.com/kicad/code/kicad/issues/12726
2022-10-25 12:08:57 +01:00
Jeff Young
4778122aa0 Flip anything on a side-specific layer, rather than physical layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/12726
2022-10-24 16:54:33 +01:00
Jeff Young
9523586bf1 Remove atrophied PCB NO_CONNECTS layer and its colour.
Fixes https://gitlab.com/kicad/code/kicad/issues/12316
2022-09-08 00:28:31 +01:00
jean-pierre charras
57e59a4959 Pcbnew, on line DRC when moving footprints: add visible collisions between courtyards 2022-05-20 12:58:05 +02:00
Wayne Stambaugh
c0d8657d97 Plot on all layers prep work.
We only need one bottom to top layer sequence definition.

Plot a sequence of layer IDs (LSEQ) in the order of the sequence.

Add helper method to layer set (LSET) to create a sequence of layer IDs
using another sequence for ordering.
2022-03-29 16:08:23 -04:00
jean-pierre charras
016af235db Pcbnew: add a GAL layer (LAYER_LOCKED_ITEM_SHADOW) to draw markers on locked footprints 2022-03-09 17:54:58 +01:00
jean-pierre charras
1f2d1528cb LSET::SeqStackupBottom2Top(): add missing user layers to list of layers
These missing layers were not exported in export SVG.
2022-01-17 10:54:19 +01:00
Jeff Young
e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Jeff Young
fecb53b64f Clean up removal of separate front & back footprint text visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/9441
2021-10-22 21:14:15 +01:00
Jeff Young
f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Marek Roszko
0e16db0c25 Kick wx.h mostly out of common 2021-06-07 18:38:52 -04:00
Jeff Young
cad5198ab7 Worksheet -> (industry standard) Drawing Sheet. 2021-02-22 17:35:46 +00:00
Jeff Young
1f27b7e7df Don't render hole walls when no physical layers are visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/7369
2021-02-01 17:14:30 +00:00
Jeff Young
a235103e48 Redo pad & via painting (again).
New strategy isolates all draw/don't draw decisions to the ViewGetLOD
routines, and all dimmed/not dimmed to PCB_RENDER_SETTINGS::GetColor.
The actual drawing in PCB_PAINTER is more-or-less conditon free.

Also adds new layers for pad and via hole walls so that they can be
controlled for high-contrast mode.

Also changes the drawing paradigm so that the pads are drawn even when
not on the high contrast layer, just in low contrast.  The hole wall
is drawn in high contrast.  This actually makes things clearer to the
user (although to be honest was done to keep from having to re-render
pads when the high contrast layer changes since we have two separate
layers now that we can adjut colours on).

Fixes https://gitlab.com/kicad/code/kicad/issues/7328
2021-01-30 16:31:27 +00:00
Marek Roszko
16e3e59495 Split out arrayDim and MIRROR templates from macros.h
These were not macros
2020-11-17 20:21:04 -05:00
Jeff Young
ef3b7052e0 Remove layer nag dialogs and just ignore non-shapes on Edge_Cuts.
Fixes https://gitlab.com/kicad/code/kicad/issues/5812
2020-10-13 20:22:31 +01:00
Ian McInerney
5482307ac8 Allow edge cuts to be drawn in the footprint editor 2020-09-30 23:33:30 +01:00