The hash table for integer hashes is extremely limited and places most
elements in the same buckets. This leads to a linear search time for
structures built on this.
This blocks hashes, directing the coder to utilize std::set or std::map
structures instead of hash tables for implementing integer-based
lookups.
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference
Fixes https://gitlab.com/kicad/code/kicad/issues/12130
The change in c9c31fcbc2 missed a number of cases. This reverts back to
the system as it existed before 2be352b9f9
but using the revised method of determining A-B-C distance and avoiding
resizing the arrays
(cherry picked from commit 675a5a6e7b)
Fixes a slowdown caused by erasing elements from the middle of a vector
during a hot loop in SHAPE_LINE_CHAIN::Simplify(). This gets called
quite a bit when loading boards and updating lines, so it needs to be as
fast as possible
Fixes https://gitlab.com/kicad/code/kicad/issues/12115
(cherry picked from commit c9c31fcbc2)
Placing via in walkaround mode and colliding with an arc triggered an
unneeded assertion.
Also fixes the bad assertion format that did not receive strings
(cherry picked from commit df9cf0a0c3)
In addition to showing resolved clearance, we also show the calculated
clearance in the same method as is used for DRC. This will allow users
to better examine their system while working.
Fixes https://gitlab.com/kicad/code/kicad/issues/7934
The fractional part of Altium schematic units is an integer number of
1/10000 mil segments, which is 2.54 nm. The internal unit of eeschema
is 10 nm, so each fractional unit in Altium is 0.254 base eeschema
units. To be consistent with
cf33cfcad1
we round to the nearest 10nm for each element
Fixes https://gitlab.com/kicad/code/kicad/issues/11742
We now test the midpoint (B) of the 3 consecutive polyline points (A, B, C), since (assuming the angle between AB and BC is > 90 degrees) AC is always longer than
AB or BC. This minimizes the distance computation rounding error (in the previous algorithm, taking the point C for colineraity test) if AB is short and BC is very long, the test would
often fail due to rouding error in projection/line distance computation
We can't know that all holes will be ccw when entering unfracture.
Instead, we set the largest polyline to be the outline and the others to
be the holes.
(cherry picked from commit 1fe956c069)
Mainly CacheTriangulation() was creating triangles using partition mode.
But this mode is optimized for Pcbnew and Gerbview and different internal units.
Now CacheTriangulation() is used in no partition, much faster in GERBVIEW_PAINTER.
Fixes#11549https://gitlab.com/kicad/code/kicad/issues/11549