Inkscape.org
Using Inkscape with Other Programs Does anyone have experience with the plug-in Svg2Shenzhen?
  1. #1
    peps1 peps1 @peps1

    New to Inkscape, and having a fair bit of trouble with getting anything out of the plug-in and could really do with some help.

  2. #2
    Tyler Durden Tyler Durden @TylerDurden

    Please review this guidance and provide more details.

  3. #3
    peps1 peps1 @peps1

    OK, here is more information. 

    I open Svg2Shenzhen 

    https://imgur.com/zCaZipV

    I then import my SVG with multiple layers

    https://imgur.com/5yzz3x7

    Put my layers into the corresponding layers made by Svg2Shenzhen 

    https://imgur.com/CiPwb0s

    Add a box for Edge cuts

    https://imgur.com/D8l5pxY

    Run the export plugin 

    https://imgur.com/QYtF86S

    Get the following message 

    https://imgur.com/1qY2Lkr

    It creates a folder, but with empty subfolders and only one file called export_options.pickle, and kicad never opens. 

    https://imgur.com/GLLaOZS

     

    Hope this helps? 

     

  4. #4
    Tyler Durden Tyler Durden @TylerDurden

    Importing svg files into Inkscape may create groups.

    Maybe you have seen this:

    Tips

    1. For Edge.Cut layers, you need to convert any polygons or objects to paths with only an outline, no fill. Don't use any groups on Edge.Cut layers, and if you have paths with inner cut-outs, break them apart into separate paths.
    2. For Drill layers, place circle objects, and they will be converted into drill pads in KiCad with the same diameter. These drills will not have annular rings, unless you also add copper to the F.Cu and B.Cu layers. Don't use any groups on the Drill layer either.

    https://github.com/badgeek/svg2shenzhen#tips

     

    For more assistance, please provide example files that are being imported into Inkscape.

  5. #5
    peps1 peps1 @peps1
    **
    TylerDurden

    Importing svg files into Inkscape may create groups.

    Yes, this does seem to be the case. I have attached the SVG I'm importing and a picture to show the tree it's forming in the objects panel that I think maybe the root of my problem? (hope it is!)

    https://imgur.com/kXXWxd3

    Where as the guide I'm trying to follow along with doesn't seem to have the same group? file structure?

    https://imgur.com/pZBPZwr

    https://www.youtube.com/watch?v=Sbkvza8cKQE

    Sorry really new to inkscape so to be honest I don't really know how to best describe the issues I'm having. 

     

  6. #6
    Tyler Durden Tyler Durden @TylerDurden

    I'm not sure you will find many folks here using the extension, which calls for drawings to be formatted in very specific ways. I know there have been KiCad users here, but not very often.

     I'd seek help at some of the KiCad forums, you'd probably get faster answers. I'll leave this topic open, in case someone drops by, but KiCad user groups will be more likely to have your answers.

  7. #7
    peps1 peps1 @peps1
    *
    TylerDurden

     I'd seek help at some of the KiCad forums, you'd probably get faster answers. I'll leave this topic open, in case someone drops by, but KiCad user groups will be more likely to have your answers.

    Thank you, I will ask over at the kicad forum. Is how my SVG files load in as a nested tree normal behaviour? 

    This one here with a strangely named g6413 folder that is holding the SVG files inside it? 

    https://imgur.com/kXXWxd3

  8. #8
    Tyler Durden Tyler Durden @TylerDurden

    The shared svg file has many groups, and groups within groups, but that may not be the only issue with the document causing the extension error. 

    I'd consider starting with a simple layout, until you have a solid knowledge of the workflow.

  9. #9
    Elliott Elliott @Elliott

    I have had the same error message using Svg2shenzhen, was there any resolve to this issue?

  10. #10
    peps1 peps1 @peps1

    @Elliott I managed to get it working with Inkscape v1.1 if you post your error message I may be able to help. 

  11. #11
    Elliott Elliott @Elliott

    Here is the error message.
    Inkscape has received additional data from the script executed. The script did not return an error, but this may indicate the results will not be as expected.
    export.py:224: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–path", action=“store”, type=“string”, dest=“path”, default="~/", help="")
    export.py:225: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option(’-f’, ‘–filetype’, action=‘store’, type=‘string’, dest=‘filetype’, default=‘jpeg’, help=‘Exported file type’)
    export.py:226: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–crop", action=“store”, type=“inkbool”, dest=“crop”, default=False)
    export.py:227: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–dpi", action=“store”, type=“float”, dest=“dpi”, default=600)
    export.py:228: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–threshold", action=“store”, type=“float”, dest=“threshold”, default=128.0)
    export.py:229: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–openfactory", action=“store”, type=“inkbool”, dest=“openfactory”, default=“true”)
    export.py:230: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–openkicad", action=“store”, type=“inkbool”, dest=“openkicad”, default=“true”)
    export.py:231: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–autoflatten", action=“store”, type=“inkbool”, dest=“autoflatten”, default=“true”)
    export.py:232: DeprecationWarning: Effect.OptionParser or optparse has been deprecated and replaced with argparser. You must change self.OptionParser.add_option to self.arg_parser.add_argument; the arguments are similar.
    self.OptionParser.add_option("–debug", action=“store”, type=“inkbool”, dest=“debug”, default=False)
    export.py:736: DeprecationWarning: Effect.affect is now Effect.run(). The output argument has changed.
    e.affect()
    export.py:336: DeprecationWarning: self.args[-1] is now self.options.input_file.
    curfile = self.args[-1]
    Traceback (most recent call last):
    File “export.py”, line 740, in 
    _main()
    File “export.py”, line 736, in _main
    e.affect()
    File “/Applications/Inkscape 2.app/Contents/Resources/share/inkscape/extensions/inkex/deprecated.py”, line 183, in affect
    return self.run(args=args)
    File “/Applications/Inkscape 2.app/Contents/Resources/share/inkscape/extensions/inkex/base.py”, line 131, in run
    self.save_raw(self.effect())
    File “export.py”, line 313, in effect
    self.processExportLayer()
    File “export.py”, line 337, in processExportLayer
    layers = self.get_layers(curfile)
    File “export.py”, line 537, in get_layers
    if layer_label_name in self.layer_map.iterkeys():
    AttributeError: ‘dict’ object has no attribute ‘iterkeys

  12. #12
    Elliott Elliott @Elliott

    What version of Svg2shenzhen was you using with Inkscape V1.1?

  13. #13
    Elliott Elliott @Elliott

    What version of Svg2shenzhen was you using with Inkscape V1.1?

  14. #14
    peps1 peps1 @peps1

    @Elliott that latest version, forked by another user to include non played through-hole drill layers.

    On your export tab, do you have it set to export as a Project or Module (you want it set to Project, as modules never worked for me). 

  15. #15
    Elliott Elliott @Elliott

    Hello thank you for your reply, i appreciate your help:-)

    The export window says

    EXPORT AS: 

    KICAD PCB 

    KICAD MODULE

    PNG IMAGE

  16. #16
    Elliott Elliott @Elliott

    I updated Svg2shenzhen 0.2.18.7 but still the same error message. 
     

    also with another error message: “bitmap2component_osc”cannot be opened because the developer cannot be verified.

  17. #17
    peps1 peps1 @peps1

    What do you have set on this window? 

  18. #18
    Elliott Elliott @Elliott

    Yes I’ve got that project option, I tried that, but I keep getting an empty file. 
    where it says which folder to send it to, how do you know where to send when exporting to Kicad?

Inkscape Inkscape.org Inkscape Forum Using Inkscape with Other Programs Does anyone have experience with the plug-in Svg2Shenzhen?