Having a lot of errors can happen when trying to open a non gerber files
(this is easy when loading a zip archive).
With a *lot* of errors (if a large .step file is found) Gerbview can hang.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20799
* Manage the settings using the settings manager for better lifetimes
* Better architect the internals and JSON to make it easier to identify
the various tool types
On copper layers, all lines are exported as tracks, so they always use a round
aperture.
Note also rect aperture to draw lines and arcs are deprecated since 2020
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19553
The GL context lock needs to be shared across kifaces. Otherwise, we
can end up blocking the lock from one kiface. Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts. But that's what this
fixes.
Make the VIEW* parameter const. Since PCB_TEXT does a null-check,
it's not very clear if this can ever be null (and if it is,
why don't the other VIEW_ITEMs check?), so don't make them
all references too at this time.
Also dereference a few pointers a bit earlier to make non-null
promises sooner rather than later.
Saves a mishmash of local HIDE/SHOW defs along with various literals.
Also provide a function that computes the scale at which a given
IU size becomes (notionally) a certain size on screen. While this
is a simple division, it's a bit opaque in terms of meaning.
Also it means the divide by zero case can be more universally
defended-against, which has traditionally been a bug opportunity.
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
Currently, the Gerber file is parsed line by line, This is most of time OK.
But warning: in rare cases some files can have *very long* lines (in fact
have only one line), so the buffer must be very large.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18890
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.
On msys2 a link issue (3 undefined symbols) prevent Gerbview to be built.
So I added this option (KICAD_ENABLE_3DMOUSE_GERBVIEW, enabled by default)
to disable 3Dconnexion support on request.