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

Add SetPlotOutlineMode(False) #6

Closed
wants to merge 2 commits into from

Conversation

andresmanelli
Copy link
Contributor

Using (almost) latest devel version of KiCad, the output SVG file was populated with polylines instead of paths. This PR fixes the problem where (I think), KiCad was adding another general outline to the plot.

Let me know if this breaks anything, I tested it with good results.

@yaqwsx
Copy link
Owner

yaqwsx commented May 18, 2017

This change is incompatible with older version of KiCAD, as the method does not exist. Please wrap it in a similar manner as in #1

@yaqwsx
Copy link
Owner

yaqwsx commented May 18, 2017

Here is the error trace with older version of KiCAD:

End of KiCAD debug output
Traceback (most recent call last):
  File "./pcbdraw.py", line 368, in <module>
    wrapper.append(get_board_substrate(board, style))
  File "./pcbdraw.py", line 215, in get_board_substrate
    popt.SetPlotOutlineMode(False)
  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 10801, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, PCB_PLOT_PARAMS, name)
  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 74, in _swig_getattr
    return _swig_getattr_nondynamic(self, class_type, name, 0)
  File "/usr/lib/python2.7/dist-packages/pcbnew.py", line 69, in _swig_getattr_nondynamic
    return object.__getattr__(self, name)
AttributeError: type object 'object' has no attribute '__getattr__'

@andresmanelli
Copy link
Contributor Author

I just pushed the try/except block. Does it solve the compatibility issue?

@yaqwsx
Copy link
Owner

yaqwsx commented May 18, 2017

Perfect, thanks for the contribution!

@yaqwsx yaqwsx closed this May 18, 2017
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.

None yet

2 participants