How to flip components and keep silk positions identical

I’ve got a footprint which has silkscreen text on the B.SilkS layer. When I “Flip” the placed component in Pcbnew, the position of the silkscreen text changes relative to the pads which results in the silkscreen overlapping the pads when the component is placed on the bottom of the board.

Is there a way to create the footprint so that the text position relative to the pads is the same irrespective of which side of the board the component is placed on?

Which version are you using? My flip is vertical.

Oh and sharing the footprint file would also make testing a lot easier for us.

1 Like

I think this is a bug. I opened a footprint from a board. I added text to it and rotated the text 90 degrees. I updated the board footprint. Then flipped the footprint. Relative to the footprint the text is now rotated 180 degrees.

image

The board view is flipped, therefore the footprint isn’t mirrored in the screenshot.

EDIT: the offset may be caused by this wrong rotation.

@eelik, your textbox overlapped the pads in the first image, so I would expect the descenders to overlap the pads in the second image since the textbox is rotated by 180°.

I didn’t express myself clearly. The text rotation is a clear bug. I just thought it may have something to do with the wrong offset of the original poster. I didn’t mean that in my example the text is in a wrong place, only that it’s rotated even if it shouldn’t be.

Which version are you using?

@Seth_h 5.1.0-0

I just thought it may have something to do with the wrong offset of the original poster.

@eelik I think you figured it out. I didn’t catch that the text was rotated incorrectly when I flipped the component. Here’s what it looks like when I rotate one of the labels 180deg after flipping the component.

Oh and sharing the footprint file would also make testing a lot easier for us.

@Rene_Poschl see attached.

test.kicad_mod (5.0 KB)

How did you create that footprint? The text is set to justify bottom which is not an option in the footprint editor.
This in combination with the rotation restriction for text creates your problem.

This one fixes the text fields on the bottom. But the ones that are on the top layer originally are still moved around. (Mirroring really results in strange results unless the text field uses center/center justification): test.kicad_mod (4.9 KB)

And mirroring is not the only operation that creates problems here. Note this screenshot where i have two mirrored ones and two rotated ones:


I should add i use version 5.1

How did you create that footprint?

If I remember correctly, I started by copying the original footprint from this EAGLE library mikrobus_lib.lbr (35.1 KB)

This in combination with the rotation restriction for text creates your problem.

I’m not familiar with what you mean by rotation restriction. Can you explain?

Text in kicad (and eagle as well) is restricted to two reading directions (rotate any text field and watch closely)

This can be turned of per text field but will result in having some text upside down on the final product. (restricting direction means you can read all text from one viewing direction. Without that you would need to rotate the board around to be able to read everything.)


Here the fully fixed footprint with all text fields set to center/center justification while it still looking like right aligned for the top text (by carefully choosing the text field location)

test.kicad_mod (4.8 KB) (Edit reasons: I accidentally deleted the mirrored flag for bottom silk text)

Thanks @Rene_Poschl! I’ll take a look at the one you fixed.

How did you fix the text to be center justified?

I used a text editor as it allowed me to edit all of the text fields at once. But you can do this using kicad by right clicking on the text field -> properties (or hotkey e)

Also notice i updated the footprint as i accidentally deleted the mirror flag for bottom layers. (This mistake is still easy to notice in the screenshot. I did not care to update it with the new footprint)

Sorry, I mean how did you fix the justify bottom? (it looks like you can only fix left/right justification within KiCad)

Well as i said: text editor. I just assumed that selecting center would also justify center in the second direction. Seems it does not do that.

Edit: reported this as a bug https://bugs.launchpad.net/kicad/+bug/1823079

I’m not sure I can follow. Do you mean that text rotating 180 degrees when flipping a footprint isn’t a bug but a feature?

The feature is that kicad limits the possible rotation states of text to ensure all text can be easily read without needing to rotate the board.

So yes some rotation and maybe also mirror operation will result in text being “rotated” to fit that direction.

The problem is however with text that is not justified center/center as it will not only rotate it but seemingly move it around as well.


To make it clearer: rotation 90 and -90 (=270) will result in the same text “rotation”. So do 0 and 180.

I created a bug report for this: https://bugs.launchpad.net/kicad/+bug/1823090

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.