7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-07 00:25:22 +00:00
Commit Graph

257 Commits

Author SHA1 Message Date
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
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
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
JamesJCode
00e4d72d4b Move ownership of listener cleanup to BOARD itself
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19736
2025-01-27 21:55:11 +00:00
Seth Hillbrand
3a5eeef9df Auto update list of fonts when embedding files
Get the list of currently used fonts to populate the list of embedded
files when the user checks the "embed fonts" checkbox
2025-01-16 18:07:07 -08:00
Seth Hillbrand
452e69de85 Move thread pool into true singleton
Thread pool needs to be stored in a single location for all of KiCad
otherwise each kiface will spin up its own pool of persistent threads
2025-01-09 09:03:08 -08:00
Seth Hillbrand
074e6df3bc Revert "Move thread pool to singleton class"
This reverts commit 361f61a023.
2025-01-03 21:22:44 -08:00
Seth Hillbrand
361f61a023 Move thread pool to singleton class
Having thread pool as its own singleton in the library meant that each
kiface had its own threadpool, leading to many multiples of the threads
being started.  Placing a singleton class in PGM_BASE ensures that all
kifaces use the same thread pool.

The singleton class can be extended to provide single instance
guarantee for any element across kifaces
2025-01-03 13:51:11 -08: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
Jon Evans
8be61565ca Fix copy/paste error 2024-12-30 20:34:36 -05:00
Jon Evans
2dec1dd598 Implement BOARD::RunOnDescendants
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19397
2024-12-30 20:33:51 -05:00
JamesJCode
dfe0d6345b Another go at supressing FOOTPRINT field on FOOTPRINT objects 2024-12-28 21:57:35 +00:00
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
Jeff Young
2926db778c Bug fixes for rotated tables. 2024-12-16 13:26:48 +00:00
Seth Hillbrand
bf6a255a3e Move more elements from fixed size arrays
Refactor layer data storage from compile-time array sizes to run-time
map storage
2024-12-03 13:25:11 -08:00
Jeff Young
712caeb00e Autocomplete for ERC/DRCERROR/WARNING.
Also improves autocomplete to select the last substitution
token (if any) in the autocompleted text.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19133
2024-11-17 16:27:31 +00:00
jean-pierre charras
b193249d1c BOARD: add helper function GetCopperLayerStackMaxId() and remove dead code
GetCopperLayerStackMaxId() replaces GetCopperLayerCount()*2 and is more
understandable in code where the max allowed PCB_LAYER_ID value is needed.
Removed also a dead code related to GetCopperLayerCount() < 2, broken and not
allowed in Kicad.
2024-10-06 09:37:04 +02:00
Jon Evans
56e0811516 Phase 2 of padstack support
CHANGED: PCB file format now supports saving/loading complex padstacks

CHANGED: PTH pads are now rendered per copper layer in the copper color;
         the PTH pad color is no longer used.

ADDED: support for importing complex pad stacks from Altium PCBs

Enforce padstack-aware access to pad properties across KiCad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8182
2024-10-01 19:55:03 -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
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
5ba50c26a9 Update embedded files hash to use Murmur3
SHA256 is fine for one-offs but for large libraries where we might be
running the hash on hundreds of files, the speed difference is
appreciable.  We don't require crytographic hashing, just a check that
the original file hasn't been corrupted so Murmur3 satisfies our basic
requirement.
2024-09-06 09:57:23 -07:00
Jeff Young
94f995c49e Reduce dependency on dynamic_cast.
(Especially where it is no-worky on MacOS.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17245
2024-09-04 17:24:49 +01:00
jean-pierre charras
9973f1b306 BOARD::GetBoardPolygonOutlines(): Protect against malformed NPTH pads
In some cases, when modifying a pad (SMD -> NPTH from properties panel, one
can generate a NPTH pad with a zero sized hole. Pcbnew can crash with such a pad,
especially if the 3D viewer is shown during modification.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18585
2024-08-22 11:10:05 +02:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Jeff Young
b8819b4636 Another reduction in asserts. 2024-07-19 22:11:56 +01:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -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
Jeff Young
5b81c60b9e Improve user-layer-side-matching algorithm. 2024-07-04 15:06:28 +01:00
Jeff Young
b719f9e89e Fix spelling. 2024-07-03 17:20:26 +01:00
Jeff Young
aa5a370b3a ADDED: user layer types.
This allows a user to define user layers to be front
or back (and therefore to flip with the board view).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8455
2024-07-03 13:32:44 +01:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Jeff Young
c549a214c9 Performance: don't alloc std::vector in critical areas.
For some history, see also aa2ad3b44c
2024-06-21 19:07:46 +01:00
Ian McInerney
672d2c6af8 Always include footprint edgecuts in board edge bounding box
The footprint edgecuts should always be part of the board edge bounding
box, even if the layer the footprint is on is hidden from view.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18245
2024-06-20 23:17:54 +01:00
jean-pierre charras
16e708a0e7 Fix minor compil and Coverity warnings. 2024-06-15 11:20:21 +02:00
Jeff Young
3cf424d929 Make sure var overrides get synced to board properties.
Also allow the board properties to override title-block properties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17863
2024-05-30 00:09:43 +01:00
Jeff Young
498d2c9db1 Lazily re-evaluate worst-clearance cache.
This prevents crashes when trying to re-evaluate
during destruction, etc. and is a cleaner solution
than trying to keep a flag updated.

It should also be a performance win for very large
documents.

Also implements proper threadlocking for the cache.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17950
2024-05-15 14:11:11 +01:00
Jeff Young
8184ed64e7 Explicit control over hidden text in bounding boxes.
In particular, don't consider hidden text when plotting,
and only when AsItemCheckboxes is checked for printing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17958
2024-05-06 21:36:19 +01:00
Alex Shvartzkop
b3bc352c57 Use default stackup if stackup is not defined in STEP/BREP/XAO export. 2024-04-26 15:25:48 +03:00
jean-pierre charras
6b7852c2bb BOARD::DeleteMARKERs fix bug: missing m_itemByIdCache handling.
When deleting markers, the m_itemByIdCache corresponding entry must be
also removed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11750
2024-04-16 12:00:40 +02:00
JamesJ
951065390e Add composite update callback to BOARD_LISTENER
Required for net inspector otherwise composite operations (such
as undo / redo, and length tuning) can result in multiple add /
remove events firing which results in inconsistent length state.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527
(for 9.0)
2024-04-04 22:29:47 +00:00
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Jon Evans
f613cd1cb4 ADDED: A new IPC API based on protobuf and nng
Details, documentation, and language bindings are works in
progress and will be evolving over the course of KiCad 9
development.
2024-04-02 19:34:36 -04:00
Seth Hillbrand
d82e8ee41a Map nets in pasted data
Add missing nets to the existing board and use any existing nets of the
same name.

Adds option to clear all nets in Paste Special

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17626
2024-04-01 16:56:44 -07:00
Jon Evans
1acb1afa98 Fix build errors; warnings
(somehow, the previous version compiles on my machine...)
2024-03-26 19:38:28 -04:00
Jon Evans
5aa8af1abf Add a cache for looking up board items by ID 2024-03-26 18:36:23 -04:00
Jon Evans
7b6afd290a Remove non-const access to board-owned items
(with a few things const-casted for now)
2024-03-26 18:36:23 -04:00
Jeff Young
0598ca0f90 Keep BOARD_DESIGN_SETTINGS DRC marker exclusions up-to-date.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17429
2024-03-17 16:29:24 +00:00
Jeff Young
06a8517818 Further improvements to cache locking.
In particular, don't hold cache lock while doing computations.
2024-03-07 13:20:20 +00:00
Armin Schoisswohl
4dcec60bf4 add include <mutex> to fix compilation under linux 2024-03-07 13:20:16 +00:00