Commit Graph

16012 Commits

Author SHA1 Message Date
Marcus Comstedt 9cb60dcdf5 Cairo GAL: fix incorrect use of pixman formats
Fixes https://gitlab.com/kicad/code/kicad/issues/3970

(cherry-picked from 55ac575a88)
2020-04-15 01:29:50 +01:00
Jon Evans af6db68816 Defer image surface destruction until next paint
Fixes #4043

(cherry picked from commit 23c1baae8e)
2020-04-15 01:18:55 +01:00
Adam Wolf 305ed0b65a For macOS, fix KICAD_BUNDLE_LIBS in ogltest.
(Cherry-picked from e143ecbf40)
2020-04-10 20:09:34 +01:00
jean-pierre charras 263efb41e8 Gerbview: fix incorrect rendering of oval vertical standard aperture with hole.
Fix also incorrect display of dcode size in toolbal: was Y size, X size.
Now is X size, Y size as expected.

From master branch
2020-04-10 16:26:38 +02:00
jean-pierre charras d6312c7b92 Gerbview: add a error message for invalid files missing G74 or G75 commands.
They are mandatory to read arc coordinates.
2020-04-10 13:38:11 +02:00
Jeff Young b31af4891d Be smarter about determining if there are modules in the selection list.
The old algorithm would delete modules if another module was in the
list, which was not the intention.

Fixes https://gitlab.com/kicad/code/kicad/issues/4175
2020-04-09 00:07:07 +01:00
Adam Wolf 0ba08f57f2 Add macOS KICAD_BUNDLE_LIBS search path for bundle fixup.
(cherry-picked from ac20428b82)
2020-04-03 01:39:31 +01:00
Wayne Stambaugh a2d7881afe Fix cherry pick error on previous commit. 2020-04-02 16:09:25 -04:00
Wayne Stambaugh d79e598bf8 Eeschema: fix symbol cache library look up bug.
Use an underscore character instead of a semicolon between the library
ID library nickname and symbol name in library ID search strings when
looking up symbols in the cache library since that is how they are saved
when creating the cache library.  This fixes rescuing missing symbols
from the cache when they have been removed from the original library and
preventing a broken symbol link indicator from being shown when a symbol
is removed from the library.

Add some defensive testing to make sure the library passed to function
SchGetLibPart() is actually the cache library.

(cherry picked from commit f6d7ef367d)
2020-04-02 16:04:59 -04:00
jean-pierre charras a6a39cb842 Gerber plotter: Non horiz or vertical oval pads: better plot output:
These pads were plotted as a segment. This is not the right way:
Pads must be flashed or plotted as regions, not painted.
They are now plotted as Gerber regions round rectangle pads.
These regions are similar to flashed pads.

From Master branch, commit de7154e8e.
2020-04-02 19:50:59 +02:00
Wayne Stambaugh 5d0883c0e4 Eeschema: fix rescue multiple unit symbol bug.
The code that checked for pin conflicts to determine if a symbol needed
rescued did not check either the pin convert setting so it was possible
for a pin from the other convert on symbols that do not have identical
units to appear to not have a pin conflict.  Add tests for pin unit and
convert setting to prevent that from breaking the comparison.  This must
have always been broken.

Fix the symbol preview widget to prevent drawing all symbols on top of
each other (if we need to do this the code will have to be revised) and
also show the convert if valid.

Fix broken symbol cache library when saving alias symbols.

Fixes https://gitlab.com/kicad/code/kicad/issues/3879

(cherry picked from commit e91f1f57dd)
2020-04-02 09:31:25 -04:00
Seth Hillbrand e6d49424cf PNS: Don't link unroutable items
The joint map only works for items that are routable, so don't bother
adding unroutable items as this only takes additional time to process

Fixes #3976 | https://gitlab.com/kicad/code/kicad/issues/3976

(cherry picked from commit 9769e1020b)

Fixes https://gitlab.com/kicad/code/kicad/issues/4143
2020-04-01 08:31:57 -07:00
Seth Hillbrand 72abcd5991 Correct cyrillic 'f' in newstroke
The lowercase greek phi had been used which did not match the cyrillic
f.  We use the variant of phi that includes the full strokes instead.

Fixes #3898 | https://gitlab.com/kicad/code/kicad/issues/3898

(cherry picked from commit 39a45f2a81)
2020-04-01 08:31:14 -07:00
jean-pierre charras 9c2bb85858 3D viewer: fix a minor problem: to many rotations when typing
Shift+z or Shift+y more than once.

From master, commit 00d9e77e
2020-03-31 17:48:50 +02:00
Jeff Young e9b059ee94 Re-implement change from cbef95256b
Fixes: lp:4103
* https://bugs.launchpad.net/kicad/+bug/4103
2020-03-30 20:24:08 +01:00
Ian McInerney 7a913844e2 Fix discrepancy between ASCII and CSV fp pos files
(based on 570ea62b64)

Fixes https://gitlab.com/kicad/code/kicad/issues/3897
2020-03-30 10:42:15 +01:00
jean-pierre charras f8be7e1f57 Gerber X2 format: Set default values to Enable X2 format 2020-03-29 15:37:36 +02:00
jean-pierre charras d5c43c4675 Gerber: fix a minor issue in OBLONG standard aperture: - incorrect (too big) bounding box. - HitTest did not test the exact shape. 2020-03-27 16:19:22 +01:00
jean-pierre charras 85fa6d8025 3D viewer: apply patch from master 04d6ea982.
The 3D viewer does not show the issue on solder paste layer having
negative clearance.
However the bug was here and not seen just because some draw code was different:
The code tried to draw outlines with segments having a negative thickness.
It happens mainly on solder paste layers.
2020-03-27 10:36:14 +01:00
Ian McInerney 6b2a8f54a1 Check for file writability before saving part
This is a 5.1 only fix for this crash. Fixing in master requires
a major refactor of the library writability detection code.

Fixes https://gitlab.com/kicad/code/kicad/issues/3864
2020-03-25 13:23:49 +00:00
jean-pierre charras bd1fb845b1 3D viewer: fix a minor issue in solder paste rect pads:
the solder paste mask clearance was no taken in account
for rect and trap shapes.
2020-03-25 13:47:48 +01:00
jean-pierre charras 9c64c9af5d Kicad manager: fix an issue on Windows when killing Kicad.
For some obscure reason, on Windows, when killing Kicad from the Windows task manager
if a editor frame (schematic, library, board editor or fp editor) is open and has
some edition to save, OnCloseWindow is run twice *at the same time*, creating race
conditions between OnCloseWindow() code.

Fixes #4072
https://gitlab.com/kicad/code/kicad/issues/4072
2020-03-25 09:51:12 +01:00
jean-pierre charras 1057eceb2f Gerber plotter: plot round rectangle pads using a region with arcs.
Previously, the region was a usual polygon with arc approximated by segment.
Using a region with arcs is a better way because it allows CAM tools to
identify this region as a round-rect pad.

Similar to master branch, commit 9cb3333d05.
2020-03-22 08:31:25 +01:00
Wayne Stambaugh 445bc75319 3D Viewer: fix broken check for write image permission check.
Fixes https://gitlab.com/kicad/code/kicad/issues/4081

(cherry picked from commit d8e99dc5be)
2020-03-21 17:20:04 -04:00
jean-pierre charras 4fb7ee02cd Kicad: unzip project: fix issues: - files with no extension were skipped. - subdirs were ignored. 2020-03-21 14:08:38 +01:00
Wayne Stambaugh ad11b7ebd0 3D viewer: fix double warning attempting to save screen shot file.
Fixes https://gitlab.com/kicad/code/kicad/issues/4028.

(cherry picked from commit fc20f9f0b2)
2020-03-16 13:09:02 -04:00
Seth Hillbrand 5d9bda6f97 Partial revert of 134a7ba85
The margin fix prevented some schematics from printing.  Reverting in
favor of transitioning to the Cairo print base in eeschema

(cherry picked from commit 9de7547c25)
2020-03-13 11:54:09 -07:00
jean-pierre charras 54be07c17d Pcbnew: Set default solder mask min size to 0.
When the solder mask min size is > 0, pads are no longer flashed or regions items.
Good Gerber files need pads flashed or regions items.

Non 0 solder mask min size is reserved to special cases (home made PCBs for instance)

From master branch.
2020-03-12 20:47:21 +01:00
jean-pierre charras 2c7ab3a28e Pcbnew, Gerber output: always generates Aperture Attributes.
Previously, for historical reasons, they were added only if
Include Netlist Attributes option was on.

But Aperture Attributes have nothing to do with Netlist Attributes, and good
Gerber files must include them.

From master branch
2020-03-12 17:00:55 +01:00
jean-pierre charras 3cc3c1bbd3 Zones: fix a crash when adding a zone cutout to a zone having already holes
From master branch
2020-03-12 14:49:36 +01:00
jean-pierre charras ddedf2e046 Annotate dialog: fix incorrect list of changes in complex hierarchies
Previously, to list changes, the Reference field was used in comparisons.
In complex hierarchies, this is incorrect: the Reference field contains
only the last displayed reference, not the reference of a given sheet.

The comparison uses now the sheet paths for ref and unit selection.

From a similar fix in master branch.
2020-03-09 18:28:39 +01:00
Seth Hillbrand a60c339f85 PCAD: Handle mirrored text
Mirrored text rotates clockwise in the mirror, so we need to invert the
sign for aligning mirrored PCAD text

Fixes https://gitlab.com/kicad/code/kicad/issues/3992

(cherry picked from commit 058fb3afa1)
2020-03-05 15:29:47 -08:00
Michael Kavanagh ce2c5d6528 Remove empty choice in Via type dropdown
Fixes https://gitlab.com/kicad/code/kicad/issues/3968

(cherry picked from commit 265c1663f9)
2020-03-03 14:21:21 -08:00
Seth Hillbrand fd81f70355 Drop invalid arcs on footprint load
In the case where the footprint arc has a non-normal angle, we cannot
represent this in pcbnew and it corrupts the gerber output.  Therefore
we drop the invalid arc and continue to load the footprint/board.

Fixes #3918 | https://gitlab.com/kicad/code/kicad/issues/3918

(cherry picked from commit 3e0ff72720)
2020-03-02 15:59:35 -08:00
Seth Hillbrand 100bb7c6ca Set Module Editor flag for tools
The commit takes the module edit flag when resetting the tool.  All
tools should reset this flag when we setup the Module editor.

This is slightly different in master and v5, so  this is a rework of
7bdf71abc

Fixes #3973 | https://gitlab.com/kicad/code/kicad/issues/3973
2020-03-02 12:45:47 -08:00
Seth Hillbrand 1ffcedd9d4 libedit: Fix speed of lib check
The symbol check output the HTML message for each item.  This is _very_
slow and can lock the system reponsiveness.  Changing to a queue/flush
method is much faster

cherry-picked from 245b778454
2020-02-28 08:50:05 -08:00
Ben Dooks fc1f713106 Fix issue with DRC for through hole being applied to SMD pads
Commit d7272b7f5e fixed the use of
the eagle DRC to change the library pad shapes. This was also
applied incorrectly to SMD stacks.

Remove the references to m_rules in packageSMD() and the code
that deals with them. eagle 7.7 does not have any SMD pad options
other than rectangle with rounding.

(cherry picked from commit 070c6b8ce0)
2020-02-27 09:01:42 -08:00
Seth Hillbrand 83c3a78e6d pcbnew: Avoid wx scaling error
When drawing to a scaled DC, the window doesn't reflect the expected
size if scaled after.  This causes elements drawn on the edge to reflect
back into the drawing area instead of being cut off.

We can simply scale our own values to avoid this issue.

Fixes #3849 | https://gitlab.com/kicad/code/kicad/issues/3849

(cherry picked from commit 5b6a4d794f)
2020-02-27 09:01:18 -08:00
Ian McInerney e6a3e7024d Also verify that the .dcm is writable when saving library
Fixes https://gitlab.com/kicad/code/kicad/issues/3946

(cherry-picked from b2cc454878)
2020-02-26 19:38:30 +00:00
jean-pierre charras d62fde0d79 Pcbnew, Fix issue when trying to create a drawing (line,circle,arc,polygon):
Display a error message if no free graphic layer is enabled, to switch from
a copper layer.

Fixes #3916
https://gitlab.com/kicad/code/kicad/issues/3916
2020-02-24 19:59:07 +01:00
Jon Evans a70cf464d6 Check if scaling factor has changed when top-level window is moved
Fixes #2592

(cherry picked from commit 712ae5a953)
2020-02-23 15:55:05 -05:00
Jon Evans 546260348d Rework window size and position fixing code
Fixes #2624
Fixes #3888

(cherry picked from commit 96da45f12f)
2020-02-23 15:55:05 -05:00
jean-pierre charras 693aec949c Gerbview: Gerber attributes display: fix incorrect attributes deletion.
The Gerber attribute deletion command (%TD,xxx) always cleared all attributes,
instead of clearing xxx attribute.
Therefore some attributes were not always displayed.

From master branch, commit 7206b567
2020-02-23 10:05:00 +01:00
jean-pierre charras 5c7ac1bb7e ZONE_FILLER: fix incorrect thermal clearance of pads having "not in zone" option. Pads inside a zone of the same net having the "not in zone" option have a "antipad" clearance. The value in this case is the biggest between zone clearance and thermal clearance (the net clearance is 0 betwen items of the same net)
However a bug created a incorrect value, due to the fact the minimal zone width
was incorrectly taking in account in calculations.
2020-02-17 17:12:24 +01:00
jean-pierre charras 8862752523 Remove a fix committed in 6b78fdf by mistake. 2020-02-17 13:00:56 +01:00
jean-pierre charras 201c380925 QA tests: remove deprecated headers, already not used in master branch. 2020-02-17 12:58:04 +01:00
jean-pierre charras c7230a6f77 eeschema: fixes related to translated and not translated field names.
When searching for fields, the code was sometimes comparing
translated and not translated names. This is an issue for mandatory fields,
in non English languages.

From master branch.
2020-02-17 12:26:51 +01:00
jean-pierre charras 6b78fdf822 LOCALE_IO: replace the call to setlocale by a call to wxLocale to switch to "C" locale.
Previously we call only setlocale( xx, "C" ), but it was not enough on Windows.
Now we call wxLocale("C")
wxLocale calls setlocale, but also make some others initialization in wxWidgets.
It fixes some issues related to comma versus point as fp separator.
Especially wxWidgets warnings are no longer thrown, and a one case of incorrect
conversion is fixed.
However, wxLocale( "C" ) also switches the current translations to English, so
loading files can have a slightly different behavior
2020-02-17 09:14:18 +01:00
Jon Evans 3cb326e426 ADDED: Expose GetBuildVersion and GetBuildDate to Python
(cherry picked from commit 8fb72d8290)
2020-02-15 09:59:43 -05:00
jean-pierre charras d3f9332372 Kicad manager: Avoid crash when calling configure libraries from main menu,
when _eeschema.kiface or _pcbnew.kiface is not found.
Happen mainly when running Kicad from build tree.

From master branch.
2020-02-11 16:15:19 +01:00