When filling the zone for the NPTH, the hole should not be considered as
a copper element in terms of clearance. This prevents close but
different knockout elements from being formed
Rounded line ends when deflating leads to microscopic jags in the
outline that are not visible but add substantial computation time and
minor error when computing polygon offsets.
Instead, the chamfer deflate method prevents these jagged lines by
clipping angles < 90° by the error level. This does not impact deflate
calls where we explicitly require the angles to be maintained
When two zones with the same net and same priority overlap, they should
both be filled, matching the behavior of v6. If you would like an
explicit override of one or the other, you need to set the zone priority
higher. Relying on the UUID as a tie breaker is good for zones with
different nets but creates unexpected changes from v6 when applying it
to zones of the same net
This makes it clearer that the overrides are not inverses of each
other -- one overrides the flashing state and the other overrides
the connection state (to other zones, not to everything).
Also fixes a bug where we were failing to check the force-no-connect
for pads.
If removing unused via annular ring option is enabled on a layer, then the via will have the ring if both:
- Via center is not inside a rule area with "Keep out copper fill" flag set
- Highest-priority zone the via hole intersects with has the same net
Pads will be flashed if:
- Pad center is not inside a rule area with "Keep out copper fill" flag set
- Highest-priority zone at the pad center has the same net
Fixes https://gitlab.com/kicad/code/kicad/issues/12964
Just testing a single point to find copper that is outside the board works
until the arc->segment conversion moves the board outline just enough to
have the filled copper slightly (few IU) outside of the converted outline.
Instead, we do an expensive check of comparing the size of the
intersection between the island and the island's intersection with the
board. If the intersection is at least half as large as the original
island, we can say with certainty that the island is inside. The margin
could be much smaller than half but this preserves the intent without
picking an arbitrary number that might be violated
Fixes https://gitlab.com/kicad/code/kicad/issues/13717
Also ensure that calculated areas for island removal are absolute.
The on-outline zone can happen when the clearance to the edge is
particularly small.
Fixes https://gitlab.com/kicad/code/kicad/issues/13717
It is hard for a user to tell what is going on when their zone
just doesn't fill at all. We catch isolated areas in the DRC so
we can just leave them alone here until the zone has at least one
non-isolated filled area.
Also change default back to always remove islands to reduce confusion
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13271
We can't fill lower-priority zones until the higher-priority ones
have been tesselated, and as the tesselation step always gets pushed
to the back of the queue after the fill finishes having them sorted
by priority accomplishes little. (We're also going to push all other
layers of the high-priority zone to the back as the first layer will
have the lock, further degrading the usefulness of sorting.)
If the pad hasn't already been owned by another zone, and the zone we're
currently filling can connect to it, then we want to try to flash it even
if it's not connected to anything else.
Fixes https://gitlab.com/kicad/code/kicad/issues/13415
Handles cancellation in main fill loop. Allows loops to finish without
restarting new ones. Further enhancement might allow breaking threads
cleanly but this gets 90% of the cases
Fixes https://gitlab.com/kicad/code/kicad/issues/12693
1) The highest priority zone that a via/pad collides with "owns" its
connectivity state. Once set, lower priority zones cannot change it --
and in fact, if they would have connected to it are forced not to.
2) The connectivity state goes with the zone fill state, and therefore
must be saved in the file.
3) Display of remove-unconnected's pads is no longer done in GetViewLOD()
(which isn't called for selected items), and is instead done in PCB_PAINTER.
This allows us to draw the full pad in outline mode when a via/pad is
selected which would otherwise only show the hole.
4) Note that in some cases this will still generate DRC errors -- in
particular when a via nearly collides with a higher priority zone it
won't get "owned" by that zone and may therefore have insufficient
clearance if said zone concludes it's unconnected and a subsequent
(lower priority) zone connects to it (causing it to now become flashed).
Fixes https://gitlab.com/kicad/code/kicad/issues/11299
pad of a given number.
Also improves other DRC logic to tighten up the net-tie rules now that
we know which pads are allowed to short with which other pads.
Also removes the "Overlapping pads" DRC violation now that we know
whether or not overlapping pads in a net-tie footprint constitute a
short.
Fixes https://gitlab.com/kicad/code/kicad/issues/12506
Don't wait until all zones are filled before tesselating fills.
Tesselation happens on a layer-by-layer basis, so once the zones' layers
are filled, we can tesselate them in parallel with the remaining fill
work
When multiple zones overlap each other, we need to synchronize the
filling. This should not wait for all zones to try to fill before
restarting. Instead, zones that cannot be filled because the depend on
another zone finishing are immediately re-inserted into the fill queue.
The outline collision is relatively cheap (especially after filtering
bbox collisions) so check if a zone REALLY depends on another zone
before making it wait. Waiting for zones can really increase the total
fill time
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
Thread pools are long-lasting executors that have close to zero overhead
when launching new jobs. This is advantageous over creating new threads
as we can use this for threading smalling jobs and smaller quanta. It
also avoids the heuristics needed to determine the optimal number of
threads to spawn