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
Implement a simple RAII GAL attribute save/restore
class that handles putting the GAL back the way it was found.
This makes draw methods easier to write, as they don't need
to worry if a called method will upset the attribute context
(as long as the caller saves the context, or the callee does).
Obviously not a good idea to use in tight loops, but when text
is involved, this is negligible!
On reflection, the forward vector makes more sense, because
the value in the edit box is then the same as the vector the
user just drew with the ruler.
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
When working near snap anchors, which come and go
rapidly, it's often useful to see what snaps have been
calculated. Add an advanced config to show these
(EnableSnapAnchorsDebug) on an overlay layer.
With more polish this could be a hotkey or something.
This is a pretty major rework of the snapping system.
The GRID_HELPERs now have a separate CONSTRUCTION_MANAGER
which handles some of the state involving "construction
geometry".
This is fed with 'extended' geometry (e.g. "infinite" lines from
segments) for use in generating things like intersection points.
It also handles adding this geoemtry to a GAL view item
(CONSTRUCTION_GEOM) for display to the user.
The process is:
* A TOOL creates a GRID_HELPER
* Optionally, it pre-loads a "persistent" batch of construction
geometry (e.g. for an item's original position)
* The grid helper finds useful snap 'anchors' as before, including
those involving the construction items.
* Other items on the board can be 'activated' by snapping to one
of their main points. Then, if it has construction geometry,
it will be added to the display. At most 2 items of this kind of
geometry are shown, plus the original item, to reduce avoid
too much clutter.
The dashed snap lines state machine is also handled in the
CONSTRUCTION_MANAGER and displayed in the CONSTRUCTION_GEOM item.
This allows to see what the current snap point is, which is useful when
zoomed in, or the point is like the corner of a rounded pad where it's
"in free space" and might not be immediately obvious.
Includes:
- Fix GAL to draw closed polygons in eeschema
- Add functionality to eeschema to draw arbitary polygons
- Update polygon item previews to have customisable edge colour
- Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
- Add SCH_RULE_AREA to paint and plot methods
- Add new rule area color preference to themes
Adds "UpdatePreferences" action that is called when the preferences are
updated, allowing running tools to act on changes that may affect them
Fixes https://gitlab.com/kicad/code/kicad/issues/9737
* Make the ruler able to switch to mils after creation
* Cleanup an unused flag in Pcbnew dimensions
* Move unit changed notification into EDA_DRAW_FRAME so more
frames to use it.
* Allow switching units when GerbView ruler tool is active
They're only on screen when they're being used, and we don't have
a GAL available to calculate their actual extents from (since their
text scales with zoom).
Fixes https://gitlab.com/kicad/code/kicad/issues/5845
As long as the arc angle stays below <60°, it will automatically choose between
clockwise and counter clockwise. This allows the user to choose the direction
with a simple mouse movement.