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

Unable to export a single rectangular edge cut #119

Open
cutlasses opened this issue Feb 14, 2021 · 3 comments
Open

Unable to export a single rectangular edge cut #119

cutlasses opened this issue Feb 14, 2021 · 3 comments

Comments

@cutlasses
Copy link

I'm using Inkscape for Mac 1.0.2. Since upgrading I have been unable to export using SVG 2 Shenzhen. I have the most up to date version (0.2.18.7).

Steps taken.

  1. svg2shenzhen -> Prepare Document (leave options as default)
  2. Draw a rectangle on the document
  3. Convert rectangle Object to Path
  4. svg2shenzhen -> Export to KiCad
  5. Export fails with the following error

Traceback (most recent call last): File "export.py", line 750, in <module> _main() File "export.py", line 746, in _main e.run() File "/Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/inkex/base.py", line 140, in run self.save_raw(self.effect()) File "export.py", line 323, in effect self.processExportLayer() File "export.py", line 468, in processExportLayer kicad_edgecut_string = self.exportEdgeCut(kicad_mod = options.filetype == "kicad_module") File "export.py", line 659, in exportEdgeCut y = (path[1][1]) IndexError: list index out of range

If I leave out step 3 (converting to a path), the export works, but I don't see anything when the project is loaded in KiCad.

Thanks!

@cutlasses
Copy link
Author

I have discovered that, if, after converting the rectangle to a path, I also apply Path->Union, the error goes away and the rectangle appears in KiCad! But, I am unable to get circular cuts to work in this way, so am still unable to achieve what I need to do.

@dandelany
Copy link

I am also experiencing this issue when attempting to export the Edge Cuts layer, running svg2shenzhen 0.2.18.7 and Inkscape 1.0.1 on Windows 10. I have an Edge Cuts layer with bezier curves and exporting it yields the error:

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 140, in run
    self.save_raw(self.effect())
  File "export.py", line 323, in effect
    self.processExportLayer()
  File "export.py", line 468, in processExportLayer
    kicad_edgecut_string = self.exportEdgeCut(kicad_mod = options.filetype == "kicad_module")
  File "export.py", line 659, in exportEdgeCut
    y = (path[1][1])
IndexError: list index out of range

I can also confirm that if I apply Path -> Union the error goes away, but the exported KiCad file does not accurately capture the curves:

Screenshot 2021-04-25 143217

Screenshot 2021-04-25 143528

@arthurrowland
Copy link

@dandelany could you share the SVG so I can try and reproduce? I experienced a similar issue on some curves and think I resolved it by adding more nodes.

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

No branches or pull requests

3 participants