pcb

Export to PNG always shows pads on other side of board

Bug #701133 reported by Bryan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Low
Bert Timmerman

Bug Description

I am trying to make acid masks by using PNG export. I have done this many times before without problems, but now I can't seem to hide the pads on the other side of the board. I am trying to export only the front layers and then only the back layers. I press export layout and select png. I then set the resolution to 600 dpi, and check "as-shown", "monochrome", and "only-visible". Then, regardless of whether the far-side and pins/pads layers are shown on the screen they are always included in the resulting image. I am running version 20091103, Compiled on Dec 18 2009 at 22:18:40.

Tags: png-export
Revision history for this message
Bryan (poli0048) wrote :

I just tried the same thing with version 20091103 running on Ubuntu Maverick and I get the same behavior.

Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

Aside from the possible bug here, you might find it gives better resolution (for a given file-size) to use the "ps" postscript exporter, and print from a postscript viewer at the printer's native DPI. ps2pdf is also handy if you prefer to print from a PDF viewer.

tags: added: png-export
Revision history for this message
gpleda.org commit robot (gpleda-launchpad-robot) wrote :

Oops.. pcjc2 here, must have accidentally logged on with the commit robot credentials.

Revision history for this message
DJ Delorie (djdelorie) wrote :

Note that the PNG exporter has been specially coded to ensure the correct number of pixels are set for low-resolution devices like laser printers. PS rendering often makes traces one pixel too wide.

Revision history for this message
DJ Delorie (djdelorie) wrote :

I just tried this with the current GIT head and it works correctly. Have you tried 20100929 ?

Revision history for this message
Peter Clifton (pcjc2) wrote :

i wasn't aware of that problem with the post-script output.

Presumably the postscript file is correct to the precision of design, but the tools used to print it may not apply rounding correctly? If there are rounding errors in PCB which mess up the PS output, we need to fix those.

Revision history for this message
DJ Delorie (djdelorie) wrote :

It's a Postscript issue, not PCB. Postscript says that a drawn object includes the pixels at its boundary, so if you ask for a line that's 5 mil wide at 600 DPI, you don't get three pixels (which would be 5 mil of ink), you get four pixels (5 mil between centerpoints of outer pixels). The PNG exporter uses the "fill" rule, not the "outline" rule, so you get three pixels.

Note that my personal PS "bloat" setting defaults to half a pixel smaller to try to compensate for this on my printer.

Revision history for this message
Bryan (poli0048) wrote :

Thank you all for your replies. I have not tested it yet with 20100929. I will do that as soon as I have some free time. Thanks.

Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Medium
status: New → Confirmed
Changed in pcb:
milestone: none → next-bug-release
Revision history for this message
Chad Parker (parker-charles) wrote :

Back in 2011 DJ said that he tried this and it worked correctly. However, since this wasn't marked as fixed, I was just looking at it, and I am able to reproduce the initially reported behavior. I also noticed something. The "as-shown" option in the png exporter isn't exactly in sync with what's displayed on the screen.

The initial report said that objects on the back side were being included in the png output regardless of the state of visibility of the "far side" and "pins/pads" layers. What does appear to affect the output are the state of visibility of the top and bottom layers. So, if you have the top layer is visible, but the "pins/pads" layer turned off, on the screen you wont see any pins or pads (from the top side) on the screen, but pins and pads will still be included in the png output. Similarly, if the bottom layer is visible but the "far side" layer is turned off, the pads from the far side wont be displayed on the screen, but they will be included in the png output.

So, what is "correct behavior" here? The bug is that "as-shown" isn't producing output in the file that matches the output on the screen, but which hid is in error? Should the gtk hid (for example) be displaying pins and pads on the top layer when the top layer is not visible?

Revision history for this message
Chad Parker (parker-charles) wrote :

I forgot to include, if you turn the visibility of the top or bottom layer off, and "pins/pads" and "far side" are on, then you will see the pins and pads on the screen, but they will not be included in the png output.

Revision history for this message
DJ Delorie (djdelorie) wrote :

"far side" doesn't control copper, just silk. The "pins/pads" control is gui-only; for all other HIDs the pin and pad copper are part of the layer group and controlled by the layer group toggles.

So "as shown" isn't supposed to mean "screendump", it just means that the layer stack is as they're shown stacked on the screen. Without that flag, they layers are stacked in group order instead (i.e. for photo mode, where the specific arrangement matters)

Revision history for this message
Chad Parker (parker-charles) wrote :

I pushed a branch to home/cparker/LP701133 that changes the words "as shown" to "screen layer order", to try to make this a little more clear.

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi Chad,

I merged this commit into master and pushed.

Thanks and kind regards,

Bert Timmerman.

Changed in pcb:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Bert Timmerman (bert-timmerman)
Changed in pcb:
status: Fix Committed → Fix Released
Changed in geda-project:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.