Commit Graph

15726 Commits

Author SHA1 Message Date
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
jean-pierre charras be0f6a6af2 Fp editor: fix: Reference and Value default values aren't saved in Footprint Editor preferences
Fixes #3889
https://gitlab.com/kicad/code/kicad/issues/3889
2020-02-11 15:48:05 +01:00
Seth Hillbrand 25aa233cef eeschema: Temporary fix for GTK printing offset
The full fix will be Cairo printing in v6

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

(cherry picked from commit 134a7ba85d)
2020-02-10 09:07:21 -08:00
Jeff Young 5fdc424202 Don't report Eagle errors on the Unrouted layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/3398
2020-02-05 22:20:16 +00:00
Jeff Young 9b74bb5c92 Remove preferred layer disambiguation for multiple modules.
The preferred list isn't actually in use anymore at this point, so
it currently has no effect other than to mess things up since we
aren't keeping track of which modules have been rejected when we
check the module count.

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

(cherry picked from commit d02c0da3ab)
2020-02-05 22:20:16 +00:00
Jeff Young 8bf8a649c8 Adjust justified text for mirroring and rotation.
Fixes https://gitlab.com/kicad/code/kicad/issues/3737

(cherry picked from commit 2507f985ad)
2020-02-05 22:20:16 +00:00
Ian McInerney 7ba8d8b608 Revert eeschema highlighting changes
This reverts commit 366d4d7b0b.
This reverts commit 8b3c0a941c.

Fixes https://gitlab.com/kicad/code/kicad/issues/3866
2020-02-05 11:51:46 +00:00
Drew Fustini e35328fece Update copyright year in About dialog to 2020
(Cherry-picked from f359892de3)
2020-02-04 21:42:23 +00:00
Ian McInerney 366d4d7b0b eeschema: Ignore the highlight flag when responding to dbl click
Fixes https://gitlab.com/kicad/code/kicad/issues/3855
2020-02-03 21:41:03 +00:00
jean-pierre charras 3af1e75084 Gerber plots: Add initial G01 command to the header,
to ensure linear interpolation mode.
To avoid issues, an interpolation mode must be set before first D01 command.

From master branch.
2020-02-03 17:56:02 +01:00
jean-pierre charras dabd80fe4c Dxf importer: fix issue when importing some "degenerated" splines.
(From master, commit 8f3e8cf)
Sometimes a dxf curve is a "degenerated" bezier curve having only 3 points.
(a control point is at same location as a end point)
This commit fix incorrect import of these curves.

Fixes #3845
https://gitlab.com/kicad/code/kicad/issues/3845
2020-02-03 12:49:45 +01:00
Ian McInerney cb711a648f Fix layout in color dialog on GTK
Don't initially set the minimum widget size, and instead let it be
computed at launch.

Fixes #2617

(Partial cherry-pick of 4f82939384)
2020-02-02 15:40:42 +00:00
Karl Zeilhofer 5b58dbc980 Fixes dangling ends and rotation when labels/texts are converted into each other
CHANGED: Eeschema: Preserve text justification when switching text types

Closes https://gitlab.com/kicad/code/kicad/-/merge_requests/86
2020-02-01 16:08:34 +00:00
easyw 8b3c0a941c Highlight eeschema symbol on left click
CHANGED: Highlight eeschema symbol on left click

Closes https://gitlab.com/kicad/code/kicad/-/merge_requests/83
2020-02-01 16:08:19 +00:00
Seth Hillbrand 3ce29a3d7e Eeschema: Add bit that was missing from commit 7ac83ac64
This part of the check removes recursive sheets from the schematic when
loading and notifies the user that their schematic has been repaired.

(cherry picked from commit 128ec782dd)
2020-01-27 09:43:07 -08:00
Seth Hillbrand dc3c6b2f39 Check recursion before appending
We need to ensure that the appended sheet does not already exist in the
parent hierarchy.  We do this for new sheets but need to check for
existing ones as well.

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

(cherry picked from commit 7ac83ac64d)
2020-01-27 06:31:16 -08:00
Ian McInerney 1cbee4c504 gerbview: Add default filename to export to pcbnew function
Some platforms (such as Linux) don't automatically append file
extensions, so we should ensure extensions are correct and the user is
prompted accordingly.

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

(Cherry-picked from 88e0ef548d)
2020-01-26 16:26:03 +00:00
qu1ck 798e4c288a Fix polygon shape move
Move vector should not affect start/end points as they are assumed to
always be 0,0. Polygon is defined by outline only.

(cherry-picked from 32674ef360)
2020-01-23 00:40:33 +00:00
Seth Hillbrand ac39e32bc9 Recognize subckt blocks in spice
Spice lines defining circuit elements are contained in a .subckt ..
.ends block.  The intervening lines should be exported to the netlist as
well as the control lines.

(cherry picked from commit d9eaff1c99)
2020-01-17 18:58:27 -08:00
Seth Hillbrand 52da7f931b pcbnew: Check before reading/writing cache
The open/create calls can fail so we need to account for this before
using the result that assumes success.

(cherry picked from commit 88729de685)
2020-01-17 18:34:28 -08:00
Ian McInerney fcb6f814de Fix macos plist version string generation
Generate these resource files similar to how it is done one Linux.

Fixes mac-builder issue https://gitlab.com/kicad/packaging/kicad-mac-builder/issues/275

(Cherry-picked from 25a302758e)
2020-01-18 01:44:01 +00:00
Seth Hillbrand 9e6b56d783 PNS: Detect collisions including newline width
The new line collision search uses BBox() to check for colliding
objects.  BBox in the SHAPE_LINE_CHAIN did not include width as the
chains were assumed to be zero-width.  This is not the case for
PNS::LINE elements.

We mostly don't notice this because DRC checks for SEGMENT collisions
but it becomes obvious/annoying when we cannot place a track for unknown
reasons and the snap-back doesn't take line width into account.

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

(cherry picked from commit fe15511d38)
2020-01-17 11:26:02 -08:00
Seth Hillbrand 923dad6ca8 PNS: Modify MarkObstacles logic to select shorter
When routing where we hit multiple obstacles, we choose the shortest
path to allow overlapping hits to choose the shorter path, thus giving a
better chance of returning true for the DRC-compliant path.

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

(cherry picked from commit 38f13ef481)
2020-01-16 19:58:19 -08:00
Ian McInerney 9f17d91b32 Fix return type in KIDIALOG
It was returned as a bool for some reason...

(Cherry-picked from 1f8611f198)
2020-01-15 18:30:24 +00:00
Mark Roszko 2bcb04a3b1 KIDIALOG should ignore "cancel" for the do not show again option.
CHANGED: Do not remember "do not show again" when cancel button is pressed

Fix #3734

(Cherry-picked from 3ae784d97f)
2020-01-15 18:26:20 +00:00
Ian McInerney a530b600b8 Smoothen rotation in 3D viewer when crossing the 0-2pi line
Rotating to 0 when above pi would result in the board spinning back
through pi to get there. This led to jarring motion.

Also fix an issue added in b6f64815 where the board would rotate
2pi when crossing over the 0-2pi boundary.

(Cherry-pick of 4fc9b4e5ab)
2020-01-15 18:10:46 +00:00
jean-pierre charras d494a2bee2 3D viewer: normalize rotation angles between -2_PI and 2_PI.
Fixes #3761
https://gitlab.com/kicad/code/kicad/issues/3761

(Cherry-pick of b6f64815f4)
2020-01-15 16:30:41 +00:00
Ian McInerney 6a027662ae Update Linux appdata file and CMake version strings
CHANGED: Update the Linux appdata file to include new tags

* Include version tags (and others) in the appdata file
* Refactor the version string generation to clean it up

Cherry-pick of:
3370e89967
e54c954aed
2020-01-15 16:23:22 +00:00
Ian McInerney 577bb7bf31 Update AUTHORS.txt with changes from master branch
Cherry-pick of:
8fcd59ebda
037e6bc006
0857a1f5dc
07c6cfdc38

Closes !64
2020-01-15 16:17:19 +00:00
Ian McInerney df664bd55f Don't tie generic validators to a specific field
(Partial cherry-pick of 15cd13ba6e)

Fixes #3667
2020-01-15 16:12:39 +00:00
Seth Hillbrand 8a2705f81f PNS: Assume the current line is a base before optimizing
We use the cost of the current line before trying to improve the pad
breakout cost when optimizing the smart pads

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

(cherry picked from commit 52bfdb9703)
2020-01-12 11:13:19 -08:00
Seth Hillbrand fcaf11422a Fix bitmap clipping
When printing (using DC context) the bitmap will clear the full screen
unless the clipping region is set to the image itself.

Addresses KSC ticket 126

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

(cherry picked from commit 195c3d074b)
2020-01-11 10:00:57 -08:00
Seth Hillbrand 3444409554 pcbnew: Fix polygon comparison () for end
This is a v5-only fix incorporating 2c5876e and 72da237 into the 5
branch to resolve a crash when parsing invalid polygons.

Fixes #3752 | https://gitlab.com/kicad/code/kicad/issues/3752
2020-01-09 17:15:48 -08:00
jean-pierre charras 683c01b301 SVG plotter: fix an issue with mirrored texts. Mirrored texts have a size < 0. Of course, the actual value for the plotter is the absolute value. 2020-01-09 18:24:15 +01:00
jean-pierre charras e2492f773d FILENAME_RESOLVER: fix missing conversion from UTF8 to wide chars.
Fixes #3742
https://gitlab.com/kicad/code/kicad/issues/3742
2020-01-08 10:47:14 +01:00
Ian McInerney 1f3a2dcd1d Fix cherry-pick error
Fixes https://gitlab.com/kicad/code/kicad/issues/3744
2020-01-08 09:41:01 +00:00
Mario Luzeiro 4205cb32c5 3d-viewer, make ortho projection zoom similar as prespective projection
Fixes #1843
Fixes reload of Raytracing when the projection button is pressed.

(cherry picked from commit 2c00540ad6)
2020-01-06 19:33:00 -08:00