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
This also fixes a failure to use the correct effective width for
shapes (which might, for instance, inherit their widths from schematic
defaults, netclasses, etc.).
Fixes https://gitlab.com/kicad/code/kicad/issues/11358
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
(cherry picked from commit 9ca35cbcee)
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
(cherry picked from commit a24cdcb3f0)
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