380 Commits

Author SHA1 Message Date
Seth Hillbrand
6e2b20ed0e Update BS Threadpool to 5.0 2025-09-10 13:02:24 -07:00
Seth Hillbrand
1a4eba56a7 ADDED: Skip Via support
Skip vias are vias that are flashed on their start and end layers but
have no annular rings on the interior layers and do not connect to zones
in those layers

You can now select Annular ring type "Start and end layers only".  This
will prevent annular ring flashing on intermediate layers and zones
fills will provide clearance.  You can still connect tracks to
intermediate layers but preventing that will fall to the designer

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21433
2025-08-07 15:48:10 -07:00
Seth Hillbrand
b3ce6f26bb Optimize kissing poly routine
Inserting many points into the middle of a line chain is not as
efficient as just creating a new line chain and replacing the old one
(single allocation and copy vs many)
2025-07-22 14:43:15 -07:00
Seth Hillbrand
4221c1d93b Additional speed-up for outlines and fills
BBOX check before polgon point inside
Clean representation of segment iterator
Pre-allocate line chain space
2025-07-22 13:38:39 -07:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jeff Young
80c447f869 Thread safety. 2025-07-14 13:17:53 +01:00
Seth Hillbrand
b165240118 Optimize zone-zone checks in filler
Teardrops are calculated as zones, so when we create a board with
thousands of teardrops, we don't want to run O(n^2) checks on the
clearance between multiple teardrops.  Instead, we can check only the
clearance where the two zones have the potential to interact

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21226
2025-07-12 11:56:14 -07:00
Jeff Young
d2a623719b Be consistent about getting board copper layers. 2025-07-09 13:05:22 +01: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
4e174f2078 Don't try to keep netcodes in defaultZoneSettings (KICAD-7Z8). 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
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
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
Jeff Young
2745945894 Improve thermal reliefs for hatched zones. 2025-04-05 22:18:17 +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
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
JamesJCode
e64239969a Fix compiler warnings 2025-03-20 18:42:20 +00:00
Jeff Young
0a3ddd33ee Use ERROR_INSIDE for knockout text (and a 0 gap). 2025-03-19 08:55:32 +00:00
Seth Hillbrand
4ef81ee3ea Revert "Remove prototype zone fill option"
This reverts commit 3f17aabcd0dd8e74c93f3d52c1d86ba163fa3044.
2025-03-07 15:25:13 -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
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
9ca9d7120a Cleanup. 2025-02-20 17:47:40 +00:00
Jeff Young
e018a33628 Formatting. 2025-02-19 23:43:53 +00:00
Seth Hillbrand
9e4204340f Fixup net-tie caching and add QA for netties
When building a net tie, all elements in the footprint that belong to
the net tie can be arbitrarily close to one another.  outside of the
footprint, connected items can be arbitrarily close to the tie element
but must respect the clearance values for elements that have nets
assigned to them

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

(cherry picked from commit bff819edb08e3d303c695b79f990374d259e4d0a)
2025-02-13 14:45:40 -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
Daniel Treffenstädt
0dd80c2975 Fix thermal spoke template edge case behaviour
For certain custom pads, need need to adjust the overlap between spoke and pad to ensure a connection
2025-01-07 17:51:15 +00:00
Seth Hillbrand
074e6df3bc Revert "Move thread pool to singleton class"
This reverts commit 361f61a02380881efb59b1cebfdc3e73322b3d3c.
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
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
Seth Hillbrand
9fb289b268 Add safety case to prevent arcs in outlines
Boolean ops do not support arcs, so clear during the fill in case they
are included
2024-11-15 22:05:09 -06:00
Tomasz Wlostowski
e28e614907 ZONE_FILLER: don't crash when vertex list is empty 2024-11-02 19:59:09 +01:00
Jeff Young
c4b99eefd4 Remove stale comments; improve other comments/formatting. 2024-10-31 11:20:31 +00:00
Seth Hillbrand
8dda9b37fa Change zorder to use unsigned
Edge cases can happen where point + clearance is larger than the bbox.
This can cause the zOrder min and max to get switched as max get a high
bit and is negative.  Clamping to limit the input values and using
uint32 for the output solves the corner case
2024-10-24 17:40:25 -07:00
Seth Hillbrand
64ff47c594 Handle edge cases in kissing zones
When zone kisses happen from different polygons, we need to be careful
not to use the different polygons for ear comparisons or prev/next
pointers

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18654
2024-10-24 17:40:25 -07:00
JamesJCode
37a3e55bd3 Allow pcb rule areas to handle keepout and placement concurrently
- Implements component classes for placement rule areas and multichannel tool
- Implements property inspector properties for rule areas
- Fixes some zone member default initialisation issues
- Gates all multichannel-related imlpementation with existing adv config flag
- Removes rule area type enum, replaces with inference from keepout and
  placement settings
2024-10-10 23:29:02 +01:00
John Beard
4bad76825c Standardise clamp function
std::clamp and alg:clamp had different argument orders.
Since std::clamp is constexpr, we might as well just use
that now we have it.
2024-10-09 21:27:58 -06: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
Seth Hillbrand
86c0aec468 Move zone connection filler out of AC
New algorithm to prevent zone fills that are smaller than the minimum
copper width.
2024-08-28 09:04:51 -07:00
Tomasz Wlostowski
c4d5c99b42 pcbnew: more checks for rule area type (keepout/placement) in various zone-related code 2024-08-13 22:50:26 +02:00
Seth Hillbrand
77b1d367df Fixup copper connection wires
Use better check for ears, avoiding fracture points.
Be careful when insterting spikes to avoid changing indices for future
polys
2024-07-10 21:48:37 -07:00
Seth Hillbrand
845130ba9e ADDED: pcbnew fill avoids kissing fills
Previously, fills could end up just barely touching, leading to DRC
errors even if there was enough room to fill the remaining space.  This
was due to how we shrink/expand the zones to remove small features.  By
adding a zero-width line between points that should be connected, we
expand back to the correct width.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14130
2024-07-10 18:34:41 -07:00
Seth Hillbrand
fba3b36f04 Correct pad connections for 45° circular
When calculating the pad bbox, we need to only account for deflation of
zone min width.  Additionally, when calculating spokes for roughly
circular elements, we don't need to go to the bbox corners, so special
case it to rotate after the fact

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18329
2024-07-09 17:08:00 -07:00
Seth Hillbrand
6f285066e4 Simplify spoke generation
Sin/Cos are pre-caclulated for all multiples of 45° so we don't need to
short circuit them here.  Calculating the bbox intersection point allows
us to pick spoke sizes that are not overly large so as to miss the hit
point testing in the associated fill areas.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18329
2024-07-09 17:44:03 +00:00
dsa-t
cb41b53ab7 Use MurmurHash3_x64_128 (MMH3_HASH) for polygon checksum.
Improves performance when moving footprints.

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-06-24 21:19:43 +00:00
Jeff Young
90652a741d Don't generate thermal reliefs for pads that don't intersect zone.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18174
2024-06-07 23:08:15 +01:00
Jon Evans
e16130a02c Move pad and via properties into PADSTACK 2024-05-14 20:57:56 -04:00
Jeff Young
6b797420d5 ADDED allow physical_clearance between courtyards & zone fills.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6966
2024-05-01 13:49:41 +01:00