Commit Graph

15771 Commits

Author SHA1 Message Date
jean-pierre charras 87f6f33b37 fix a minor wxWidgets alert. 2019-12-27 20:03:02 +01:00
jean-pierre charras 8c03d1bdde Gerber files: update unicode coding to the 2019 06 Gerber specifications.
In gbr files, not allowed chars are coded using a 16 bit (4 hexa digits)
unicode sequence.
Previously, it was \XXXX and now is \uXXXX escape sequence.

Changes from master branch.
2019-12-27 20:03:01 +01:00
Wayne Stambaugh 7f1c7d808d Eeschema: fix sheet file name case sensitivity test.
Fix overzealous test if the new file name is the same as an existing
file name.

Fix a potential comparison bug due to missing file extension.

(cherry picked from commit b66ecf141f)
2019-12-27 12:08:13 -05:00
Wayne Stambaugh be12aece5b Eeschema: fix sheet file name case sensitivity bug.
Apparently there are some issues with wxString::CmpNoCase() that was
causing the sheet file name case sensitivity test to incorrectly fail.
Converting the name strings to lower case before comparing resolved
the issue.

(cherry picked from commit 773f45aae3)
2019-12-27 12:07:15 -05:00
Wayne Stambaugh d7605f1449 Eeschema: fix multiple sheet file name bugs.
Add missing check for root sheet when searching sheet hierarchies for
already loaded schematics.  This prevents the root sheet from being
omitted when adding new sheets using the root sheet file name.

CHANGED: Make file name tests case sensitive so that schematic sheet
file names on non-Windows systems can be uses as expected.

Warn users when attempting to use schematic file names that only vary
by case sensitivity that doing so will result in a project that is not
portable to Windows.

Fixes lp:1843415

https://bugs.launchpad.net/kicad/+bug/1843415
(cherry picked from commit d4cea0f2b7)
2019-12-27 12:05:59 -05:00
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
Jon Evans a5622c93d4 Don't try to write fp-info-cache to a read-only directory
Fixes #1890

(cherry picked from commit 80fb3bde56)
2019-12-25 18:48:21 -05:00
Ian McInerney b6f9bfe9a5 pcbnew: Fix cmake to work with no wxPython on macOS
(cherry-picked from bf5dba847c)
2019-12-25 23:23:31 +00:00
Ian McInerney 79954657e2 eeschema: Fix return ID check in annotate dialog
Fixes https://gitlab.com/kicad/code/kicad/issues/3708

(cherry-picked from e6e2cf47fd)
2019-12-25 23:18:31 +00: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 388d74faf4 Pcbnew: graphic polygon: display the points count, instead of length,
and coordinate origin.
Previously, the meaningless length (always 0) and begin and end (@0,0)
coordinates were always displayed.

From master branch.
2019-12-18 13:21:35 +01: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
jean-pierre charras bea2d42e8c Gerbview,export to pcbnew: avoid exporting not valid polygons.
Gerber regions are exported as polygons (they are filled polygon).
The fix ensure the polygons are simple and valid.
Invalid polygons crash Pcbnew.

From master branch, commit 25504319.
2019-12-15 14:24:11 +01:00
jean-pierre charras 68d644fd28 P&S router: length tuning tool: fix a crash after trying to tune a track.
It happens on Windows, and wxWidgets 3.1.3. It is created by
PNS_TUNE_STATUS_POPUP instance used in tool. I am pretty sure this crash is
created by the stack switching when managing events, due to some changes in
wxWidgets code.
The fix creates the instance on the heap, instead of on the stack.
This is not the first time I see this kind of issue.

From master, commit 21dd8db
2019-12-12 10:26:27 +01:00
jean-pierre charras f6e33450ff Gerber object attribute: avoid trying to guess if a SMD pad is a BGA pad.
Previously, if a SMD pad was round, itb was seen as BGA pad.
But this is not always true. so use always SMD PAD attribute,
until an explicit BGA pad attribute is added in Pcbnew
2019-12-11 08:55:44 +01:00
Seth Hillbrand 65008c5c0b Eeschema: Check twice before using GAL
The windows display may through an error which we need to catch when
starting GAL under windows.  This is a reimplementation of
e39586e15 which cannot be cherry-picked into v5

Fixes #2620 | https://gitlab.com/kicad/code/kicad/issues/2620
2019-12-10 16:01:59 -08: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
Fabien Corona 58fd6ac03e PCBnew: placing a blind/buried via sometimes incorrectly place a through via.
From master branch commit 36fba5bd7f
2019-12-08 13:31:21 +01:00
Seth Hillbrand 1e64524afb PNS: Allow snap to temp hidden
The IFACE for kicad refers to the board hidden state, not the
temporarily hidden state used by the router.  We allow snapping to items
that have been removed by the temporary router state to provide snapping
to original track location.

Fixes #1827 | https://gitlab.com/kicad/code/kicad/issues/1827
2019-12-07 09:49:59 -08:00
Seth Hillbrand 20a5d8effd pcbnew: Handle intermediate pad on route
The length calculation wanted to find start/end pads but this was
complicated for paths that had a via on the intermediate pad.  Instead
of warning, we calculate the longest path of the three possibilities

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

Fixes #2554 | https://gitlab.com/kicad/code/kicad/issues/2554
2019-12-04 13:46:09 -08:00
jean-pierre charras 8c7e0bcb0a DIALOG_DRC_CONTROL: fix a crash on wxWidgets 3.1.3
Happens when right clicking on an item in displayed lists.
The crash was due to a bug in wxWidgets, and the fix is only a workaround

From commit 5cd7f3fd in master branch.

Also remove duplicate code.
2019-12-03 09:47:42 +01: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
Jeff Young c6eff4d373 Update local coords when editing EDGE_MODULEs.
Fixes: lp:1853726
* https://bugs.launchpad.net/kicad/+bug/1853726
2019-12-02 20:01:11 +00:00
Seth Hillbrand 5c056c2a3e Fix compile error for old compilers 2019-12-02 09:19:13 -08:00
M.Scholz 61f593f350 Corrects IsDirWritable check
The check for IsDirWritable needs to reference the absolute path to
return correct values.

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

(cherry picked from commit dbb9b5f64f)
2019-11-21 17:25:48 -08:00
jean-pierre charras 6cc7dc7aaa Pcbnew: fix crash on Linux (when opening Edit Spice model in component properties)
It happens when the spice library model shown in dialog is a large file.
Looks like the wxTextCtrl used to displays the library content
creates the crash ( GKT bug?) for large texts.

The fix is to replace this wxTextCtrlt by a wxStyledTextCtrl.
It has advantages (does not crash... and much faster display) and
inconvenients (cannot disable editing).

Fixes: lp:1853161
https://bugs.launchpad.net/kicad/+bug/1853161
2019-11-21 13:15:14 +01:00
jean-pierre charras 239f040a98 Fix minor wxWidgets alert (wxWidgets 3.1.3) 2019-11-20 18:29:11 +01:00
jean-pierre charras 3827c16fde Fix a wxWidgets alert 2019-11-20 10:02:09 +01:00
Fabien Corona e299343807 Pad ratsnest settings initial value
Pad ratsnest settings set to global settings during initilization.

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

(cherry picked from commit 29ce76b4e4)
(slightly modified due to settings structure difference between
master and 5.1)
2019-11-18 22:34:21 +00:00
Fabien Corona 4130ce2b93 Ratsnest default value for tracks and vias
Fixes: lp:1851611
* https://bugs.launchpad.net/kicad/+bug/1851611

(cherry picked from commit 6182133a4e)
(slightly modified due to differences between master and 5.1)
2019-11-18 22:23:00 +00:00
Seth Hillbrand d6acb64514 CMake: Fix OCE/OCC swap
unset() needs to remove the cached variable to get rid of the implicit
version

(cherry picked from commit 365f9224e7)
2019-11-18 21:20:10 +00:00
jean-pierre charras 8e233e2591 Fix compil issue due to a small incompatibility from cherry-picked code. 2019-11-18 09:13:04 +01:00
jean-pierre charras 9cda16220e Gerbview: add parsing of optional Aperture Macro parameter. AMP_CIRCLE primitive has 4 or 5 parameters (last is optional) Reading the optional parameter was missing.
Fixes: lp:1852924
https://bugs.launchpad.net/kicad/+bug/1852924
2019-11-18 09:07:32 +01:00
jean-pierre charras 36acadbd52 DIALOG_PAD_PROPERTIES: fix incorrect pad type for Aperture option.
The aperture option created a Connector pad only on the paste layer.
This is incorrect: the SMD type only is acceptable.
Connector is *only* for edge card connectors.
Moreover, The dialog did not even accept the setting defined by this dialog...
2019-11-17 18:28:08 +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 2b4cfd9a60 Footprint wizard frame: rebuild the parameter grid list after any parameter change. The python footprint wizard can modify other parameters than the one that was changed by user. So the parameter grid list must be updated after every parameter change.
Fixes: lp:1846404
https://bugs.launchpad.net/kicad/+bug/1846404
2019-11-17 18:22:13 +01:00
Fabien Corona decbb65f09 High contrast color for holes in microvias and buried bias
In high contrast mode, the holes of buried vias and microvias were no darkened when not on the active layer.
In high contrast mode, the outer circle of buried vias and microvias were alway darkened.

In high contrast mode, when the selected layer is non visible through-vias are now darkend.

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

(cherry picked from commit 04edc6ceff)
2019-11-15 12:02:47 -08:00
Seth Hillbrand 8e2ca37edc pcbnew: Prevent extra selection
We want to avoid selecting items that are disabled in the item list.
Our standard method is in the GetViewLOD() that performs both size and
visibility.  This extends the check to module text and via.

Fixes: lp:1851133
* https://bugs.launchpad.net/kicad/+bug/1851133
2019-11-14 09:50:39 -08:00
Wayne Stambaugh 8fb6bcc8b1 Begin version 5.1.6 development. 2019-11-14 12:14:16 -05:00
Wayne Stambaugh 2f36c670ff Tag release version 5.1.5. 2019-11-14 12:09:45 -05:00
jean-pierre charras d701c3a480 Gerber plot: fix a minor issue: TF attribute "Drawing" is now "OtherDrawing,Comment" This is due some changes in recent Gerber file format. 2019-11-05 20:15:00 +01:00
jean-pierre charras cd7f3375b2 Add missing code to plot Bezier curves (EDGE_MODULE shape) in footprints 2019-11-05 20:14:48 +01:00
jean-pierre charras 46cd185524 Fix incorrect HitTest in DRAWSEGMENT (bezier curve) 2019-11-05 16:21:45 +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
jean-pierre charras 26d0863921 minor fix in a python script (kicad_netlist_reader.py) Sort lists was incorrectly made. 2019-11-05 14:25:30 +01:00
Jeff Young 37f23fa537 When copying an item it's no longer at the original location and so can't be "locked".
Fixes: lp:1851038
* https://bugs.launchpad.net/kicad/+bug/1851038
2019-11-03 17:43:36 +00:00
Seth Hillbrand 167d408b5e qrcode: Handle Python3 integer promotion
In Python3, all division operators promote integers to floats.  We need
to downcast back to integer for the polygon vertices.

There was also an unhandled overflow in the QR generation that allowed
more than 512 bits to be loaded.  This overflows the type of QR we
generate, so this truncates the input string to 62 bytes ( leaving 12
bits for the checksum )

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

(cherry picked from commit 9bccbaf497)
2019-11-01 14:57:07 -07:00