Commit Graph

264 Commits

Author SHA1 Message Date
Jeff Young d67437a2aa Move ratsnest exclusion processing to a post-pass.
Also fixes a few cases where we were unnecessarily rebuilding
connectivity more than once for an operation.
2022-09-29 17:08:49 +01:00
Jeff Young 503385f52e Don't use FindNamedPad for net-tie logic. It only reutrns the *first*
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
2022-09-25 17:38:31 +01:00
Seth Hillbrand 9b4eb91f12 Zone Fill performance enhancement
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
2022-09-19 11:53:50 -07:00
Seth Hillbrand 0295090135 Zone Fill performance for overlapping zones
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.
2022-09-19 10:11:06 -07:00
Marek Roszko 3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko 66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Seth Hillbrand 8e361e8a15 Be more diligent about checking for zone file deps
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
2022-09-16 17:23:06 -07:00
Jeff Young 19d8dcad8b Don't hang when filling degenerate zones. 2022-09-15 23:16:08 +01:00
Seth Hillbrand 26a1114e3c Avoid Yields when the results are ready
We always need to check for calculation results before yielding the
system otherwise we will delay outcomes

Fixes https://gitlab.com/kicad/code/kicad/issues/12228
2022-09-14 13:30:04 -07:00
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
jean-pierre charras 5616ef2e7c ZONE_FILLER::buildThermalSpokes() fix incorrect spoke shape for pad shapes with offset.
Fixes #12201
https://gitlab.com/kicad/code/kicad/issues/12201
2022-08-10 15:27:28 +02:00
Jeff Young 96f01d33c8 Performance improvements.
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
2022-08-03 11:59:42 +01:00
Jeff Young 43df863df2 Fix issue with caches not being initialized when printing msg bar. 2022-08-01 13:09:51 +01:00
Seth Hillbrand 03c279ffd4 ADDED: Threadpool
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
2022-06-24 22:59:24 +00:00
Jeff Young f2c26ae528 Formatting. 2022-06-08 23:53:18 +01:00
Jeff Young fa11e1c097 Take text height into account as well as thickness for knockout margin.
Also centralizes calculation so all clients will get the same answer.

Fixes https://gitlab.com/kicad/code/kicad/issues/11636
2022-05-20 12:29:01 +01:00
Jeff Young cc86d3da2a Give up trying to find a one-size-fits-all boudningBox for text.
Fixes https://gitlab.com/kicad/code/kicad/issues/11636
2022-05-18 17:14:57 +01:00
Jeff Young 30ecca464d Rename mechanical_clearance -> physical_clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/11554
2022-05-06 15:54:46 +01:00
Jeff Young 371091a09b Make zone filler respect mechanical clearances. 2022-05-06 00:06:00 +01:00
Jeff Young 5d0d2201f3 Improve clearance report messages.
Removes some duplicated terms; puts in some more headers to make
visual parsing easier, and makes non-connected-pads report the correct
data.

Also fixes a bug where zone-connection overrides of none weren't getting
handled correctly.

Fixes https://gitlab.com/kicad/code/kicad/issues/11544
2022-05-03 16:30:04 +01:00
Jeff Young 604a148f40 Don't apply electrical clearance to shapes on Edge.Cuts.
Also don't apply them to NPTH holes.
2022-04-13 23:38:45 +01:00
Jeff Young 1dae5eb7c4 A better blob vs web detector.
Since we're in a deflated state, a long web *could* still have a very
small area.  So check max extents instead.
2022-04-10 19:48:45 +01:00
Jeff Young 1a2e0d8226 Apply the min-width-by-min-width test to islands after pruning.
We're looking for minimum *web* width.  A blob does not a web make.

Fixes https://gitlab.com/kicad/code/kicad/issues/6907
2022-04-10 18:21:31 +01:00
Jeff Young fd9fd1df05 Careful of skipping non-flashed pads for performance: they might still have a hole. 2022-04-04 15:03:01 +01:00
Jeff Young 65185f53a1 Rotate fp zones before comparing with library versions.
Also includes some performance fixes to not copy around triangulation
data when it's not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
Jeff Young f6dac9eb13 Support text knockouts in non-copper zones. 2022-03-08 18:06:41 +00:00
Jeff Young 23088e6e1a Minor performance enhancements for zone filler.
Be smarter about not knocking out some classes of pads twice.
2022-03-05 20:32:08 +00:00
Jeff Young fed5bcbdf6 Improvements for pads/vias in zones which knockout other zones.
1) Drop tiny islands which might cause connection problems.
2) Cleanup some dead code in filler
3) Don't estabilish a connection to an island that is fully covered
by whatever its connecting to.

Fixes https://gitlab.com/kicad/code/kicad/issues/11036
2022-03-05 18:59:53 +00:00
Jeff Young 878c4d2f6b Must clear arcs before calling Clipper. 2022-03-05 18:59:53 +00:00
Jeff Young 843a56c4e4 Implement two-staged zone priority: assigned priority followed by UUID. 2022-03-01 14:53:35 +00:00
Jeff Young e6c617b74d Respect ERROR_OUTSIDE when inflating polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/10896
2022-02-21 15:19:46 +00:00
Jeff Young 81bed9ab96 Add zone margin when subtracting other graphics and zones.
It was already added for pads and tracks, but not the other objects.

Fixes https://gitlab.com/kicad/code/kicad/issues/10896
2022-02-18 13:20:36 +00:00
Jeff Young b1bd8421e0 Performance: remove associated triangle sets when removing outline.
This saves us having to re-triangulate at the end of zone filling.
2022-02-16 17:00:54 +00:00
Jeff Young 327ddad79f Performance: get rid of rawPolys / finalPolys distinction.
(The final fractured polys are required, and we don't really ever use
the raw polys anyway, so they were removed.)
2022-02-16 15:33:12 +00:00
Jeff Young 2172810600 Performance: better sharing of zone fills. 2022-02-15 19:19:03 +00:00
Jeff Young d8c4f2cb09 Performance improvements for zone filler. 2022-02-15 19:19:02 +00:00
Jeff Young 3deaf902bb Retire the V5 zone fill algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/10578
2022-02-11 13:10:52 +00:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
jean-pierre charras aef665b1e2 PCB_TARGET: add missing TransformShapeWithClearanceToPolygon() method.
Fixes #10653
https://gitlab.com/kicad/code/kicad/issues/10653
2022-01-29 18:19:22 +01:00
Jeff Young 4eac8d7c66 Remove unit-less angles from geometry lib APIs. 2022-01-20 21:10:04 +00:00
Jeff Young 038db715a3 Move zone hatch orientation to EDA_ANGLE. 2022-01-19 00:34:03 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young d485eb2514 Move pads to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
jean-pierre charras ac78d51b14 Teardrops: better dialog, and better code 2022-01-10 20:04:41 +01:00
jean-pierre charras 53770fec68 Ensure thermal spoke widths are smaller than the pad size (fix a regression)
This is needed to create good thermal reliefs, and ensure the DRC about
thermal spoke count works.
Fixes #10246
https://gitlab.com/kicad/code/kicad/issues/10246
2022-01-07 16:38:27 +01:00
jean-pierre charras 7fa451dc93 Thermal reliefs: fix incorrect calculation
commit eeef655 did not fix the calculations.
2022-01-06 09:00:29 +01:00
jean-pierre charras eeef65533a Pad Thermal Reliefs: fix spoke incorrect angle for rotated pads.
Fixes #10251
https://gitlab.com/kicad/code/kicad/issues/10251
2022-01-05 11:19:43 +01:00
Marek Roszko ea613cf448 Another batch of point changes 2022-01-01 13:17:12 -05:00