Commit Graph

4294 Commits

Author SHA1 Message Date
Jon Evans ef80642dec LSET: Prevent assertion in MSW when size is not a multiple of 4
(cherry picked from commit 2ea565473f)
2019-12-26 10:01:44 -05:00
Mark Roszko 35d3f1f72a common: Remove out of bounds and erroenous array access
(cherry-picked from bf32122134)
2019-12-19 11:35:21 +00:00
jean-pierre charras 0f8747e194 Gerber plotter: modify G02 and G03 commands.
They are now in a specific block and no longer combined with an other
command.
(combining these commands with an other command (D01 or D02) is deprecated)

Fixes #3677 | https://gitlab.com/kicad/code/kicad/issues/3677
2019-12-18 12:30:28 +01:00
Ian McInerney 93f16ba9e3 Update about dialog link to GitLab
(cherry-picked from c31c99abd1)

Fixes #3687
2019-12-17 20:21:59 +00:00
Seth Hillbrand dbfaf568fc Plot SVG embedded
ADDED: embedded image support for SVG files

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

(cherry picked from commit fa133f3f5c)
2019-12-08 08:59:01 -08:00
Jeff Young c69080f11e Fix some issues with the previous commit. 2019-12-02 23:33:45 +00:00
Jeff Young 5a48c800ee Make sure that libraries are always sorted consistently.
Fixes #1847481 | https://gitlab.com/kicad/code/kicad/issues/1847481
2019-12-02 21:55:31 +00:00
jean-pierre charras 3827c16fde Fix a wxWidgets alert 2019-11-20 10:02:09 +01:00
jean-pierre charras 37b6552c42 FIX: add parameter to GAL::DrawCurve to control the curve to polyline
conversion.
Cairo supports curves, but not Opengl, that needs a conversion to polyline.
This control allows optimization in conversion
2019-11-17 18:22:13 +01:00
jean-pierre charras 1903052d79 Bezier curves: replace previous algorithm to convert the curve to segments.
In some cases it was not working well.
Opengl was using an other algo (using the curve properties to create segments)
Now only the OpenGL algo is used,
with optimization to reduce the number of segments.
2019-11-17 18:22:13 +01:00
jean-pierre charras e04d82e940 Gerber plot: minor fixes in TO object attributes.
Gerbview: remove a outdated warning about RS274D format.
2019-11-05 14:25:30 +01:00
Seth Hillbrand b67acd5ea1 pcbnew: Fix 45° snapping polygons
The constrained draw was constraining the polygon size to fit the
existing points rather than extending the existing points to fit the
user's intent.

This adds a 90° double-joint for the completion polygon that allows the
user to complete common constrained polygons visually based on the
preview with a double-click to finish.

(cherry picked from commit bae50fab9f)

Fixes: lp:1849299
* https://bugs.launchpad.net/kicad/+bug/1849299
2019-10-24 16:05:27 -07:00
Seth Hillbrand 5e2721d2f5 Increase visibility of polygon preview
This set the polygon preview item to wider size and adjusts the draw
order to ensure it remains visible even when antialiasing

(cherry picked from commit ea1c8525ce)
2019-10-24 16:05:12 -07:00
jean-pierre charras 2cd43aee0a Gerber output: fix some (minor) issues related to attributes when plotting polygonal pads.
rect (when not horizontal or vertical), trapezoid and custom shapes are draw as polygons.

The dummy pad used to give attributes is removed, and TO attributes are used in Regions (polygons in Gerber dialect)

This is due to some modifications in Gerber format since the attributes are added in Kicad.
2019-10-24 09:32:40 +02:00
jean-pierre charras e54ea90607 PROGRESS_REPORTER: fix serious bug in its DTOR: the DTOR was calling Destroy. But Destroy() in wxWidgets calls the DTOR.
It can create recursive calls of the DTOR.
2019-10-23 11:29:44 +02:00
Seth Hillbrand 322eb2b8a8 pcbnew: Commit polygon points to new constrained zone
Adds leader points if they are not already existing in the zone

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

(cherry picked from commit 2e1af66a2b)
2019-10-20 10:31:08 -07:00
Seth Hillbrand 2d1ea1618b pcbnew: prevent assert with first pt
Finding the pt-to-end intersection requires a segment, so check for
multiple points.

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

(cherry picked from commit 70c64d93e4)
2019-10-20 07:41:48 -07:00
Seth Hillbrand 50723d07a6 GAL: Use vector for stroke elements
deque structures have higher overhead than vectors.  Not usually
problematic, but with hundreds of thousands of characters each with only
a few strokes, the overhead becomes dominant.

(cherry picked from commit 6084614371)
2019-10-19 07:28:25 -07:00
Seth Hillbrand 1161562bc8 Remove Yahoo Groups link
Yahoo has discontinued its groups.

See https://help.yahoo.com/kb/groups/SLN31010.html
2019-10-17 15:59:06 -07:00
Seth Hillbrand e5463330ef view: Check for viewData in IsVisible()
viewData can be NULL, make sure we verify it before dereferencing.

(cherry picked from commit 5b8661f2ab)
2019-10-15 09:46:47 -07:00
jean-pierre charras d6db6dedca Gerber file export: avoid duplicate corner when creating polygons (regions in Gerber dialect)
Fixes: lp:1847714
https://bugs.launchpad.net/kicad/+bug/1847714
2019-10-11 21:01:40 +02:00
jean-pierre charras 6506f77689 Gencad export: fix an issue in hash_eda calculation,
that can generate the same hash for 2 different footprints.
Therefore, for some footprints, the right footprint was not associated to the component.
The hash calculation was using a XOR to combine 2 sub hash values.
This is not a reliable way to combine these hash values.
They are now added.
Looks better to identify similar and different footprints.

Fixes: lp:1847575
https://bugs.launchpad.net/kicad/+bug/1847575
2019-10-10 20:20:45 +02:00
jean-pierre charras 7856061cf0 Fix a few wxWidget asserts related to not existing block operations from mouse drag command.
block rotate and block mirror are not implemented in HandleBlockPlace.
(only available from context menu)

Fixes: lp:1847554
https://bugs.launchpad.net/kicad/+bug/1847554
2019-10-10 10:07:15 +02:00
jean-pierre charras 41231e8ae2 Gerber file generation: fix incorrect aperFunction attribute for graphic items on edge cut layer.
Was NonConductor. Must be Profile.
From master branch.
2019-10-09 16:02:45 +02:00
Ian McInerney e618e34c94 pcbnew: Clean up extension handling in graphics plugins
* Fix wildcard display in the file selector dialog (on GTK
  it would show the regex to the user)
* Move the file extension comparison into a common function

(cherry picked from commit b33c3a5ad8)
2019-10-04 16:01:15 -04:00
Ian McInerney 69d0446019 Update pleditor path for run from build directory
(cherry picked from commit 3a2dbf7786)
2019-10-04 07:58:17 -04:00
jean-pierre charras 0bd0d57a81 Cairo print, on GTK: use a better DPI definition to avoid artifacts rendering (GTK specific) Previously, a 600 DPI was used to set device scale (can create minor visible rounding issues). Using now 4800 DPI to reduce these rounding artifacts.
Fixes: lp:1845229
https://bugs.launchpad.net/kicad/+bug/1845229
2019-09-27 11:17:58 +02:00
jean-pierre charras 9dd5b6ce37 simulator: plot curves: fix incorrect draw area limits calculation when zooming.
Fixes: lp:1674132
https://bugs.launchpad.net/kicad/+bug/1674132
2019-09-26 16:30:28 +02:00
Ian McInerney 2bd0bae2f7 Remove unneeded wxWidgets version checks in the code
Now that the minimum version is 3.0.0, we don't need to actually
check if the version is greater than 3.0.0 inside the code.

(cherry picked from commit a37d8f2859)
2019-09-18 14:27:30 -04:00
Jeff Young f1436cec9b Restore PointCloserThan() behaviour to really be "closer than".
Change calls which really want it to be "closer than or equal" to
distance + 1.

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

(cherry picked from commit 25fa2131d2)
2019-09-10 12:57:52 +01:00
Jeff Young 2278f40051 Fix zero failure in SEG::PointCloserThan().
Fixes: lp:1843329
* https://bugs.launchpad.net/kicad/+bug/1843329
2019-09-09 23:22:29 +01:00
Ian McInerney 18a76d3a87 Manually put the UNIT_BINDER text on the primary selection clipboard
The OnKillFocus handler of the UNIT_BINDER replaces the text in the
control with the evaluated string, which removes the selection. To
get the original text on the primary selection clipboard, we must
add it ourselves.

Fixes: lp:1794623
* https://bugs.launchpad.net/kicad/+bug/1794623
2019-09-09 09:02:23 -07:00
Jeff Young 6a65461ec7 Replace buggy code in TestSegmentHit() with call to SEG::PointCloserThan()
Fixes: lp:1843101
* https://bugs.launchpad.net/kicad/+bug/1843101

(cherry picked from commit 6f0d8c3eac)
2019-09-08 12:40:33 +01:00
Jeff Young a5a0a7c4f3 Fix bug with high-frequency plots.
Fixes: lp:1839712
* https://bugs.launchpad.net/kicad/+bug/1839712

(cherry picked from commit 2ac270ce8e)
2019-09-08 01:12:33 +01:00
Jeff Young 848873d87e Add some protection against newlines sneaking into the file.
Fixes: lp:1842943
* https://bugs.launchpad.net/kicad/+bug/1842943
2019-09-07 02:32:56 +01:00
Jeff Young 75bb864237 Workaround wxWidgets inability to find the default PDF viewer.
Fixes: lp:1843061
* https://bugs.launchpad.net/kicad/+bug/1843061

(cherry picked from commit d55f4d05b4)
2019-09-07 00:07:06 +01:00
Wayne Stambaugh 6d4dd3e17a Pcbnew: fix size of graphics import warning dialog.
Use the HTML_MESSAGE_BOX window to present the warning messages rather
than wxMessageBox which would overflow the display when there were a lot
of graphic items that could not be parsed.

Fixes lp:1839565

https://bugs.launchpad.net/kicad/+bug/1839565

(cherry picked from commit 24454f5105)
2019-09-06 14:59:40 -04:00
Ian McInerney 649c22a34e wxWidgets compatibility fixes
* Remove unneeded check
* Fix WX_GRID since upstream renamed a variable in 3.1.3

(cherry picked from commit 8d86d94a4d)
2019-09-06 08:48:03 -04:00
Jeff Young 1ed8912f57 Workaround an issue where a throw terminates (even when there's a catch for it).
You can trigger it before this fix by running Cvpcb when a .kicad_mod file is
incorrectly set as "Legacy" in your footprint table.

(cherry picked from commit e269b5d1b9)
2019-09-01 12:37:58 +01:00
Seth Hillbrand fccce265aa pcbnew: Retain 45° constraint
This also finishes the polygon with 45° lines when chosen as a create
option.

Fixes: lp:1833673
* https://bugs.launchpad.net/kicad/+bug/1833673
2019-08-26 14:33:30 -07:00
Jeff Young dd8610fd5c Don't apply GTK fix to OSX as it causes a hang.
Fixes: lp:1841379
* https://bugs.launchpad.net/kicad/+bug/1841379

(cherry picked from commit de8f97be6b)
2019-08-26 00:50:54 +01:00
Seth Hillbrand efc0325e14 Handle wx scrollbar thumbs in system-independent way
The thumb size changes between system versions and (on GTK) render
managers, so hard-coded wasn't working.  This gets the actual value from
the system and uses to adjust the range.  Changes in the range can also
trigger the refresh.

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

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

(cherry picked from commit 85df994eda)
2019-08-22 10:16:25 -07:00
Seth Hillbrand 213547f545 SVG: Correct plot fills for arcs/polylines
When plotting in Eeschema, various elements may be filled with either
the foreground or background colors.  The fill mode is rather unique,
requiring un-stroked pie wedges for arcs and both closed and open filled
polylines.

Fixes: lp:1840769
* https://bugs.launchpad.net/kicad/+bug/1840769
2019-08-20 12:01:00 -07:00
Seth Hillbrand ebba15fe67 Alphabetize Library Table returns
KiCad is case sensitive but we need to be consistent in displaying sort
order as case insensitive (same as file systems)

Fixes: lp:1836911
* https://bugs.launchpad.net/kicad/+bug/1836911
2019-08-19 15:23:29 -07:00
Jeff Young c1cd3339fa Fix assertion in new Duplicate Hotkey warning message. 2019-08-19 14:24:26 +01:00
Seth Hillbrand dc0aed5b16 Allow EDA_RECT to properly be uninitialized
The base initialization of EDA_RECT sets a 0/0/0/0 rectangle that
prevents merging properly with valid EDA_RECT.  This sets the default to
be uninitialized until the internal data are set.

(cherry picked from commit 46feb76aba)
2019-08-16 11:01:01 -07:00
Simon Schubert a68a442bbb SVG plot: output invisible text in addition to plotting
Fixes: lp:1544918
* https://bugs.launchpad.net/kicad/+bug/1544918

(cherry picked from commit 176fe80425)
2019-08-15 14:32:32 -07:00
Shawn Anastasio f6a42a36d6 Fix libcontext on PPC64 ELFv2
libcontext currently restores and saves the FPSCR register
on ppc64. This behavior is fine (though unnecessary) on the
ELFv1 ABI which designates the register as volatile, but has
been observed to cause crashes on ELFv2 systems.

The ELFv2 ABI designates the FPSCR register as Limited-access
and specifies specific conditions that must be met to clobber
it. It does not seem that a context swap function meets these
conditions (and indeed, the save/restore register example in the
ABI document does not modify FPSCR).

This patch fixes ELFv2 ABI compliance by removing the FPSCR
save/restore code in libcontext entirely. This fixes observed
crashes on the platform and should have no consequence for
ELFv1 support.

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

(cherry picked from commit 3e22b75948)
2019-08-14 11:18:25 -07:00
jean-pierre charras 8373e91a1b Python scripting: fix missing definition of uint32_t (and some other similar defs).
Fixes: lp:1837867
https://bugs.launchpad.net/kicad/+bug/1837867
2019-07-27 08:22:10 +02:00
Stefan Hamminga e7f3851212 Rebased LTO fix for coroutines
Fixes: lp:1793329
* https://bugs.launchpad.net/kicad/+bug/1793329

(cherry picked from commit e58d9606dd)
2019-07-25 12:17:11 -07:00