Mirrored User Layers

Using version 8.0.3
Application: KiCad PCB Editor x64 on x64

Version: 8.0.3, release build

Libraries:
wxWidgets 3.2.4
FreeType 2.12.1
HarfBuzz 8.3.0
FontConfig 2.14.2
libcurl/8.5.0-DEV Schannel zlib/1.3

Platform: Windows 11 (build 22631), 64-bit edition, 64 bit, Little endian, wxMSW
OpenGL: Intel, Intel(R) RaptorLake-S Mobile Graphics Controller, 4.6.0 - Build 31.0.101.4575

Build Info:
Date: Jun 3 2024 19:04:47
wxWidgets: 3.2.4 (wchar_t,wx containers)
Boost: 1.83.0
OCC: 7.8.1
Curl: 8.5.0-DEV
ngspice: 42
Compiler: Visual C++ 1939 without C++ ABI

Build settings:

Maybe this is a bug, maybe I’m doing something unusual/wrong, maybe I’m just confused… or any combination of those things.

I went to separate some Fab notes from the actual B.Fab layer to make printing/plotting “easier” but I have now totally confused myself and I’m not sure what’s happening.

Here’s what I have now and am getting in different outputs from this design.
(later/soon I will try and remove the company specific stuff and post an actual design, but for now just screen shots.)

all the topside layers make sense, and show up properly in gerbers, pdf, etc. All my problems are with the back-side user layers (I think).
Here’s the layout in PCBnew now;
This is “normal”/front view

Here’s the Flip Board View…

The B.Fab and B.Courtyard act normally but not the User layer (FabNotesBOT)
Notice that the positions of graphics/text moves, and the alignment of text changes.

If I plot gerbers and view from the back-side then I get what I think seems “normal” or at least what I was hoping for.

Then what is even more confusing is the print function from PCBnew gives me the same view as PCBnew. this is from using the “print function” with the “mirrored” option checked.

I tried the “plot” function with PDF selected, but it doesn’t seem to pickup the page size settings from the options. so all i get is the lower corner of the design and there’s not enough to see which way that plot comes out.

I would think that the view in PCBnew with the text mirrored (the backwards R checked) and printing “mirrored” should come out like the gerbers. even if that’s not what’s intended then at least the text should be aligned the same in the flipped view as the non-flipped view.

I’m open to clarifications/suggestions about ideas to accomplish having both the gerbers and the print come out the proper way.

thanks in advance.

My concentration level is low at the moment, and I am not really sure what your intended output is, and therefore your screenshots do not mean much to me.

I just did a short text and when placing text on the B.Fab layer, it is by default shown mirrored, while on F.Fab it is by default not mirrored. And this is as what I would expect. These Fab layers are intended for fabrication notes, so for the back, a printed version (with the text readable) will coincide with looking at the PCB from the back side.

Gerber files should never ever be mirrored. The option for mirroring is also disabled during gerber file creation as it should be. Default for gerbers for all layers is the “front” view of the PCB.

KiCad has no option for mirrored user layers such as the B.Fab layer. This is still one of the gaps in KiCad’s usability. I also find handling of mirroring in KiCad quite bad. What I would like is to have two mirroring settings. One global that works for a whole layer (such as B.Fab and B.Silkscreen), and local mirroring of text strings.

In my opinion, texts themselves should (almost never) be mirrored, but their view should be according to the layer function, but unfortunately this is not the case in KiCad. For example, if you take a footprint on the front, and then flip it to the back of the PCB, footprint texts get the “mirrored” tag, while in my opinion they should not. The texts themselves are not mirrored. They only appear mirrored because you are looking at them from the wrong side of the PCB.

In my opinion the “mirroring” tag of a text should only be set, when the text itself actually appears mirrored on the PCB.

All “User” layers are neutral with regards to top/bottom. There’s no way in KiCad to define top/bottom pair of user layers.

You are right: when the whole view is mirrored, KiCad doesn’t mirror texts which are in non-top/bottom layers, but mirrors texts which are in top/bottom layers.

Whether this is a bug or not, I’m not totally sure. For engineering etc. notes it may be beneficial for the user to see the texts always readable. They aren’t part of the actual board and aren’t as graphical items tied to board items. They may be logically tied to the board details, but then it’s enough to have the “edge” of the text always in the same page relatively. The top/bottom layers, on the other hand, are explicitly meant for being tied to the board details so that the text is like part of the board and must be mirrored when the board is mirrored or “turned around” (flipped).

Notice that the “Flipped” view in KiCad is only a kind of trick. Gerbers, on the other hand, are always plotted as from top view and the gerber format doesn’t even recognize text – it’s just graphic shapes. Therefore it would be impossible in the gerbers to first plot them in one way but not mirror them in the mirrored view.

Some users (and developers) may argue that this kind of text rendering is a feature, not a bug. In my opinion it could be left as is, but there is already a feature wish for creating top/bottom user layer pairs which would solve the problem, at least for those who know how this behaves.

EDIT: you can add your thumb up vote here: Add paired (flippable) assembly layers to Pcbnew (#8455) · Issues · KiCad / KiCad Source Code / kicad · GitLab, and maybe add your use case if it’s not already explained well enough in the comments.

I have never used (and probably will never use) Flip Board View. When I sometimes design PCB with top being continuous GND and all elements and connections at bottom I also look at PCB from top. Flipping view destroys all my imagination about what is happening in designing.

But I think it is a bug. User layers are for any use by user and if user use one layer for some kind of not connected with PCB comments for example on the design stage he is and what still have to be done the rest (if used) are probably used for something connected with PCB. So if view is flipped everything should be flipped. If such not connected with PCB layer is flipped the problem is small. If PCB related layer is not flipped than the whole this Flipping view function losses sense.

Yes, to both of the above. there is nothing wrong with the F.Fab or B.Fab layers, text appears as expected, “flipping” works as expected both in PCBnew and for gerbers.

That seems reasonable and sensable, that is the feature I would like to see.
I think this feature should be upvoted;

Brains are funny things; I would say the opposite; I flip the view quite often as thinking about part alignment and spacing from the other side quite difficult. When I’m placing parts on the back or even routing the backside parts I flip the view. This is especially true when using micro-vias that do not go through the board.

I have never used micro-vias. May be my PCBs were simple enough to not have to see at them from both sides. When I was writing about imagination I was thinking not about positioning related to something but about how I plan to route all tracks I didn’t started routing them yet. I design practically single sided PCBs without needing to route GND net (I have whole bottom as GND) and many times before I even start routing I know which way each connection will go. I must know that I am able to make all connections and if not that means I have to find the solution because routing if I then end with few tracks not routed means whole work was senseless.
If I will flip PCB I will be not able to flip that all tracks map I have at the moment in my head.
I think that when I will be using signal vias (I have only GND vias) and route at more than one layer I will start routing before knowing the whole PCB plan.

@StecklerCircuits, please edit your gitlab comment and add information about having the flipped board view which doesn’t flip texts. That’s not commented on yet, the old comments (and the duplicate report) talk about flipping components between board sides.

Generally speaking the developers want the gitlab issues to be self-contained, so if there’s relevant information it should be directly there. Links are OK for background information.

I ended up making a separate bug report just for the wrong justification with flipped text. I felt that was a different issue/bug than the feature request.

I still think the feature request is valid/good and would like to get it bumped up to be worked on, but I’m not sure exactly how that happens.

Your issue has already been closed with a “fix comitted”.
I don’t understand your remark here, because on gitlab you already wrote:

And as an answer you got it’s now likely to be cherry picked for KiCad V8.0.5

Note this is quite normal for KiCad. I see it often that bugs and oversights that are easy to fix are getting fixed within a few hours or days.

You mean how to vote for an issue to show you want it to be solved? In KiCad development a thumb up :+1: for an issue is a vote.

looks like this will get included in version 9! yea! :nerd_face:

Will this feature be implemented for all layers?

No, it works for User.n layers (n ∈ {1, 2, 3, 4, 5, 6, 7, 8, 9}). You can define each of them as front or back layer. If you define two consecutive odd and even numbered User layers (for example 1 and 2) as front and back layer respectively, flipping items will change the layer between front and back and mirror the items. Without this odd/even front/back pair the layer is not swapped.

Looks perfect, thanks again!
Can’t wait to be able to use it!

I would expect some ruined boards if users could mirror any of the production layers

Okay, thanks for clarifying.
Altium can mirror any layer for the gerber generation. AFAIK not for working during the layout design.

Perhaps I’d better create a new topic to discuss this.