235 Commits

Author SHA1 Message Date
Mike Williams
76e4b4aca4 PCB: add gate swapping
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1950
2025-09-10 08:35:13 -04:00
Mike Williams
a7e004bd12 PCB: pad net swap
Allows the user to swap the net associated with a pad and other pad(s).

Will propagate net changes to connected non-zone items, with a
dialog confirming how to handle changes that propogate to unselected
pins.
2025-09-08 14:55:19 -04:00
John Beard
e016dc52fd Pcbnew: Add concept of a 'point'
This is a zero-dimensional object that can be used for snapping
and documentation of useful, but non-physical features on a
board or footprint. They do not correspond to any physical
output in exports or plots.

Points do have a "size", but this is a graphical property only
and determines how large they are drawn on the board.

They also have a layer, which allows them to be selected and
made visible according to layer filters.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/4691
2025-09-01 23:44:21 +08:00
Mike Williams
97af2af779 design blocks / multichannel: basics of placing DB layout 2025-08-20 15:20:13 -04:00
Jeff Young
b0945ee697 Don't push someone else's commit. 2025-08-20 13:19:37 +01:00
Seth Hillbrand
02e9dd697b ADDED: Action to embed all 3d models referenced
Moves through the footprints and replaces external references with
internal embedded files

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20847
2025-08-10 20:20:32 -07:00
Jeff Young
55a36c1ce7 CHANGED: retire the select-lib-table dialogs.
We now allow the user to specify which in the
New Library dialog.

Also retires the "Export power symbols too" dialog.

Also gives a bunch of file and library dialogs
more explicit titles.

Also removes separate code-paths for Export to
Library and Export to New Library.  The regular
code path has a "New Library..." button now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16323
2025-07-20 19:06:40 +01:00
Jeff Young
e03cb736f2 Move board functions to BOARD_EDITOR_CONTROL. 2025-05-24 18:30:30 +01:00
Jeff Young
4bb54b3439 Move more stuff to ACTIONs framework. 2025-05-23 15:19:49 +01:00
Mike Williams
8ad9634498 pcb: add track change layer command
Works the same as the prev/next layer commands, but the addition of CTRL
brings the track with it.
2025-05-20 15:48:49 -04:00
Mike Williams
8ec70ee92b PCB: unroute segment
Works like the backspace key in the router, but for segments that are
already placed.
2025-05-19 14:05:14 -04:00
Mike Williams
2baeecbee8 groups/design blocks add convenience methods for placing/updating 2025-05-15 14:26:56 -04:00
Mike Williams
d2f0a13515 groups/design blocks: add lib link to groups from design blocks
Also add Place Linked Design Block function.
2025-05-13 10:41:32 -04:00
John Beard
a116f5cd57 Point editors: move cycle arc mode to common action, add to menu
This isn't the best possible UX (having the various modes immediately
available as graphical affordances would be best). But it's somewhat
discoverable, and at least shows the hotkey, if any, and it in the
context menu and not hidden in a toolbar right click menu. So if the
affordance-type system doesn't make it for v10, this will at least
provide something in eeschema.
2025-05-02 21:30:33 +08:00
John Beard
ff31b88857 Pcbnew: add keep-radius arc-edit mode
This is (now) fairly easy to slot into the PCB point editor
framework.

In this mode, the endpoints adjust only the endpoints on the existing
radius. Radius can ve changed with the midpoint point. The center
point moves the arc, as in the "keep center/adjust radius and angle"
mode.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15661
2025-05-01 22:07:46 +08:00
jean-pierre charras
a90e83a699 FOOTPRINT_WIZARD_FRAME: fix tools missing in toolbar (i.e. fix TODO items)
These TODO were to convert missing tools to actions.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20694
2025-04-19 14:14:14 +02:00
Jeff Young
0659290417 Simplify hatch damage/rebuild and move it out of view.
There should be far fewer hatched objects than other
objects, so we're spending too much effort finding
all the possible damage when we probably should
just be auto-regenerating all the hatching.

This also moves it out of being done during redraw,
which was proving problematic.  Plus the refill
zones architecture does it during commit, and has
a lot more miles behind it.
2025-04-07 11:46:02 +01:00
Mike Williams
40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Mike Williams
f40b24d04a groups: move actions to common actions 2025-04-01 14:34:20 -04:00
Mike Williams
e11cf94a3e design blocks: add PCB design blocks behind advanced config
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2508
2025-03-20 15:13:52 -04:00
Ian McInerney
ea2f8a63c1 Actionize more PCB actions 2025-02-28 01:57:37 +00:00
Ian McInerney
784246575b Move footprint viewer/cvpcb actions to tool framework 2025-02-28 01:57:37 +00:00
Ian McInerney
384ca6bf98 Actionize more toolbar items 2025-02-28 01:57:37 +00:00
Jon Evans
5cec2fac9d API: Add board origin setter/getter
See https://gitlab.com/kicad/code/kicad-python/-/issues/20
2025-02-25 20:13:16 -05: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
d5c5050d29 Fix initialization order of the events in pcbnew
The TOOL_EVENT constructor searches for ACTONS::cancelInteractive. That
action is global, so we need to ensure it is created before we try to
create these events - so switch to a create on first use paradigm for
the events.
2024-12-31 00:18:10 +00:00
John Beard
d973fd723e Pcbnew: add an arrow change action to the menu when drawing an arrow 2024-10-30 21:22:37 +08:00
John Beard
c956e6761b Pcbnew: add interative relative offset tool 2024-10-30 09:00:14 +08:00
John Beard
9c0e4a3f66 Pcbnew: Make point selection more reusable
This moves the interactive pick point/item tool action to
PCB_PICKER_TOOL, and add a parameter to allow it to be useful for other
tools that want to pick a point from the canvas.
2024-10-28 22:00:45 +08:00
John Beard
2c2ff64911 Allow incrementing different parts of strings with modifiers
Primary increment is the right most bit, secondary is the next
rightmost. So you can increment 'A1' to 'A2' or 'B1' with
Shift-Alt-Scroll and Ctrl-Alt-Scroll respectively.
2024-10-26 16:01:07 +08:00
John Beard
3f602f8177 Add 'Increment' actions
These are context sensitive actions that increment "something"
about the selected item.

A generic 'increment' action can be produced, e.g. by other tools
or UI events, which has in increment step (positive or negative)
and an 'index' which determines what about the item should be
incremented - it's up to the increment action handler to decide
what that means.

And then add a primary and secondary inc/decrement action,
which allows to bind hotkeys to each.

Bind these to:

* Sym edit: increment pin names/number
            increment text items
* Sch edit: increment lables and text
* FP/PCB:   increment pin numbers
            increment text items
2024-10-26 15:46:16 +08:00
John Beard
201b60c670 Point editor single-corner chamfer tool
Come up with a plausible default chamfer size, rather
than prompting every time with a modal (and then you have
to handle when the chanfer doesn't fit). This could be
changed if it's more annoying this way. But if we had
proper edge-dragging in zones, probably would be better
than setting a chanfer manually.

Also fix the GetNeighbourIndexes which seems to have
always been broken (but is not actually used by anything at
present).

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/16771
2024-10-13 11:10:49 +08:00
John Beard
b3248095e8 Pcbnew: add bezier editing tool
Adds the initial implementation of bezier overlay
(assistant) and geometry manager. This is only
implemented in Pcbnew - the code is common, but
eeschema doesn't currently use it for any shape.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/8828
2024-09-25 21:41:32 +01:00
John Beard
8fdb6d6e88 Feature: Exact item offset tool
This is a little bit like the bounding hull tool, but the
output is "exact" and it only supports the most common
source items.

By 'exact', this means that rounded corners are real arc
segments rather than polygonal approximations. Obviously,
this is rather tricky in the general case, and especially
for any concave shape or anything with a bezier in it.

Envisioned main uses:

* Creating courtyard and silkscreen offsets in footprints
* Making slots around line or arcs.

The one thing that it does not currently do, but which it might
plausibly do without reimplementing Clipper is convex polygons,
which would bring trapezoidal pad outsets for free. But that
is a stretch goal, and bounding hull can be used.
2024-09-19 06:35:43 +01:00
Eric
1506beecbc Implement ODB++ export
ADDED: Add support in Pcbnew for exporting ODB++ files under Fabrication
       Outputs, base on ODB++Design Format Specification (Release v8.1
       Update 3 February 2021).

Note: There is still a lot of work to do if we will make the feature as
      complete as the ODB++ spec.  However, the current functionality's
      completeness is already sufficient to cover general production
      scenarios. I have compared the output results with Gerber files by
      DFM tool and the accuracy at the graphic level should be able to
      cover most usage scenarios.  Additionally, I am very grateful to
      the great open-source project Horizon EDA for giving me a lot of
      inspiration in terms of ideas.

The feature can be enabled by adding "EnableODB=1" to the kicad_advanced
configuration file.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2019
2024-09-14 15:34:51 +00:00
Tomasz Wlostowski
d34bcc8f08 PCB_ACTIONS: add actions for MULTICHANNEL_TOOL 2024-08-13 22:50:25 +02:00
Tomasz Wlostowski
8bb4dce288 pcbnew: initial commit for MULTICHANNEL_TOOL, wip in dialogs & tool actions 2024-08-13 22:50:25 +02:00
Jon Evans
bd946313dc ADDED: Position items relative to arbitrary reference point
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4756
2024-08-11 18:59:26 -04:00
John Beard
7fc367e688 Pcbnew: Add dogbone corner tool
This adds circular arcs in corners to allow for the router
cutter radius when routing a slot or corner that receives
a sharp corner.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18512
2024-08-07 23:01:32 -06:00
John Beard
24c3102638 Add layer pair cycle action
This is the second piece of the layer pair preset quick
switcher that allows a action (i.e. hotkey) to cycle between
the enabled preset layer pairs.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15227
2024-08-06 23:45:55 +08:00
Jeff Young
ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
John Beard
4dd049ee8f Add action to focus tree searches
The default hotkey is Ctrl+L, as this is not bound by
default in the FP or symbol editor, and it is the hotkey
that is used to focus the address bar in web browsers,
which is a similar kind of action.
2024-05-05 04:18:36 +08:00
John Beard
fa7e842c8c Rework item distribution
This splits the tool into two separate tools: by center and
by even gaps. Previously, this was automatically decided, based on
if the items could have any gaps between them. This was unintuitive
as it would appear to arrange by centre point sometimes but not others.
When items aren't all the same width, the results can then be very
different, based only on the starting positions.

The new behaviour is to have a dedicated tool for each, which echos
how graphical programs like Inkscape manage this.

The by-gaps method is then extended to work for overlapping items
(when items overlap, the overlaps are made equal). The logic is
centralised in kimath/geometry, and some QA is added. This should
make it easier to extend to eeschema, for example.

This also (attempts to) address some rounding issues which could
cause minor, but compounding, errors to build up along the list
of items.

Also, fix bugs in the collection filtering - previously items
like markers were filtered out only after the selection size
was used to compute the gaps between items.
2024-05-05 03:35:09 +08:00
Seth Hillbrand
7fdb5e98a2 ADDED: Polygon simplify
Simplifies the polygon for graphical shape, zones and rule areas,
removing duplicate points and making the outline easier to handle

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17883
2024-04-29 17:48:32 -07: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
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
JamesJ
a763d613e5 Move Net Inspector dialog to a widget panel in pcbnew
Introduces some updates to the inspector, and a number of bug fixes:

- Correctly handles changes in board stackup
- Correctly handles unit change events
- Correctly handles language change events
- All layout / panel settings are stored to the project settings
- Retains ability to create net report
- Simple filter searches on net name and net class name (stored in settings)
- Allows hide / show of columns (stored in settings)
- Grouping by netclass (stored in settings)
- Optional filtering by net name (stored in settings)
- Optional filtering by net class (stored in settings)
- Custom grouping by net name match
2024-03-19 01:02:01 +00:00
aris-kimi
24529e5242 ADDED: library tree context menu option to open sym/fp library files from the defined text editor.
Short description:

Works for Symbol and Footprint Editor behind an advanced config option.
For Symbol Editor it is shown for a single item selection (library or symbol).
For Footprint Editor it is shown for a footprint selection.
(fp editor allows a single tree item selection only).
Option stays hidden if current frame has been modified.

Also small fix(?) for similar action to the project manager.
(Call for the Execution has moved inside the file loop.)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15736
2024-02-29 19:01:59 +00:00
Jeff Young
e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Ethan Chien
d72491a4a5 ADDED: zone manager
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9636
2024-02-24 15:10:50 +00:00