Commit Graph

34 Commits

Author SHA1 Message Date
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
Seth Hillbrand 79972ad4db pcbnew: Fix DXF Import with blocks
BLOCK elements in DXF are re-usable bits that are useful when editing
the file but should not be shown when importing the model.  This skips
all references except those that exist in the default "*Model_Space".
This block is required in each DXF file and cannot be renamed.

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

(cherry picked from commit df3fabfa21)
2019-10-23 11:31:43 -07: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
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 19064b680e Make the extension check for graphics import case insensitive
The regex for the file extension that matches against all case
possibilities is only built on Linux.

Fixes: lp:1842180
* https://bugs.launchpad.net/kicad/+bug/1842180
2019-09-02 10:03:39 +02:00
Seth Hillbrand b34a307936 pcbnew: Scale line width for import
The line width in the import dialog is meant to reflect the resulting
width and not the given width of the file.

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

(cherry picked from commit 22fdc7f51f)
2019-08-21 10:35:40 -07:00
Jeff Young dfd53976d4 Fix double-highlighted radio buttons on GTK.
Fixes: lp:1836538
* https://bugs.launchpad.net/kicad/+bug/1836538
2019-07-17 12:57:21 +01:00
jean-pierre charras 2e8bceb676 Fix a minor wxWidgets alert, already fixed in master branch. 2019-07-15 12:27:54 +02:00
Jeff Young d1ed4665de OSX compiler didn't like the other syntax.
(cherry picked from commit f14e41133b)
2019-07-11 12:35:11 -07:00
Seth Hillbrand 5b68cfa018 Fix import graphics routines and tests
The returns of KiCad file extensions on GTK contain basic regex matching
case-insensitive file extensions.  We need to match these in the
provider and tests

(cherry picked from commit 1956c074ba)
2019-07-10 10:47:13 -07:00
Seth Hillbrand 85f88b6b05 Fix case-sensitive import using KiCad std
Fixes: lp:1832853
* https://bugs.launchpad.net/kicad/+bug/1832853

(cherry picked from commit 79e2000af4)
2019-07-10 10:33:03 -07:00
Seth Hillbrand ea467441d2 import_gfx: Make file selection case-insensitive
This adds the upper-case version of files names to the selection box for
filesystems that support case-sensitive file names.

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

(cherry picked from commit 36f70704eb)
2019-07-10 10:32:48 -07:00
Seth Hillbrand dd93f89931 Import Vector Dialog formatting
This standardizes the import vector graphics file dialog to use the
sbSizer titles instead of bold+lines.  Tooltip changes will be in the
next change as we don't change strings for bugfix releases and this
commit is targeted for 5.1.3

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

(cherry picked from commit f7550940ee)
2019-06-08 09:47:29 -07:00
Wayne Stambaugh 07ac3499f3 Remove debugging code added in commit d2cb0ca7.
(cherry picked from commit 75366bce74)
2019-04-03 12:20:37 -04:00
Wayne Stambaugh 050b64b822 Pcbnew: fix DXF import line width bug.
There is a circular dependency between the GRAPHICS_IMPORTER object and
the GRAPHICS_IMPORT_PLUGIN object which makes sharing the settings in
the GRAPHICS_IMPORTER unwieldy.  This fix is a ugly hack that resolves
the issue.  The underlying issue will require some major refactoring.

Fixes lp:1821234

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

(cherry picked from commit 120ab06db4)
2019-04-03 11:32:30 -04:00
Wayne Stambaugh 43aa94dcfc Pcbnew: fix import graphics dialog issues.
Improve padding, spacing and alignment of dialog layout.

Fix title capitalization.

Make file dialog wildcard string translatable.

Remove fixed initial dialog size to allow sizers to work their magic.

Replace OK button event handler with TransferDataFromWindow.

Remember last line width units between dialog instances and sessions.

Save configuration file settings in a separate group and remove GfxImport
prefix from the entry names.

Add fencing to dialog header file to prevent nested includes.

Fixes lp:1822568

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

(cherry picked from commit d2cb0ca75f)
2019-04-03 11:32:09 -04:00
jean-pierre charras 70c2380fc2 Minor fixes in code: remove dead code. 2019-01-24 18:23:57 +01:00
jean-pierre charras b0ab53ac26 Dxf importer: fix some issues, especially the rotation angle of texts. 2019-01-22 19:59:43 +01:00
jean-pierre charras c56d6ad2dd Fix issues in DXF import and GFX import dialog
Fixes: lp:1812840
https://bugs.launchpad.net/kicad/+bug/1812840
2019-01-22 18:01:04 +01:00
Seth Hillbrand 5433423377 pcbnew: Don't update coords on add
When adding an element to a module, we don't need to update the relative
coordinates.  Doing so can cause changes when writing to file depending
on rotation and position.

Fixes: lp:1810870
* https://bugs.launchpad.net/kicad/+bug/1810870
2019-01-15 12:14:02 -08:00
Seth Hillbrand 8de12094d8 Fix compile error for missing dtor in overload 2019-01-02 20:21:33 -08:00
John Beard 892f7cf8ff Make SVG import an advanced config, not a compile option.
This demos the advanced config and allows no-recompile switching
of the SVG importer. It also allows the import manager to be
tested more completely.
2018-12-28 11:36:09 -05:00
jean-pierre charras 1d230bbee9 very minor fixes to help I18n translations (remove trailing spaces) 2018-12-20 20:19:45 +01:00
jean-pierre charras 5b3202d8f3 dxf and svg import: accept unicode filenames
Fixes: lp:1805613
https://bugs.launchpad.net/kicad/+bug/1805613
2018-12-07 10:07:43 +01:00
jean-pierre charras 4f4f03a98a Try to fix compil issue on OSX (commit 8757fcf6 breaks the import gfx dialog) 2018-12-04 20:03:23 +01:00
jean-pierre charras 3623980611 DXF importer: fix incorrect line thickness of imported texts. 2018-12-04 20:01:47 +01:00
John Beard bb18c9201b Make SVG import a CMake option (experimental)
This allows too turn it on for work without an additional patch.

Also fix a bug in the disable code - when the SVG is enabled,
allow to select SVG files.
2018-12-04 18:53:28 +01:00
Seth Hillbrand 8757fcf676 Add array hint to wxArrayString contructors
This may be required for some compilers to prevent premature casting to
a single element.
2018-12-04 09:47:43 -08:00
Maciej Suminski ecff2ed384 SVG import dialog: make placement options mutually exclusive 2018-12-04 08:39:58 +01:00
jean-pierre charras a762c4d86e Import GFX: temporary disable SVG import until V6.0.
SVG import need some refinements to be efficient, so it is disable for v 5.x.
Will be re-enabled later.
Enabling SVG import is *only* for developers, not for users.
2018-12-03 15:31:40 +01:00
jean-pierre charras fb5b5ff7c3 nanosvg: Update nanosvg. Move the code to compile from nanosvg.h to nanosvg.cpp
Uncrustify this code.
2018-12-03 15:25:46 +01:00
jean-pierre charras cc0aa8b928 Gfx import: fix many issues, and add many enhancements.
* Do not compile dxf old files.
* import gfx, gal mode: make absolute placement working.
* Import gfx in legacy canvas: use it and make interactive placement working
* Take imported line width in account. Ensure DXF line thickness is OK.
* handling empty files in legacy mode.
2018-12-03 15:25:44 +01:00
jean-pierre charras 430c61822d Import svg import code from experimental trunk: convert dxf importer 2018-12-03 13:42:23 +01:00
jean-pierre charras 74a9d5401a Import svg import code from experimental trunk: start point 2018-12-03 13:42:22 +01:00