Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added support for a "Drill-NP" layer #55

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

drayde
Copy link

@drayde drayde commented Nov 3, 2019

added support for a "Drill-NP" layer that creates non-plated through hole (in contrast to plated holes from the "Drill" layer)

also see #24

…hole (in contrast to plated holes from the "Drill" layer)
@drayde drayde mentioned this pull request Nov 3, 2019
@badgeek
Copy link
Owner

badgeek commented Nov 8, 2019

thanks for your contribution @drayde i will take a look how this work

@modlfo
Copy link

modlfo commented Sep 8, 2020

This is exactly what I was looking for. Has it been any progress to merge/implement this feature in the main branch?

@PigeonFX
Copy link

Has this been implimented?

@drayde
Copy link
Author

drayde commented Sep 20, 2021

Has this been implimented?

Yes, but it has not been merged.
You could take the changes made to that file
https://github.com/drayde/svg2shenzhen/blob/master/inkscape/svg2shenzhen/export.py
In add them to the latest version

@PigeonFX
Copy link

Has this been implimented?

Yes, but it has not been merged.
You could take the changes made to that file
https://github.com/drayde/svg2shenzhen/blob/master/inkscape/svg2shenzhen/export.py
In add them to the latest version

Thank you, I did that, but get the following error on export.

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:764: DeprecationWarning: Effect.affect is now `Effect.run()`. The `output` argument has changed.
  e.affect()
export.py:347: DeprecationWarning: self.args[-1] is now self.options.input_file.
  curfile = self.args[-1]
Traceback (most recent call last):
  File "export.py", line 768, in <module>
    _main()
  File "export.py", line 764, in _main
    e.affect()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\deprecated.py", line 183, in affect
    return self.run(args=args)
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 131, in run
    self.save_raw(self.effect())
  File "export.py", line 324, in effect
    self.processExportLayer()
  File "export.py", line 348, in processExportLayer
    layers = self.get_layers(curfile)
  File "export.py", line 548, in get_layers
    if  layer_label_name in self.layer_map.iterkeys():
AttributeError: 'dict' object has no attribute 'iterkeys'

@drayde
Copy link
Author

drayde commented Sep 22, 2021

Thank you, I did that, but get the following error on export.

I merged the upstream changes into my branch.
Now simply get all files from https://github.com/drayde/svg2shenzhen/tree/master/inkscape

@PigeonFX
Copy link

Thank you, I did that, but get the following error on export.

I merged the upstream changes into my branch.
Now simply get all files from https://github.com/drayde/svg2shenzhen/tree/master/inkscape

Thank you, very much!

@PigeonFX
Copy link

PigeonFX commented Nov 1, 2021

Thank you, I did that, but get the following error on export.

I merged the upstream changes into my branch. Now simply get all files from https://github.com/drayde/svg2shenzhen/tree/master/inkscape

Hey drayde, having a little trouble downloaded your Branch, but do not seem to have a Drill-NP tick box in the setup under general or other tabs, do I just manually need to make this manual before exporting to KiCad?

@drayde
Copy link
Author

drayde commented Nov 1, 2021

Yes, indeed, it's not in the UI. Just create a layer "Drill-NP" manually, it will then be picked up.

@PigeonFX
Copy link

PigeonFX commented Nov 1, 2021

Yes, indeed, it's not in the UI. Just create a layer "Drill-NP" manually, it will then be picked up.

Thank you so much for adding that feature and helping me!

Have you had an issue with it running on Inkscape 1.1.1?

Get the following error with Inkscape 1.1.1 and 1.1

Traceback (most recent call last):
  File "export.py", line 750, in <module>
    _main()
  File "export.py", line 746, in _main
    e.run()
  File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 131, in run
    self.save_raw(self.effect())
  File "export.py", line 323, in effect
    self.processExportLayer()
  File "export.py", line 497, in processExportLayer
    with open(kicad_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\pigeon\\Desktop\\CS PCBs\\MK3 Test\\.svg2shenzhen-cache\\test.pretty\\B.Cu_g1768.kicad_mod'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants