Import SVG: menu doesn't reflect availability of importer

Bug #1821571 reported by dhaillant
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Low
John Beard

Bug Description

Hi,

In Footprint editor, the "File" menu shows now "Import Outlines from DXF or SVG File..." entry, but, in the dialog "Import vector graphics file", when I try to select a SVG file from the file browser, no SVG file is listed. Only DXF files.

The dropdown combo only allows to filter the directory listing either by "All supported formats" or "AutoCAD DXF (*.dxf)".

"All supported formats" reports no SVG (*.svg) file in the current directory.

Thank you!
David

Application: kicad
Version: 5.1.0-060a0da~80~ubuntu16.04.1, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 OpenSSL/1.0.2g zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.4.0-143-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    OpenCASCADE Community Edition: 6.8.0
    Curl: 7.47.0
    Compiler: GCC 5.4.0 with C++ ABI 1009
Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=ON
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Tags: pcbnew ui
Revision history for this message
John Beard (john-j-beard) wrote :

In 5.1, this is an advanced config option. Enable it by creating ~/.config/kicad/kicad_advanced with the content "EnableSvgImport=1".

Please note, this is not formally supported yet, which is why it must be explicitly enabled in the advanced config.

In the nightlies since 61567d391, this option is on by default.

Revision history for this message
dhaillant (david-haillant) wrote :

Adding the advanced config option works.
I can now select a SVG file.

I understand that this functionality might be an advanced option and that it could require some polishing (for example, the reference point is different from the DXF version and there's no apparent way to choose the line width...)

But it is a bit misleading to have the menu entry stating "SVG import" when it is not active by default.

Also, the advanced option seems to be undocumented...

Thanks!
David

Revision history for this message
John Beard (john-j-beard) wrote :

Yes, that is not ideal that the menu doesn't reflect the setting. I'll make resolving that the target of this issue.

IIRC, line width is set according to the SVG itself.

Advanced config is documented in the developer documentation[1] (as advanced config options are supposed to be used for debugging and pre-release testing, not user-facing config), and the keys to use are in the doxygen page linked from there.

[1]: http://docs.kicad-pcb.org/doxygen/md_Documentation_development_testing.html#advanced-configuration

Changed in kicad:
assignee: nobody → John Beard (john-j-beard)
milestone: none → 5.1.1
summary: - Footprint editor: in "Import vector graphics file" dialog, only .dxf
- files are listed
+ Import SVG: menu doesn't reflect availability of importer
Changed in kicad:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Seth Hillbrand (sethh) wrote :

Just a heads up that minor point releases generally do not have string changes.

Revision history for this message
John Beard (john-j-beard) wrote :

@Seth, ah right. The SVG advanced config is turned off (always available) in master, so there's not much point to switch it there.

A better string might be "Import Graphics as Outline..." (in Pcbnew the same option is called "Import Graphics...")

Leaves it open to adding new formats?

Changed in kicad:
milestone: 5.1.1 → 5.1.2
Changed in kicad:
milestone: 5.1.2 → 5.1.3
Revision history for this message
John Beard (john-j-beard) wrote :

This is fixed in master by 2a09664ebce0b4c03be14588c15e697a0560a58b, which was a fix for https://bugs.launchpad.net/kicad/+bug/1822907

The menu text is now "Import -> Graphics...".

Revision history for this message
John Beard (john-j-beard) wrote :

@Wayne, is this still good for 5.1? Or just leave it for master?

Revision history for this message
Wayne Stambaugh (stambaughw) wrote : Re: [Bug 1821571] Re: Import SVG: menu doesn't reflect availability of importer

Master, svg import is a new feature that was always slated for v6.

On 5/7/2019 6:48 AM, John Beard wrote:
> @Wayne, is this still good for 5.1? Or just leave it for master?
>

Revision history for this message
John Beard (john-j-beard) wrote :

Fixed in 5.1 to just remove "SVG" from the menu to not advertise it. Keep "DXF" (rather than "Vector"), to avoid gratuitous menu changes.

Revision history for this message
John Beard (john-j-beard) wrote :

Fixed in a6674ecd5602d9a233dc40ef1cbd7e38fa867781.

Changed in kicad:
status: Triaged → Fix Committed
tags: added: pcbnew ui
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.