yaqwsx / PcbDraw

Convert your KiCAD board into a nicely looking 2D drawing suitable for pinout diagrams
MIT License
1.16k stars 91 forks source link

KiCAD 6.0 vias rendered as silkscreen #88

Closed kb-elmo closed 2 years ago

kb-elmo commented 2 years ago

It seems that PCBdraw is rendering vias from KiCAD 6 files as silkscreen now.

Tested it by setting the silkscreen color to red and got this as a result. pcb_render

Is this intentional? Imho it does look kind of weird when all the vias are white.

Ideally they should have the color of the board.

yaqwsx commented 2 years ago

Could you provide me with the source board so I can test it and debug it?

kb-elmo commented 2 years ago

The problem happened on every KiCAD 6 PCB that I tested so far.

But here's the file that I used for the render above: pcb.zip

yaqwsx commented 2 years ago

I traced it that there is indeed a change in KiCAD 6 where the vias are included in generated SVG silkscreen files. However, I wasn't able to locate which settings cause that.

Electro707 commented 2 years ago

What's strange is that using KiCAD's built in SVG exporter, which uses the same class as pcbdraw fundamentally from what I could tell from KiCAD's code, exporting only the silkscreen layer doesn't show any vias: image

Electro707 commented 2 years ago

Another thing I noticed is the exported from KiCAD's plotter in pcbdraw (by replacing the temporary directory with an actual directory), the vias are drawn white while actual silkscreen black. image image

yaqwsx commented 2 years ago

Oh, sorry, I didn't post it here. This is definitely a bug in KiCAD, I opened an issue for that a few days ago: https://gitlab.com/kicad/code/kicad/-/issues/10491

We could make a work-around, but I would (slightly) prefer a fix in KiCAD.

yaqwsx commented 2 years ago

Since the bug got low-priority I guess it won't be fixed until v7 (with the new API). Therefore, I implemented a workaraund in f1b0873.

kb-elmo commented 2 years ago

Thanks! 😄