119 Commits

Author SHA1 Message Date
Jeff Young
c6fcf7e0b8 Allow easier code searching for property names. 2025-08-30 19:09:15 +01:00
Seth Hillbrand
0a767acb3a Wrap net_selector widget for properties
Provides consistent interface to modify/filter nets in property panel
and dialogs

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17643
2025-08-26 11:50:12 -07:00
Alex Shvartzkop
ec2d9c9d4c Add green color indication to length tuning status popup. 2025-08-21 15:41:03 +03:00
Jeff Young
90621947bf Bug fixes for locked tuning patterns.
The router uses locking to know the bounds of the
tuning pattern so it must be temporarily unlocked
while editing with the router.
2025-08-20 23:23:45 +01:00
Jeff Young
b0945ee697 Don't push someone else's commit. 2025-08-20 13:19:37 +01:00
Jeff Young
941ea9edbb Formatting. 2025-08-19 18:33:18 +01:00
Seth Hillbrand
ddae938aa4 Allow grouping tuning pattern with tracks
Any object that shares a name should be able to be handled in a group
2025-08-15 10:54:23 -07:00
Seth Hillbrand
3ec380d93c Allow generator actions to affect children
Changing the generator will often modify the underlying children's
properties.  We should store these data in the stack.  Also add the
ability to change layers

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21476
2025-08-15 06:50:46 -07:00
John Beard
299a6c6c7b Netinfo: avoid transitive string_utils.h include
Put the string manipuuation utils in the cpp, and
remove string_utils.h from the includes of netinfo.h.

This spams that header into about 350 files, not all of which
need it. Then go round and tidy up the places (most exporters
and dialogs) where CPP files weren't including string_utils.h
when they used it, as well as some other order-sensitive
include issues that turned up.
2025-08-12 20:00:15 +08:00
Seth Hillbrand
b207ec8817 Remove negative index access from CPoint
Callers should be responsible for index count and/or use iterators
2025-08-08 10:46:45 -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
Seth Hillbrand
29eee9f126 Refactor grid_helper to allow testing
Make view and tool manager optional so that we can implement QA on the
actual snapping
2025-08-05 16:10:17 -07:00
Jeff Young
9c884242f6 Clear arcs before running boolean ops (KICAD-QXG). 2025-07-04 15:14:21 -06:00
Jeff Young
5b44312a10 Prefer the active layer when picking tuning patterns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20963
2025-06-08 20:57:05 +01:00
Jeff Young
dc342c0fc1 Fix copy/pasta. 2025-06-02 13:32:48 +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
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
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Mike Williams
05e9772d54 groups: extract common class methods into EDA_GROUP base class 2025-04-01 14:34:20 -04:00
Jeff Young
88267c4a47 Formatting. 2025-03-26 16:49:36 +00:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Alex Shvartzkop
4024869771 Don't exit out of length tuning tool on first cancel.
Otherwise you cannot use same settings on multiple tracks.

(cherry picked from commit 6b31bbe9f3bda8f229d3f7d48af522395cef30ae)
2025-02-13 14:39:44 +03:00
JamesJCode
c80a71f64a Make netclass name methods clearer, and improve doc strings
There are two netclass name methods, which previously were not
obvious in their uses. These have been renamed to now have:

GetName() : Used for internal or tooling (e.g. netlist export) usage
GetHumanReadableName() : Used for display to users (e.g. in infobars)

Fixing the previous unclear naming will result in fewer bugs
when users start using the multiple netclass functionality, as
the incorrect usage had started creeping in to new code. Also this
will help authors of new code select the correct name method.
2025-01-14 20:44:09 +00:00
JamesJCode
4b9bdc58c5 Reserve "Tune Skew" before string freeze 2025-01-03 22:42:45 +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
Ian McInerney
c0622eaa45 Avoid copies when using auto 2024-12-31 00:18:10 +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
Jon Evans
e4ac4e1d34 Fix tuning pattern start layer 2024-12-02 13:51:07 -05:00
Alex Shvartzkop
78b2e53777 Length tuning workflow improvements:
-Allow changing length tuning settings before tuning has been started
-Do not exit out of the length tuning tool after each placement
-Keep specified settings between pattern placements

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18979
2024-11-23 17:26:14 +03:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
Jon Evans
d0b2334ceb PNS: Support via stacks 2024-11-04 21:30:38 -05:00
John Beard
90e49a42e7 Pcbnew: point editor: use behavior class for generators
This also changes the interface on the GENERATOR classes
to no longer take a shared_ptr - these methods are synchronous
and don't store (shared) ownership of the EDIT_POINTs.
2024-11-03 06:00:39 +08:00
Alex Shvartzkop
d2c33e186e Update field order in PCB_TUNING_PATTERN. 2024-10-30 09:12:24 +03:00
Alex Shvartzkop
bf54c86d7d Set tuning pattern initial side from cursor position while placing.
It's faster than flipping the amplitude handle after placing.
2024-10-30 09:09:51 +03:00
Denis Latyshev
260014710a Pcbnew: Add differential and single line length/skew mirroring
ADDED: Added functionality for mirroring differential and single line length, as well as skew adjustment elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/18469
2024-10-16 19:21:03 +00:00
jean-pierre charras
045c1f347f PCB_TUNING_PATTERN: fix another issue due to mix PCB_LAYER_ID layer and PNS layer id
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18867
2024-10-07 19:02:43 +02:00
jean-pierre charras
807c00c70c Avoid duplicate code. 2024-10-07 18:24:12 +02:00
jean-pierre charras
4b21e54a61 PCB_TUNING_PATTERN: fix issue due to mix PCB_LAYER_ID layer and PNS layer id
The layer id sent to PNS router was incorrect for any layer but F_Cu.
Tehe result was Tuning tools not working (but for F_Cu)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18865
2024-10-07 16:44:59 +02: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
Ian McInerney
2190c37cd6 Use appropriate tunning pattern icon in menus for tunning pattern generators 2024-08-19 16:58:05 +01:00
Tomasz Wlostowski
9963b9dd9f TOOL_INTERACTIVE: only create the context menu when we are running in GUI mode
TOOL_MENU::m_menu was unconditionally created by the TOOL_INTERACTIVE constructor, resulting in crashes if
we wanted to run the TOOLs in headless  mode, e.g. in unit tests. This commits makes
the creation of the menu object dependent on Pgm::IsGui().
2024-08-13 22:50:26 +02:00
Jeff Young
b8819b4636 Another reduction in asserts. 2024-07-19 22:11:56 +01:00
JamesJCode
230c297691 Fix tuning pattern moves and undo / redo 2024-07-09 12:09:31 +01:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Jeff Young
9fb07d886e PCB_GENERATOR_Ts are PCB_GROUP_Ts too.
Also, an item must already be in a commit to add it to a group.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17595
2024-06-05 10:51:24 +01:00
Jeff Young
86d7cf5d96 Formatting. 2024-06-02 10:52:18 +01:00
Sven Pauli
c7ad5efbed Implemented flip for tuning patterns. 2024-06-02 09:49:41 +00:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young
978ef352d0 Support legacy Length Tuning Settings workflow.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17748
2024-04-24 10:51:25 +01:00