Commit Graph

54 Commits

Author SHA1 Message Date
jean-pierre charras 9fc7281fab Zone filler: fix missing calculation of filled polygons when fill mode is ZFM::SEGMENTS 2019-04-10 18:13:15 +02:00
jean-pierre charras c85d2fd3bf Pcbnew: fix a serious issue in ZONE_FILLER. 2019-04-09 16:34:38 +02:00
Jeff Young 7ceff4cf5d Trim zone fills to board outline.
Fixes: lp:1820306
* https://bugs.launchpad.net/kicad/+bug/1820306

(cherry picked from commit 52e3a1d7c4)
2019-04-09 11:20:03 +01:00
jean-pierre charras aa5a2225e7 Fix incorrect detection of filled zones changes in DRC check.
Commit 6006703798 fixed a crash but broke the filled zones changes detection.
Filled zones were always seen as not up to date due to the fact the filled areas were cleared too early.

The up to date detection is also optimized: the old filled polygons are no longer stored.
Instead of, the MD5_HASH is calculated and stored before clearing the filled polygons.
2019-03-24 15:38:59 +01:00
Seth Hillbrand 37f250b384 pcbnew: Remove fills prior to updates
Removing existing fills will prevent re-drawing invalid polygons before
they are ready.  This seems to happen on Macs more easily due to redraw
timing.

Fixes: lp:1819553
* https://bugs.launchpad.net/kicad/+bug/1819553

(cherry picked from commit 6006703798)
2019-03-11 16:29:02 -07:00
jean-pierre charras 5424223949 Thermal reliefs: fix a corner case that wrongly removes a stub in a thermal shape.
This was due to the stub removal tests if a stub end is outside a solid area to remove it.
There is a corner case: is the stub end is exactly on a solid area outline extra segment
created by Fracture() used in calculations.

The stub removal tests are now made before fracturing.

Fixes: lp:1819317
https://bugs.launchpad.net/kicad/+bug/1819317
(cherry picked from commit b9944e2c06)
2019-03-10 11:50:33 -07:00
jean-pierre charras 2768b3ddbe Pcbnew: fix check zone fills before plotting doesn't test no net zones.
Fixes: lp:1817797
https://bugs.launchpad.net/kicad/+bug/1817797
2019-02-27 11:27:18 +01:00
jean-pierre charras 9cac0a38cc DIALOG_GRAPHIC_ITEM_PROPERTIES: better tooltip.
minor other code enhancement (does not create any actual change)
2019-01-19 12:35:35 +01:00
Seth Hillbrand 6b75f589e9 pcbnew: Do not remove islands from no-net zones
No net zones, by definition, do not connect to any other element.
Therefore, the entire net is an island and should not be removed by the
knockout section

Fixes: lp:1811239
* https://bugs.launchpad.net/kicad/+bug/1811239
2019-01-10 16:17:37 -08:00
Seth Hillbrand 12e0e72107 pcbnew: Don't knock out thermals for non-conn zone
Non-connected zones are, by definition, not connected, therefore, we
should not knock out thermal reliefs under any case

Fixes: lp:1810989
* https://bugs.launchpad.net/kicad/+bug/1810989
2019-01-08 14:24:28 -08:00
Seth Hillbrand 25f8b1ce72 pcbnew: Update multiple zone segments
Where we can get away with lower segment counts (localizing an anchor),
we keep the low-def 16 segment count.  Intermediate values and values
that are visible to the user are set to high definition.  Most are
simply hints to the inflation correction but where they show, the user
show see smooth lines.
2019-01-03 17:34:59 -08:00
Seth Hillbrand 847f6ab4b3 Spelling fix HIGHT->HIGH 2019-01-03 17:10:27 -08:00
Seth Hillbrand 064303e238 pcbnew: Move zone-knockout to default high def
Most rounding operations have been shifted to an absolute error
calculation and the ability to adjust zone segment counts has been
removed in 5.1.  The remaining elements that use fixed segment counts
are either 18 (DRC) or 32 (plotting).  This aligns the punchout segment
count with the higher (32) definition value
2019-01-03 17:09:56 -08:00
Seth Hillbrand 55f2a79957 pcbnew: locking connectivity using RAII
Rather than depend on proper unlocking for each exit, we move the
connectivity lock mutex into an RAII-type configuration that
automatically unlocks on exit.
2018-12-20 11:04:08 -08:00
Jeff Young f69ea8b4a2 Don't cut invisible module text out of zones.
Fixes: lp:1808651
* https://bugs.launchpad.net/kicad/+bug/1808651
2018-12-15 20:15:19 +00:00
Jeff Young dd9a001077 Turn off bugfix for lp:1797787 for 5.1.
This allows people to continue to use the edge-width as a proxy
for board edge clearance until we implement board edge clearance
as a real feature.

Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2018-12-08 17:09:41 +00:00
Jeff Young bcc8c64256 Consider edge cuts items to have zero width when filling zones.
Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2018-11-14 23:45:32 +00:00
Seth Hillbrand 1f25fcd3d6 pcbnew: Shift zone filler to std::async 2018-11-06 09:28:12 -08:00
Seth Hillbrand 4460313104 pcbnew: Separating connectivity to subdir 2018-10-12 16:31:09 -07:00
Seth Hillbrand 10d348999e pcbnew: Fix minor counting issue
The evaluation of count_if resulted in a 0 or 1, leading to segment zone
fills always running on single processor and the progress bar showing
incorrect status.  Likely infrequently hit as only affected segment
fills.
2018-10-09 05:37:48 -07:00
Seth Hillbrand 969e85daa3 pcbnew: Standardize zone fills threading
This is a boyscouting commit to standardize the threading of zone fills.
We do not need to join threads after their completion, instead we simply
allow them to clean up their memory without blocking the user.  This
also sets the maximum number of threads that may be created to the
number of zones being filled.  More than this will only leave un-used
threads being created and immediately killed.

We also include the connectivity search as a phase in the fill progress
reporter.  This was the case before but did not utilize the correct
maxsize, leading to stalled progress bar.
2018-09-21 12:44:20 -07:00
Seth Hillbrand 47fac8a259 Removing some unused code 2018-09-20 12:52:53 -07:00
Jeff Young c90a3efea2 Change KIDIALOG hashing algorithm to __FILE__ + __LINE__.
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).

Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 23:38:23 +01:00
jean-pierre charras d9d005190a Zone filler: fix a recent bug that forgot items on edge_cut when filling a copper zone.
Fixes: lp:1789067
https://bugs.launchpad.net/kicad/+bug/
2018-08-28 09:49:11 +02:00
Jeff Young 0e3919e7aa Fix DRC & zone filling for copper text in footprints.
Also improves handling of copper edges in footprints and of text
and track locations in DRC markers.

Also adds DRC for tracks & zones.

Fixes: lp:1762474
* https://bugs.launchpad.net/kicad/+bug/1762474

Fixes: lp:1788268
* https://bugs.launchpad.net/kicad/+bug/1788268
2018-08-24 10:56:13 +01:00
Jeff Young 99db5cb543 Allow for reduced nagging with wider use of KIDIALOG.
(cherry picked from commit c2dd5df)
2018-07-17 15:13:53 +01:00
Seth Hillbrand ee34aab07a Async hardening
There are three related changes here to harden our handling of threads
in the footprint async loader.

1) Footprint async loader explicitly aborts any remaining loader threads
on exit.

2) We protect the thread join by a mutex

3) We do not pause during no-wait routines
2018-06-04 15:08:40 -07:00
jean-pierre charras e57cd291ff class BOARD: rename m_Zone to m_SegZoneDeprecated to avoid mistakes in code.
m_Zone is a fully deprecated list of SEG_ZONE items (similar to TRACK), used to fill copper zones in *very old* boards.
it is even unlikely there are still boards that use them.
So it should be removed one day.
2018-05-13 08:39:36 +02:00
Jeff Young a31017bc9c Check zone fills before plotting.
Also adds a "Draft Plot" button for those who wish to sidestep
zone checking (which can be slow).

Fixes: lp:1712579
* https://bugs.launchpad.net/kicad/+bug/1712579
2018-05-05 23:40:40 +01:00
Maciej Suminski 684f085ac5 Coverity fixes
CIDs:
dereference before null check:
175439 @ drc.cpp

uninitalized field:
175435 @ point_editor.cpp
174162 @ zone_filler.cpp
163188 @ footprint_info_impl.cpp

logically dead code:
155146 @ pcb_editor_control.cpp
2018-05-04 14:06:08 +02:00
Jeff Young e84e5606c9 Fix compiler warning. 2018-04-17 15:06:38 +01:00
Jeff Young f83ebb316e Don't refill if zone fills aren't out-of-date. 2018-04-09 17:04:51 +01:00
Jeff Young 05dae96275 Move zone out-of-date check to the right place.
Fixes: lp:1760097
* https://bugs.launchpad.net/kicad/+bug/1760097
2018-04-09 15:09:47 +01:00
Jeff Young d54a252eaa Check zone fills for being out-of-date during DRC. 2018-04-09 11:05:14 +01:00
Jeff Young fbf10e941b Switch zone fillets to absolute-error algorithm.
And some general cleanup to related constants, etc.
2018-03-23 12:46:17 +00:00
jean-pierre charras d52491c715 Custom pads: allows solid connection to zones.
The 2 options are now: no connection and solid connection
2018-03-11 20:39:29 +01:00
jean-pierre charras 51fe063524 Circle to polygon conversion: a few enhancements:
* Remove duplicate code
* fix incorrect formulas is some places
* add comments
2018-03-09 13:28:47 +01:00
Seth Hillbrand 218f66a08b Fix sign comparison warning 2018-03-05 09:20:19 -08:00
Jeff Young c77d13292b Reinstate multi-threading in zone filler. 2018-03-03 17:41:53 +00:00
Jon Evans 8c1847f7ab Don't allow ZONE_FILLER::Fill to run more than once at a time 2018-02-23 09:43:23 -05:00
jean-pierre charras 4012aa70da Fix a few minor Coverity warnings 2018-02-15 10:16:17 +01:00
Jeff Young f68bf33cd3 Implement progress reporter for cvpcb footprint loading.
Fixes: lp:1676910
* https://bugs.launchpad.net/kicad/+bug/1676910
2018-02-13 20:21:38 -05:00
Maciej Suminski 86566fc142 Fix a hang-up during zone filling
On OpenMP single core systems only the first thread launched. It means
that only the UI updating thread was running, without the one
responsible for actual computation. It is fixed by enforcing at least
two threads.
2018-02-09 14:26:06 +01:00
jean-pierre charras 81642dddd1 Track polygon clearance: use the new TransformOvalClearanceToPolygon function, to avoid underestimation of clearance areas.
(issue already found for oval pads)
Add some comments.
2018-01-21 11:32:37 +01:00
jean-pierre charras 67a152ee8d zone filler: fix incorrect calculation of segments when filling zones with segments.
The calculation was made too early, before removing insulated islands.
Note: filling zones with segments is an old option, not very useful:
using only polygons has never created issues in gerber files.
2018-01-14 09:51:32 +01:00
Jon Evans 47b8b6dc6a Fix typo causing isolated thermal removal to not work
Fixes: lp:1741265
* https://bugs.launchpad.net/kicad/+bug/1741265
2018-01-06 16:55:02 +01:00
jean-pierre charras 2398d5ef8b DIALOG_EDIT_COMPONENTS_LIBID: enhancement in orphan automatic remap:
add dialog to choose the right candidate when more than one is found
2017-12-16 14:50:37 +01:00
Tomasz Włostowski 75b21d010b pcbnew: more thread (and nested wx event loop) safety for the zone filling/connectivity algo 2017-12-14 23:49:46 +01:00
Tomasz Włostowski eed924fe45 Fixed zone filling crash & thermal stubs inconsistency
Fixes: lp:1737557
* https://bugs.launchpad.net/kicad/+bug/1737557
Fixes: lp:1737542
* https://bugs.launchpad.net/kicad/+bug/1737542
Fixes: lp:1737541
* https://bugs.launchpad.net/kicad/+bug/1737541
2017-12-14 01:29:08 +01:00
Maciej Suminski f19aed9d5c Workaround for OSX freeze when filling zones in GAL
More details:
https://lists.launchpad.net/kicad-developers/msg32306.html
2017-12-11 10:39:58 +01:00