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

No Attribute 'SetLineWidth' in KiCad nightly #20

Open
TobisLab opened this issue Oct 26, 2020 · 5 comments
Open

No Attribute 'SetLineWidth' in KiCad nightly #20

TobisLab opened this issue Oct 26, 2020 · 5 comments

Comments

@TobisLab
Copy link

TobisLab commented Oct 26, 2020

Hi,

I'm using a pretty recent nightly version of KiCad and always get this output when using your scripts:

C:\Users\Tobias\Desktop\kicadScripts-master>"C:\Program Files\KiCad\bin\python.exe" plot_board.py "C:\Users\Tobias\Documents\GitHub\uDice\uDice\uDice.kicad_pcb"
Traceback (most recent call last):
  File "plot_board.py", line 425, in <module>
    popt.SetLineWidth(FromMM(0.35))
AttributeError: 'PCB_PLOT_PARAMS' object has no attribute 'SetLineWidth'

Not sure if it's just the attribute name that has been changed or whether there are more changes.

@gregdavill
Copy link
Owner

I actually don't think that call is required when plotting with SVG, it appears to be missing in v6. Which is kind of handy because we need a good way to detect if we are using KiCad v5 or KiCad v6, because there are some other changes needed to support the output from v6.

Can you give this version a try: 0f579d2

@TobisLab
Copy link
Author

Thanks a lot for looking into the issue!

Running the script doesn't show any errors any more:

C:\Users\Tobias\Desktop\kicadScripts-master>"C:\Program Files\KiCad\bin\python.exe" plot_board.py C:\Users\Tobias\Desktop\uDice\uDice.kicad_pcb
Merging layers...
Rasterizing...
Detected Inkscape version 1.0+
Merging layers...
Rasterizing...
Detected Inkscape version 1.0+

But this is all I'm getting, just the front, no back side file gets created. I also tried it with a few different board files, with the same result.

uDice-Front

I upgraded to the latest nightly build and Inkscape is v1.0.1

@gregdavill
Copy link
Owner

Hmm. Are you able to share your KiCad design? I'll run some tests on windows tomorrow.

@TobisLab
Copy link
Author

Sure, here are the two boards I was trying it with:
KiCad_files.zip

@gregdavill
Copy link
Owner

Strange, it appears the scaling of layers is different from the SVGs generated on a windows machine.

I don't have much more time today to debug unfortunately.

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

2 participants