130 Commits

Author SHA1 Message Date
Jeff Young
b98621c8c8 Formatting. 2025-09-07 20:43:04 +01:00
jean-pierre charras
963aa47778 Pcbnew: fix teardrop generation for pads having different shapes by layer.
Teardrop generator used pad::HitTest not testing the hit of a specific layer.
It created false test for some complex pads. Now use a test specific to a layer.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21560
2025-08-27 11:03:00 +02: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
Andrzej Wolski
c73d555fe2 ADDED: Lasso selection in pcbnew
Adds a lasso or freeform selection tool to KiCad in addition to standard
rectangular selection.  Adds supporting HitTest routines

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1977
2025-08-06 16:06:40 -07: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
2c9c607b95 Fix thermal spokes for pad stacks. 2025-04-04 22:45:52 +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
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
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
Jeff Young
0a4533703c Performance. 2025-03-24 10:28:41 +00: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
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
JamesJCode
1e84d1e496 Fix m_zoneLayerOverrides data race in pad.h
From Coverity issue 542093
2025-02-22 14:58:11 +00:00
Jeff Young
dd7c076bc9 Use std::optional for pad connection overrides.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19555
2025-01-09 17:32:05 +00:00
Jeff Young
c2818dcb29 Disable pad-hole-not-fully-inside-copper for board-level testing.
Also fixes the error string for it.
2025-01-07 14:50:16 +00:00
John Beard
520a7cf62c GAL: ViewGetLOD should not be able to change the VIEW
Make the VIEW* parameter const. Since PCB_TEXT does a null-check,
it's not very clear if this can ever be null (and if it is,
why don't the other VIEW_ITEMs check?), so don't make them
all references too at this time.

Also dereference a few pointers a bit earlier to make non-null
promises sooner rather than later.
2025-01-02 22:59:31 +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
John Beard
e9f8b2ba77 Pcbnew: apply same IPC rule in properties panel as in dialog
This means when you switch a pad to be roundable (round rect or
chamfered-with-round), you get the same behaviour as in the dialog
(and an IPC-compliant pad by default).

Also fixes the radius visibility in the properties panel for
chamfered pads (which can have radii).
2025-01-02 00:42:31 +08:00
John Beard
1f551ea0e4 Pcbnew: allow to set pad rounding size from properties panel
This can be useful when you have a defined rounding maximum
(e.g. for an IPC 0.25/0.25 rule) and makes the panel more
consistent with the properties dialog.
2025-01-02 00:42:31 +08:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
Jon Evans
ed0a265aa6 Prevent setting negative pad sizes 2024-10-02 21:18:10 -04: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
John Beard
7ba772bc4c Pad.h doesn't need geometry_utils.h
Saves 200+ files from a rebuild if you touch it.
2024-09-28 13:24:26 +01:00
John Beard
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01: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
b6c1a3ba63 Move SetLayerSet to const reference
Avoids potential performance inefficiencies
2024-08-17 07:56:30 -07:00
Jon Evans
c9af2f318f Ensure constraints when changing pad hole properties
Also expose hole shape to properties system

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17575
2024-08-11 18:10:15 -04: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
9d03a92738 Get rid of C++20 compiler warnings. 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
Seth Hillbrand
7102d9f72a Altium import: handle polygons on copper
In Altium, copper polys will be connected automatically to their
associated pads.  In KiCad, we need to do the equivalent when parsing,
which is to combine the joining copper into the underlying pad.  We also
don't want to treat copper polys as proxy pads without the original
anymore.
2024-06-26 17:27:08 -07:00
Jon Evans
f5e7c705db Move custom shapes to PADSTACK; support in API 2024-06-08 14:26:36 -04:00
Jon Evans
0b0a37aaf7 Move padstack serialization to PADSTACK
Also move a few more things from pad/via
2024-06-04 09:28:24 -04:00
Seth Hillbrand
ae232054f7 Revert "Remove unneeded != operator"
MSVC errors when we don't keep this operator.

This reverts commit c6499cf5dbfd6fd2ddeb31d53c8dfff91c109e29.
2024-05-31 17:38:45 -07:00
Seth Hillbrand
c6499cf5db Remove unneeded != operator
C++20 defines these implicitly
2024-05-31 13:29:34 -07:00
Jeff Young
15d4e114e0 Move pad checking to Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18102
2024-05-29 15:25:49 +01:00
Jeff Young
bc14a841cb Check for drilled hole errors in Footprint Checker.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18093
2024-05-27 13:51:21 +01:00
Jon Evans
ea4ade7350 Fix broken setter 2024-05-14 23:13:31 -04:00
Jon Evans
e16130a02c Move pad and via properties into PADSTACK 2024-05-14 20:57:56 -04:00
Jon Evans
c800fb790d Start unifying padstack properties 2024-05-14 20:57:56 -04:00
Jeff Young
62d4bd7c1d Exercise more care when comparing doubles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17249
2024-05-05 17:32:48 +01:00
Jeff Young
9a6efd43e1 Don't assume that a SMD pad has copper layers. 2024-05-01 18:16:09 +01:00
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Jeff Young
ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00: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
Seth Hillbrand
6b3ac54a41 Add default parameter to GetEffectivePolygon()
Allows legacy plugins to use this function
2023-12-01 09:27:26 -08:00
Seth Hillbrand
d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Jeff Young
62d959ed0e Don't assume an error location for PAD::GetEffectivePolygon().
While ERROR_INSIDE was good for plotting, 3D generation, etc., it's
not good for generating router hulls.

Also reverts part of the change to always use polygons for PNS::SOLIDs.  A single shape in a SHAPE_COMPOUND will be faster (and
more accurate).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14898
2023-10-13 13:59:26 +01:00
Marek Roszko
cb7d7b09e3 config_params doesnt need color4d 2023-09-14 19:21:55 -04:00