Misalignment of pins from symbol to footprint?

See the attached screenshot of 3d view in KiCad 7. The symbol and the footprint have the 3 pins in the same order, but they don’t align in PCB layout as shown in the 3d view. How can I correct this? Thanks.

Edit the footprint, and there is a tab where you can adjust the 3D model parameters. You will need to change the offset value

1 Like

Thanks. There is a lot for me to learn.

I have done some searching on this, but I don’t understand why it is necessary to program offset into this footprint. Where does this need for offset come from? Shouldn’t I be able to design symbol/footprint pairs that work without offset? Tell me what I am missing, please. Thanks.

For all 3D models in KiCad’s libraries both all offsets should be zero, and the scale factors should be 1 because the axis origin of the 3D model is the same as for the footprint.

But there is no real “industry standard” for this as far as I know, and the result is that if you get some 3D model from some other source, then you have a quick method built into KiCad to tweak those values.

1 Like

There’s some confusion even in your first post vs. the title. We know nothing about your symbol. What you show is mechanical misalignment of the footprint and the 3D model. That’s what gmc answered: you have to move the 3D model relative to the footprint.

The 3D model has nothing to do with the schematic or even the PCB electronic design. It’s meaningful only for mechanical design if you want or need to use a 3D model of the board.

Also, we don’t know where your footprint and 3D model come from. If the 3D model properties in the footprint properties don’t have offset but the model looks like in your screenshot, then you have something else than the original KiCad footprint and/or 3D model because in the official libraries the models are (sans possible but in this case improbable bug) correctly aligned.

If you want to know the technical reason for the misalignment: it comes from the origin (coordinate zero) point of the footprint vs. the origin of the 3D model. If you create a 3D model or download it from somewhere, the origin point can be anywhere depending on the designer’s whim. It can be even 1 meter away from the actual object. Therefore it’s possible to set the offset in KiCad. Another option is to modify the actual 3D model.

2 Likes

I was confusing footprints with 3D models, and I now understand that they are totally different.

I didn’t find a symbol for pin headers (Dupont) that I liked, so I created my own, and started with a 3-pin header. As bad luck would have it, the footprint I chose (which I believe is from a KiCad library) requires a 2.54 mm Y offset in order for the 3D model to properly align. As I continued to create symbols for 1-pin through 10-pin headers, I found that the 7-pin also required an offset. (As an aside, I am still having trouble with the 8-pin; it seems as if the 8-pin 3D model actually only has 7 pins.) I would like to learn how to modify (and perhaps create) 3D models, but I suppose that will have to wait. Thanks to each of you for your help.

The 3-pin vertical pin header footprint and 3D model in the KiCad libraries are already properly aligned, I just tried. So, you have to describe your workflow with more details.

In the official libraries the center of the pin number 1 is the origin. Both the pin header footprints and 3D models are created by scripts and they align correctly: the footprint origin is in the upmost pin, and so it is in the 3D model. That’s why they are aligned without an explicit offset.

1 Like

You had to do something more than only creating your own symbol.
If you didn’t touched footprint (used KiCad footprint) you should not have the problem as 3D model is placed relative to footprint. Symbol has nothing to do with 3D model.

Edit:
For me it looks like your footprint has origin in the middle (pin 2) and 3D model has the origin at pin 1 as all (or at least most) of KiCad THT 3D models have.

I was going that way 4…3 years ago. Even I still don’t understand what exactly is happening in FreeCAD tree view I was able to create one pin terminal block model and then generate from it models for 2…10 pin terminal block headers I use.

1 Like

Yes, I prefer footprints to rotate around their centers, so I changed the 3-pin footprint to the center of pin 2. That necessitated a 2.54mm Y offset. Now, I understand and have changed the footprint back to have its origin on pin 1. Ditto for the 7-pin. I am still investigating the 8-pin, but probably is my mistake. But I am learning. Thanks.

1 Like

I have moved 3 pin and 5 pin 2mm headers to rotate against their center pin. I opened KiCad 3D model in FreeCAD, shifted and saved to use in KiCad. I didn’t used KiCad 3D model shift settings as after reading KiCadStepUp (FreeCAD workbench) cheat-sheet I understood that (from some reason) it is better if they all (except one) are zeroes. Later I was told here that my understanding is not correct and they can be freely used.

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