61 Commits

Author SHA1 Message Date
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
Jeff Young
144e660684 Treat changes in solder mask like a width change.
Also in theory keeps from losing tenting properties
on vias that are shoved, though I can't get via
shoving to work at all right now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20085
2025-02-27 15:24:30 +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
Jon Evans
d0b2334ceb PNS: Support via stacks 2024-11-04 21:30:38 -05:00
Tomasz Wlostowski
d9ae8e44c2 router: fix a few more missing translations between pcbnew layers and router layers 2024-11-02 19:59:09 +01:00
Tomasz Wlostowski
d25b27c328 router: add constructor for VIA_HANDLE 2024-11-02 19:59:08 +01:00
Tomasz Wlostowski
3453592fc3 router: introduce ITEM::UNIQ_ID
It's a globally unique identifier for each PNS::ITEM, used as a reliable hash key (pointers are NOT unique)
2024-11-02 19:59:08 +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
Jeff Young
f1efae1e05 We don't want to do collision testing against virtual vias.
(Which means they had better not have a hole.)
2023-10-22 20:35:15 +01:00
Jeff Young
76cd637895 Make the net identifier opaque to PNS router.
This also improves performance as we don't have to look up the
netcodes in a map.
2023-08-22 15:17:02 +00:00
Jeff Young
deb3cbf89b Prevent use-after-free crashes by not fighting over who owns a HOLE.
The diff-pair placer creates DIFF_PAIRs on the stack, which have
VIAs in them, which have HOLEs in them.  The HOLEs get put in the
NODE's index, and we then crash later when doing a collision after
the stack variable has gone out of scope.

The stack variable is also copied while doing a search for "best",
and without the operator= definitions the "best" and the "original"
both think they own the HOLE.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14852
2023-06-01 15:07:29 +01:00
Jeff Young
b2a45023bc Tighten ownership model of PNS::ITEM.
In particular, ownership must be explicitly set.  It is
no longer inherited through copy/clone/etc.
2023-04-28 11:05:39 +01:00
Jeff Young
9646e3c1c0 Simplify PNS::VIA construction. 2023-04-28 00:32:49 +01:00
Jeff Young
676a15df65 Don't try to keep track of a HOLE's net.
Keep track of it's parentPadVia instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/14603
2023-04-24 18:32:17 +01:00
Lucas Dumont
469fe76994 pcbnew: Fix crash with differential routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14537
2023-04-17 14:17:14 +12:00
Jeff Young
ab0dbeb523 Post-holes-work cleanup. 2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
d961cdce3f router: further changes to the ownership model
- LINEs now own their vias optionally (depending whether a LINE with its VIA belongs to a node)
- get rid of unique_ptr on the internal NODE::Add API (and also made it private)
- make sure stack pointers are not added to the node
- use rvalue reference for NODE::Add/NODE::Replace

Manually rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
bfbda978b8 router: hole as first class objects, wip
Rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023

(Also includes a bug-fix for highlighting collisions with edge-cut
items.)
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
363d606503 router: improved heuristics in via force propagation algorithm 2022-10-31 11:17:32 +01:00
Tomasz Wlostowski
65507e7186 router: extend dump format to support automatic regressions tests of interactive routing scenarios 2022-10-31 11:17:31 +01:00
Jon Evans
23596812b6 PNS: Implement HoleHull for VIA 2022-06-07 19:49:38 -04:00
Tomasz Wlostowski
f73acbb206 router: derive VIA class from LINKED_ITEM interface 2022-06-03 23:28:41 +02:00
Wayne Stambaugh
7b2d9dfc0c Fix some Coverity uninitialized scalar variable issues. 2022-03-24 13:17:07 -04:00
Tomasz Wlostowski
4d0a317e3d router: fix via force propagation for vias where hole clearance > copper clearance 2022-01-13 00:42:50 +01:00
Jeff Young
1f4858c314 Show holes in router preview items for vias.
Fixes https://gitlab.com/kicad/code/kicad/issues/9658
2021-11-20 12:21:24 +00:00
Jeff Young
096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
Tomasz Wlostowski
70ed5c1ae8 router: introduce concept of 'virtual' vias as a base for shoving/dragging joints of lines of different widths. 2021-06-03 22:44:53 +02:00
Tomasz Wlostowski
57de83897a router: VIA SetDrill() and SetPosition() must update the hole shape too. 2021-04-19 00:43:15 +02:00
Jeff Young
13094fdc28 Formatting. 2021-01-02 18:38:17 +00:00
Jeff Young
ecc0e861d3 Implement hole clearance and hole-to-hole clearance in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/6882
2021-01-01 00:31:36 +00:00
Jon Evans
70c397a9b4 Implement free vias fully
CHANGED: manually-placed (stitching) vias won't have their nets automatically updated
(unless the via is placed directly on a track segment)

CHANGED: stitching vias can be placed on footprint pads and pick up their nets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5484
2020-12-20 16:29:50 -05:00
Jeff Young
84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Seth Hillbrand
afc94fdec3 PNS: Be better about handling multiple layers
Rather than adding pads/vias multiple times for each layer, we introduce
the "alternate shape" idiom to PNS that allows us to optionally place
the collision constraint on the hole instead of the pad for those
vias/pads that have inner layers removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5158

Fixes https://gitlab.com/kicad/code/kicad/issues/5198

Fixes https://gitlab.com/kicad/code/kicad/issues/5195
2020-08-16 12:39:15 -07:00
Seth Hillbrand
5fc6b74c89 ADDED: Remove unused pads
This option removes copper layers from pads and vias where they are not
connected to other board elements.  This allows the inner layers to be
more closely routed if the via landing pad is not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/1835
2020-08-10 03:27:26 +00:00
Ian McInerney
13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Mark Roszko
19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Tomasz Włostowski
88f2318c9c router: add VIA_HANDLE to refer to VIAs going in/out the SHOVE algorithm without raw pointers 2019-08-07 23:48:28 +02:00
Jeff Young
79934a327e Implement shoving of free vias.
Also contains a little bit of cleanup and a lot of commenting.

Fixes: lp:1833216
* https://bugs.launchpad.net/kicad/+bug/1833216

Fixes: lp:1833214
* https://bugs.launchpad.net/kicad/+bug/1833214
2019-07-24 09:33:47 -06:00
Seth Hillbrand
13997f0050 Revert "pcbnew: Adding copy constructors to PNS items"
This reverts commit 41e4bc4d9fe52c81986ad1522dc3f8965a4ef6bf.

This commit requires additional testing before recommitting as it causes
issues with FindJoint().
2018-10-09 14:50:20 -07:00
Seth Hillbrand
41e4bc4d9f pcbnew: Adding copy constructors to PNS items
Adding safe copy constructors to PNS items including assignment check
and copy operations
2018-10-09 05:37:48 -07:00
Simon Richter
ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter
59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
decimad
6c749e0ba8 Remove PNS_ prefix from most types inside namespace PNS 2016-09-06 16:06:06 +02:00
decimad
4cf44d9725 Rename pns item kind constants in preparation for renaming pns classes 2016-09-06 16:06:06 +02:00
decimad
de6281e977 Move PNS router code into namespace PNS
update copyright messages
2016-09-06 16:06:06 +02:00
Tomasz Wlostowski
95c59c8060 router: multiple fixes:
- PNS_ITEMSET now keeps ownership info (does not rely on PNS_ITEM::Owner(), avoiding the risk of dangling pointers)
- fixed vias losing connected traces when dragging in mark obstacles mode
- fixed rare segfault when board item returned null netclass
2015-08-19 17:27:23 +02:00
jean-pierre charras
c519eea12b 3D viewer: fix (the fix is not perfect) a minor issue in zone rendering: copper thickness was not good when the option 'Show Holes in Zones" was OFF, and "Show Copper Thickness" ON.
Fix a few coverity minor warnings.
2015-04-12 19:44:46 +02:00
Maciej Suminski
4fb9bce354 Code formatting. 2015-02-18 17:53:46 +01:00
Tomasz Włostowski
112adccbcb router: differential pairs & length tuning support 2015-02-18 01:29:54 +01:00
Maciej Suminski
9245b90392 Code formatting. 2014-11-14 20:19:00 +01:00