82 Commits

Author SHA1 Message Date
Seth Hillbrand
2db8c6eca0 Maintain group membership when shoving
Keep track of the original group membership and assign this to the newly
created element as well

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20862
2025-08-26 10:34:10 -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
JamesJCode
906c24bc6d Unify length calculation between router, board / frame, and DRC 2025-03-30 09:18:41 +01:00
Jeff Young
567da3de91 Tables support for router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20295
2025-03-10 15:45:42 +00:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +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
Jon Evans
2a605e4a4e Infrastructure and file format for via stacks 2024-10-06 18:45:25 -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
jean-pierre charras
6cfff7156a PNS router: rename IsCopperLayer( int aLayer ) to avoid a collision.
IsCopperLayer( int aLayer ) can be ::IsCopperLayer( int aLayer ) or
PNS_KICAD_IFACE_BASE::IsCopperLayer( int aLayer ) in pns_kicad_iface.cpp
This is error prone.
So, to avoid mistakes,  PNS_KICAD_IFACE_BASE uses now 2 functions:
- IsPNSCopperLayer( int aPNSLayer )
- IsKicadCopperLayer( PCB_LAYER_ID aPcbnewLayer )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18800
2024-09-29 09:35:02 +02:00
Seth Hillbrand
a8dc101010 Fix layer translation in setting start item
Need to be very careful when translating between PNS layers and board
layers.  PNS layers are linear while board layers are not, so reaching
into the view will return a board layer (maybe we should proxy this
through the iface?)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18708
2024-09-27 11:08:19 -07:00
Seth Hillbrand
1a6b309ad6 Some extra cleanup for layer interface
PNS<->Board layer interface needs clear boundaries about where we are
using board layers (with the alternating numbers) and PNS layers which
are sequential and all copper
2024-09-13 15:50:12 -07: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
JamesJCode
c39551b032 PNS: Check for nearest segment anchor for initial track constraints 2024-08-15 21:45:34 +01:00
Roberto Fernandez Bautista
6078bc52eb PNS: Fix a few memory leaks 2024-03-31 18:21:02 +02:00
Jeff Young
e0a34efcb7 Use a more self-documenting API for router preview item flags.
Also fixes a bug where rule areas were drawn with solid fills.
2023-12-08 16:02:15 +00:00
Alex Shvartzkop
546c7ed218 Introduce GENERATOR_TOOL. 2023-10-08 02:41:17 +00:00
Tomasz Wlostowski
a7ae4d8e9a router: orphaned net is not the same as null net handle 2023-09-12 16:03:55 +02: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
f27bc16d62 Cleanup API and use text bounding box for routing.
If someone wants to route around the text more tightly
they can now convert the text to polygons.

Fixes https://gitlab.com/kicad/code/kicad/issues/14252
2023-05-02 16:03:43 +01:00
Jeff Young
26609bbf05 Fix PNS_KICAD_IFACE_BASE::IsFlashedOnLayer() to be able to handle multi-layer queries. 2023-04-14 12:02:36 +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
Wayne Stambaugh
28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
Alex
6543d23d9f router: Re-add electrical path lines drawing for length tuning. 2023-02-01 20:36:52 +03:00
Tomasz Wlostowski
7d40bbdf38 router: mark the head trace (as opposed to the 'fixed tail') with fully saturated color
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11386
2022-12-29 17:54:59 +01:00
Jeff Young
3e53426b6c Use same ratsnest colours in the router as the rest of KiCad. 2022-10-16 22:21:14 +01:00
Mike Williams
82f8cd72a3 PNS Router IFACE: Add board commit mode control 2022-09-13 15:06:36 +00:00
Tomasz Wlostowski
4192c0a709 router: move IsFlashedOnLayer to the IFACE_BASE class so that it can be used in the debugger tool 2022-06-09 00:30:57 +02:00
Jeff Young
5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Jeff Young
ed79f6e511 Clean up some TODOs. 2021-12-24 21:10:28 +00:00
Jon Evans
328d3d0d77 PNS: Fix rule resolution when starting from PTH
Have to use the routing start layer, not the first
layer of the PTH, to get the appropriate sizes
2021-10-23 22:46:31 -04:00
Wayne Stambaugh
78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Jeff Young
096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
Jon Evans
247da631f9 Revert "Fix typo and clean up leftover tracks"
This reverts commit ed66c0f14dcd17947ddd339094593de104615f12.

Revert "Clean up co-linear tracks after finishing routing"

This reverts commit 1a102f03c0a59cdac37cdaa740d845eb3c29730e.

More complex solution needed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8526
2021-06-01 11:18:00 -04:00
Jon Evans
1a102f03c0 Clean up co-linear tracks after finishing routing
This involved adding some extra infrastructure to be able
to handle the case where a track that is sitting in the
router's commit waiting to be added to the board actually
needs to be deleted instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8419
2021-05-31 17:36:38 -04:00
Jon Evans
cdfb014ab6 CHANGED: Account for via height in track length calculations 2021-04-04 13:59:18 -04:00
Seth Hillbrand
792904557e Remember Parent data when routing
Keeps parent information such as UUID and pad removal options for
elements that are just updated in routing rather than created fresh or
fully destroyed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7460
2021-02-07 17:08:43 -08:00
Jeff Young
71215bcab3 Make sure TH pads get collision layer highlighted.
Also cleans it up to centralise all the decision-making.

Fixes https://gitlab.com/kicad/code/kicad/issues/6925
2021-01-03 21:16:09 +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
Jeff Young
bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young
f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young
f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Jeff Young
5e569e81e7 Performance enhancements for PNS. 2020-11-11 15:32:30 +00:00
Jeff Young
02cbcb99df Fix broken logic in ImportSizes().
Fixes https://gitlab.com/kicad/code/kicad/issues/6049
2020-10-18 12:08:16 +01:00
Jeff Young
23d9e2e74a New rules engine needs non-connected items as well. 2020-10-17 13:52:18 +01:00
Jon Evans
fd4b9f0efa PNS: ratlines need to not be debug graphics
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5995
2020-10-13 20:04:47 -04:00
Jeff Young
22cde88ba9 Allow chamfering/filleting of zone/board edge intersections.
Fixes https://gitlab.com/kicad/code/kicad/issues/5947
2020-10-10 23:09:43 +01:00
Tomasz Wlostowski
38cef95da9 router: initial support for V6 Design Rules (width/clearance/diff pair width/diff pair gap). Still a lot of work to do! 2020-10-09 00:01:26 +02:00
Jeff Young
6d50c9749c Mark the colliding shape so we know which one to highlight.
Also checks the nets when checking for a pad being flashed on a particular
layer (so we don't end up thinking the currently-routing-collided track
is a connection).
2020-10-05 22:32:07 +01:00