* 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.
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
Adds REPORTER::HasMessageOfSeverity for WX_STRING_REPORTER,
which allows us to show simulation warnings and fail only if there's errors.
Also fixes a crash when SPICE_GENERATOR_KIBIS throws an IO_ERROR.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18143
The approx was 36 segments per 360 deg. But this is not good for arcs having
A small arc angle and a large radius.
The fix uses a max error (currently 5 microns) to calculate the approximation.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18587
Also fixes grammar and capitalisation in a few tooltips.
Also standardises some terminology, such as
"Add" vs "Draw"/"Place" and "Assignment" vs "Association".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17694
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().
The separates it from the LAYER_SELECTOR class - deciding
what color a layer is (say) is separate to managing the
actual selection of the layer. For example, sel_layer.cpp
only needs the presentation logic. This also makes it eaiser
to compose rather than inherit.
Additonally, break out the layer pair swatch function
to this class.
This will also be needed by the layer pair manager UI.
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/15227
We are derived from std::vector now. We don't need our own prima donna
increment and dereference overload as these just create bloat and
non-standard coding practices