This allows common operations like merging a pin courtyard
into the body courtyard in the fooprint editor, taking a
"bite" out of a polygon and so on,
For now, this only supports polygons made of straight lines.
There are some wierd cases when the operations result in nothing
(e.g. wen a big polygon is substracted from a smaller one that
it contains entirely). I have tried to do something senisble in
these cases, but there may be more optimal ways to handle it.
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/13025
Using the new ITEM_MODIFICATION_ROUTINE system, drop in two new
tools: chamfer and line extend. These are two geometric operations
that are relatively common when editing footprints in particular.
Chamfer delegates the geometric calculations to a dedicated unit
in kimath/geometry.
Note that "immediate" doesn't mean quite the same thing: while it will
enter the tool immediately, it won't necessarily finish the tool during
the call if the tool has an event loop. So for something like Rotate
"immediate" and "synchronous" have the same behaviour, but for something
like Move they do not.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15085
It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.
Removes all uses of GetCommandStr() and makes it private.
Also removes EditToolSelectionFilter which was misused in more places
than it was used correctly. The original point of the client filter
was to move the logic to the point of use, which the
EditToolSelectionFilter sort of obviated anyway.
Fixes https://gitlab.com/kicad/code/kicad/issues/6751
This unifies everything under a single architecture with a "don't
show again" dialog. Since everything now goes through the same
path it should be reasonably easy to make it do whatever we want
in the future.
Right now it presents 3 options: modify only unlocked items, override
locks and modify all items, or cancel command.
* Consolidate the measure tool into one tool (this gives cvpcb
unit changing and snapping capabilities in its measure tool)
* Transition cvpcb to use actions for the sketch modes
* Replumb how magnetic items settings are stored and used
CHANGED: The reset buttons now set the X or Y offset to the current
offset from the reference position. Selecting individual pads as the reference item is now also possible.
Default out-of-the-box is no hotkey. Removed all the preference stuff.
Note that the new implementation is a little different: the old one only
operated on a selection with a single item where the new one operates on
all selected items. So if you want the whole track do a 'U' before the 'W'
(or whatever you have Change Track Width assigned to).
Fixes: lp:1844023
* https://bugs.launchpad.net/kicad/+bug/1844023