Having thread pool as its own singleton in the library meant that each
kiface had its own threadpool, leading to many multiples of the threads
being started. Placing a singleton class in PGM_BASE ensures that all
kifaces use the same thread pool.
The singleton class can be extended to provide single instance
guarantee for any element across kifaces
* Don't hide the annular rings control - makes confusing UI
* Always show annular rings control - all boards must have >2 layers
anyway
* Move into single column of choice boxes to be cleaner and take less
monitor space
https://gitlab.com/kicad/code/kicad/-/issues/19457
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
This means when you switch a pad to be roundable (round rect or
chamfered-with-round), you get the same behaviour as in the dialog
(and an IPC-compliant pad by default).
Also fixes the radius visibility in the properties panel for
chamfered pads (which can have radii).
Also removes Open Directory button as in a job the filepath
will be relative to whichever Output it is placed in.
Also removes the Run DRC button when called from a job.
This prevents the dialog growing too much and going off a
smaller screen. It's also more consistent split to match
Pcbnew, which has the same graphical items settings and
allows more granular resetting and avoids confusing settings
that only apply to new footprints with settings that apply
to items with in a footprint.
Resetting is also then more granular, so you can reset text item
defaults without, say, also resetting your default line widths.
This resolves an inconsistency between Pcbnew and FP editor that means
default dimension properties cannot be set in the FP editor, but the
dimension line widths and text sizes _can_, which can lead to mismatches
between different parts of the same dimension that can't be prevented
except retroactively using the properties tools.
To represent KiCad's internal units (1 nm), it's enough to have:
- 6 decimal digits in mm;
- 8 decimal digits in inches.
There's not much point in reducing the precision.
Up to 10 digits allowed just in case.
Also changes precision to 6 decimal digits by default.
Having Gerber Plot outputs in mm and drill outputs in inches was
causing tiny misalignments. This change switches Excellon output
units to mm by default.
- "Fill all vias" option disables the cut in copper layers which is
important to speed up EM simulations.
- "Cut vias in board body" enables cutting even if copper layer export
is disabled, which is useful if you're using vias as mounting holes.
Related: https://gitlab.com/kicad/code/kicad/-/issues/18735
Fixing this required disabling the footprint/3D viewer canvas drawing
before destroying the canvas in the dialog dtor. This in turn required
adding a virtual method to DIALOG_SHIM that can be overridden by the
derived object to allow performing actions during dialog shutdown that
can be problematic when performed in the dialog dtor. Please note that
this only works for quasi-modal dialogs. Modal and modeless dialogs
should use close window events.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18107
Also adds a cancel confirmation dialog.
Also fixes an issue where a thread termination error message is shown
when calling Delete(), because the thread has already exited after
Wait().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19279
This field was redundant (was generally set to the footprint's LIB_ID)
but also buggy (not guaranteed to contain the footprint's LIB_ID)
and confusing (not a way to change the footprint's LIB_ID).
Technically, any endpoint is equivalent for the
geometry that you get out. But "endpoint" sounds like
it means the point that is not the start point.
So change the tool to explicitly take the start and
midpoint as inputs.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19221
The display in the properties manager for arc tracks
was wrong. Implement a set of Get/SetStartX/Y functions
for the traces, to match the End functions.
This is needed because PCB_ARC overrides GetPosition
to return the arc center, not the start position (whereas
PCB_TRACK does return the start for GetPosition)
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19215
Because it's confusing when the dialog shows last target value, but it
doesn't apply when you start tuning.
Also the last values are remembered in DRAWING_TOOL::PlaceTuningPattern
now, instead of global variables.
Related: https://gitlab.com/kicad/code/kicad/-/issues/18979
(cherry picked from commit a950d55cb2)
- Use board filename in compressed output
- Don't generate uncompressed output next to compressed
- Make clear that the path in the dialog is a folder, not a file
- Handle existing output files gracefully
Handle boolean value parsing during paste operation. The boolean value
was not being handled correctly in grid_tricks, which prevented the
boolean value from being pasted into the target row
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18985
If this enum is not in order, it will choose the wrong tabs.
We can get the tab index directly from the sizers by going
to the parent, which makes this process automatic.
The CTRL_IDX orders are still possible to de-sync, but at least
that's all in the file and not split between CPP/FBP files.
It's not a complete UI for this dialog (especially as the comments
around m_multipleHint->Show( false ) indicate the intent was to
have a multi-selection ability here, but at least there's a way to
confirm what you're about to pick up.
This adds a toggle between outward ( |<--->| ) and inward
( -->|----|<-- ) dimensions.
The original merge request for this feature had more nice
features to it: automatic switching and an 'outward' version of the
radial dimension. However, both of these are very tricky problems, and
need more thought: for example, if the radial dimension is overloaded
into a diameter dimension based on the arrow direction, then you have
implement the fiddly concept of a prefix override, and it also make
the point editor much harder to make seamless.
So, rather then delay the very good and useful upgrade of
the "normal" ortho/aligned dimensions, just sidestep the
issue by not doing the radial lines or auto detection right now.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5819
Provides options for editing the shapes though entry of
different modes, such as "centre/start/angle" for arcs.
Several new modes are implemented.
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/13356
This involves recasting the array tool from the slightly
eccentric ARRAY_CREATOR class into a full-blown TOOL, which
allows it to usefuly store state asd the dialog hides. This
is modelled on the POSITION_RELATIVE_TOOL strategy.
The by-radius-and-point mechanism is removed entirely,
as it's very fiddly and hard to describe in the UI,
and what you probably really want to do is get your
item onto the circle with tools like "move exact",
and then define the circle origin (now using the picker
tool)
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16783
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.
Fix assert ./src/generic/grid.cpp(5216): assert "idx >= 0 && idx < m_numRows" failed in GetRowPos(): invalid row index happening when selecting >= 3 row starting from the bottom last row. Even if not all row are selected.
This happen because wxGrid::DeleteRows will try to update the selected row between each call.
Previously, when attempting to paste an entire row copied from the global
table into a project table, the value would be pasted from the cell where
the cursor was focused, rather than from the first cell. This issue
occurred because the first cell, a checkbox column, was not selectable.
To resolve this, the checkbox column should be enabled for selection
when the Left Mouse Button event is triggered
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18732
This MR adds a new DRC Test provider for the angle between two connected Track segments.
Rule example:
(rule test_track_angle (constraint track_angle (min 135)) (severity error) )
- Implements component classes for placement rule areas and multichannel tool
- Implements property inspector properties for rule areas
- Fixes some zone member default initialisation issues
- Gates all multichannel-related imlpementation with existing adv config flag
- Removes rule area type enum, replaces with inference from keepout and
placement settings
While it's still session-limited, this means you don't have
to restart to get your locking ability back.
Finer-grained locking enablement probably makes better long-term
sense, but this at least prevents "gun shyness" about a setting
you can't turn off again easily.
Also it gets a bool's-worth of application configuration state
out of a dialog (it was a static).
Like the DSNLEXER header, this has visibility in over 700
files, whereas well under half actually use any of it
(quite a bit, but not all, of it actually via DSNLEXER)
Many places already forward-declare the OUTPUTFORMATTER type,
by doing that for the others, it still possible to use the
non-IO methods without having to see richio.h.
CHANGED: PCB file format now supports saving/loading complex padstacks
CHANGED: PTH pads are now rendered per copper layer in the copper color;
the PTH pad color is no longer used.
ADDED: support for importing complex pad stacks from Altium PCBs
Enforce padstack-aware access to pad properties across KiCad
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8182
Break the non-PCB-specfic parts of PCB_REFERENCE_IMAGE out
to a common REFERENCE_IMAGE class, which is then composed into
the PCB_REFERENCE_IMAGE. This will make it easier to bring the
transform origin logic to eeschema without repetition.
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.
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.
Very minor tweaks:
* "When creating tracks" -> "When routing tracks"
This setting affects the router tool, but not, say,
copy/paste or other non-router ways to create tracks.
* The 'Snap to tracks' setting also toggles snapping to
vias, so say so.
Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18508
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