Needed to find bottlenecks in fns, so break out individual sections of
the massive function for easier understanding.
buildItemSubgraphs (one section of the previous function) would build
millions of connections that were never used as stacked pins created X!
connections. Also tested using sets instead of lists and keeping unique
lists to avoid flagging but none of these were as performant as using
flags to remember which items had already been processed.
Fixes https://gitlab.com/kicad/code/kicad/issues/10974
The previous solution cleared all of the fields and force the unit setting
to unit one which would have less than desirable effects when reusing a
schematic in another project. This solution forces all of the instance
settings to the first sheet instance of the current project to prevent file
change churn when changing shared sheets in the current project.
This will not prevent shared schematic file changes when the first sheet
instance data differs between projects.
(cherry picked from commit dd1dbb81f6)
MacOS packages are signed and checked on each run. Since Python lives
inside the package, adding byte code will break the package signature
(cherry picked from commit 5881471a52)
Inflate with linked holes needs to account for fractured polygons,
otherwise inflating with positive value will create rounded divots where
overlapping fracture lines meet and inflating with negative value will
create spaces between fracture lines.
Calling Simplify before Inflate takes an inordinate amount of time as
the Clipper healing routine is rather slow. Our own Unfracture is meant
to heal the results of our Fracture routine and works much more quickly.
After healing, we still call the Simplify routine
Double-calls are no longer needed when using settings. They can
interfere depending on how the system executes the commands.
Removing keeps the last used plugin as the default, rather than the last
selected
Fixes https://gitlab.com/kicad/code/kicad/issues/11094
Clipper can handle complex input polygons but we will sometimes struggle
dealing with outputs from the inflate routine that have degenerate or
overlapping points. Calling Simplify after the inflate keeps our
polygons easier to handle
Fixes https://gitlab.com/kicad/code/kicad/issues/11036
Adding a page in the ctor can generate events that change the default
page. Instead, we set the default after all pages have been added,
avoiding the reset
Fixes https://gitlab.com/kicad/code/kicad/issues/10910
The comment regarding bitmaps was true for one more month in 2018, but
hasn't been true for the last 3 years, and clearing the cache is a huge
performance hit.
(cherry picked from commit d58427a519)
We no longer need the arbitary offset when we are calculating collisions
based on values that are not nm off from a "round" value.
(cherry picked from commit 2200c1319d)
Since we use center points to move back and forth for angle and
adjustments, we want to ensure that our center point is stable.
Rounding using integers introduces a 0.5 int uncertainty in each
measurement. These are combined together multiple times to calculate
the center point, which combines the uncertainty. Propagating the
uncertainty to the final calculation allows us to assign a range of true
values and pick the value that is most likely the correct value.
Fixes https://gitlab.com/kicad/code/kicad/issues/10739
(cherry picked from commit ed7222b1e7)
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
(cherry picked from commit cd7141fd10)
Avoid excess writes to the project directory to dodge issues with remote
file systems not fully writing data.
wxRename works across disk boundaries (in theory) and falls back to
wxCopy/wxRemove when it fails
Fixes https://gitlab.com/kicad/code/kicad/issues/10747
Our heuristics for determining when to append to the undo aren't
sufficient for the two segments of a broken wire. One is new and the
other is changed, but the drag should be appended to the current undo.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10865