We only need one bottom to top layer sequence definition.
Plot a sequence of layer IDs (LSEQ) in the order of the sequence.
Add helper method to layer set (LSET) to create a sequence of layer IDs
using another sequence for ordering.
Fixes:
* Various special cases around junctions on pins and dragging.
* Some rotations of endpoints resulting in a 45 degree rotate.
* Some cases where it was possible to get a line with neither
endpoint selected, and also substractive unselecting only one of two
selected endpoints unselecting both.
* Use line midpoint for sorting. Start and endpoints aren't
consistent in the order they appear on the X or Y axis. So,
we need to use the midpoint for our position for consistent
sorting when dragging groups of parallel lines where some
have the start and end reversed.
Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
of the flag, and should reduce confusion as
to when it should be used.
* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
instead.
* Fix mistaken clearing of START_POINT and ENDPOINT.
* Move endpoint setting and clearing out of narrowSelection, and into
selectPoint and selectMultiple.
* Don't show dangling end warnings on new lines
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes#11196https://gitlab.com/kicad/code/kicad/issues/11196
When moving windows between monitors on Mac that changes the DPI, we
observe incorrect re-sizing of columns and rows. This attempts to
rectify the situation by avoiding DPI changes for Mac builds.
Fixes https://gitlab.com/kicad/code/kicad/issues/10586
When building the connectivity database, we should not be using the
connectivity to check for shapes.
To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not. ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal. If they are not marked for removal,
they will be checked ALWAYS_FLASHED.
Fixes https://gitlab.com/kicad/code/kicad/issues/11114
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation. Saving back to disk without
modifying the arc should not modify the calculated values.
This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10442
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus. This increases the maximum popup number (integers are free)
(cherry picked from commit 79b6991d7b)
This is for the out-of-box experience for novice users. It is presumed
that folks with larger more complicated boards will turn it off.
Fixes https://gitlab.com/kicad/code/kicad/issues/6413
It avoid trying to calculate arc angles (start, end or arc angle) that
frequently create issues due to reverse Y axis, plot mirrored and/or
angle normalization with different criteria.
Fixes#10914https://gitlab.com/kicad/code/kicad/issues/10914
When setting previous values, we don't get the "OnFocus" event, so the
evaluation would not get triggered by simply repeating (using the
keyboard)
Fixes https://gitlab.com/kicad/code/kicad/issues/10752
(cherry picked from commit 4c81307391)
We need the item to be currently selected when repeating the last symbol
insert. This ensures we have a valid selection before starting the move
tool and possibly getting odd system behavior from mouse positions
Fixes https://gitlab.com/kicad/code/kicad/issues/10619
(cherry picked from commit 7642a9db79)
Also fixes some plot bugs with arcs.
Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.
Fixes https://gitlab.com/kicad/code/kicad/issues/5017
Use 4 digits in mantissa as default and when exporting SVG.
Allow 0 as line width: this is the right value to draw filled shapes with no outline thickness.
The 3D mouse support is moved from PCB_EDIT_FRAME to PCB_BASE_FRAME.
This allows all PCB_BASE_FRAME derived windows to have 3D mouse enabled
2D navigation support.
Instead of the mouse move and zoom algorithms calculating the new
position or scale values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or zoom the view at the same time
without its change being undone by the mouse.
The zoom selection should only change when requested by the user, not in
response to UI updates. This can cause unexpected zoom shifts when the
calculated zoom is within a range of one of the presets. It also adds
unneeded calls during the UI update cycle
Fixes https://gitlab.com/kicad/code/kicad/issues/10498
(cherry picked from commit 6810479a19)
Includes bug fix for catastrophic error in Add() for converting to
radians.
Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
Putting 1,000s of tiny triangles on a gerber file will cause mfg fits.
Instead, we use easy outline plotting for plots and triangulation for
everything else.
Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed. Closed will remove
the last segment if it lands on the first point. We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)
Fixes https://gitlab.com/kicad/code/kicad/issues/10334
(cherry picked from commit 55020c2b89)
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
Mesa does not support adaptive swapping but will sometimes report that
it does. This prevents Mesa drivers from testing (and segfaulting) the
limits of their call
Fixes https://gitlab.com/kicad/code/kicad/issues/10069
(cherry picked from commit 100cf757fe)
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support. This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)
Fixes https://gitlab.com/kicad/code/kicad/issues/8944
(cherry picked from commit 7c9340f855)
This one is primarily about pushing TEXT_ATTRIBUTES in to the GAL
API, but it also includes adding EDA_ANGLE signatures to some trig
routines to ease integration.
This only affected the tree controls that only parented sub-pages. Do
not use the dialog ctor to select the initial page. Queuing a page
changed event to fire after the dialog is shown is the proper solution.
Also includes going from distance-based neighbor exclusion to angle-
based. (Distance doesn't work when very short segments are followed
by very long ones.)
Fixes https://gitlab.com/kicad/code/kicad/issues/2512
ADDED arc, circle and rectangle shapes for schematic. Shapes support
line styles and fill colors.
CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).
Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors
Fixes https://gitlab.com/kicad/code/kicad/issues/9963
Also regularizes some of the other selection filtering options.
This also fixes an invalidated iterator (and subsequent segfault) in
the old code.
Fixes https://gitlab.com/kicad/code/kicad/issues/9896
Improves rendering performance, esp. for large designs by:
- using a separate glDrawArrays calls() for large buffers of contiguous vertices (e.g. large zone fills)
- pooling smaller items into a small-sized index buffer held in system RAM (has to be DMAed to the GPU by the driver anyway)
CHANGED: Removed "ForcedCursorPosition()" and "IsCursorPositionForced()"
from view_controls.h. First, these functions are completely redundant
as they do the exact same thing but have different names. Second,
neither is called anywhere in the entire KiCad code base.
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
Processing a menu event for quitting results in the frame being
destroyed. This crashes the program when it tries to access the newly
freed frame to check for autosave data. We bind the closing flag into
the base program which will be the last item freed on exit to ensure we
can correctly check for data loss
Fixes https://gitlab.com/kicad/code/kicad/issues/8638
The overload of wxFilePath::FindValidPath() broke the normal behavior
when the file searched for existed in the current working directory.
This was causing the initial library table file to be copied from the
current working directory instead of from the list of search paths.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9599
`wxLaunchDefaultApplication()` fails on files with spaces on Unix
systems due to a programmer error. This is fixed in newer wxWidgets
versions, so let's backport it as a workaround.
The old algorithm treated the "Words" checkbox as meaning match the
entire text, not match words, which is unlikely to be what anyone is
expecting.
Also fixes replace to replace all instances in a single text item
rather than just the first.
Reported on the forum.
Text has a fairly big bounding box to account for descenders, overbars,
etc., but it makes it feel too sloppy for hittesting. This change
allows selection disambiguation to look at the actual strokes of the
text when deciding what's "closest".
Fixes https://gitlab.com/kicad/code/kicad/issues/9506
ADDED: Option to assign unique reference designators to footprints
created with the array tool [pcbnew]
CHANGED: Array creator dialog no longer displays pad numbering properties
when in the board editor. [pcbnew]
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2354