Alignment of 3d model to footprint

When I create a 3d model and try to align it to the footprint I noticed misalignment which seems (at least to me) unpredictable.
I would like to create the footprint with e.g. Pin1 right at the origin and other pins accordingly. In the same way I would like to create the 3D model with Pin1 at the origin and build it in the same direction as the footprint. This way it should sit right in place after scaling with 0.39.
Which rules have to be applied to achieve this?

1 Like

Do not use the scaling or alignment functionality of the footprint 3d settings. (The scaling should be 1,1,1; rotation should be 0,0,0 and offset should be 0,0,0)
This should be done with the wrl file. (Create it such that it is correctly aligned with your footprint)

The easiest way to achieve this is by using FreeCad to design the model and KiCad-StepUp (to align and) export it. (aligning should not be necessary if you design the model from scratch.)

Scale the wrl model itself.

With your own footprints you can do that. For the official kicad footprints, only Through hole footprints have pin 1 at (0,0). Surface mount footprints have the center on (0,0).
See the kicad library convention for more details.
In other words: If you plan to share your footprints/3d models use the kicad library convention as a guide.

2 Likes

thanks for info. Now it works simply by scaling at design level.

I often use FreeCAD to convert STEP files from chip makers and always have to scale/shift them inside kicad 3D. Is there a way to scale/shit them within the generated WRL files?

I gave a link to the kicad stepup tools. Have a look at the demo videos :wink:

1 Like

@JoeChen as @Rene_Poschl already pointed out there are some tutorial videos out there:
https://www.google.com/search?q=kicad+stepup#q=kicad+stepup&tbm=vid

import STEP model and align to kicad footprint

an other ksu alignment video
please note you don’t need to copy all demo folder files, just the kicad-StepUp-tools.FCMacro file

an other one (from 12m)

kicad StepUp general use

Now the ksu Gui has been improved and it is more compact… but the functionalities are the same or even better :smiley:

2 Likes

Watched the videos through the links. They are very helpful! Thanks @maui and @Rene_Poschl.

Hi,
thanks for your input. I looked at the videos, but I found it easier/faster to align the 3D part in a 3D system, so that it matches the footprint in the footprint editor. Because I am not very familiar with FreeCAD I use it only to import .stp and export .wrl. But I guess that FreeCad can also align part (moving, turning) to the origin and scale around the origin.

if you watch the first video you can see that with ksu you can:

  1. create a reference axis block at (0,0,0)
  2. center your object in X and Y
  3. put your object to plane Z

with ksu you can import your footprint in FC, then import your model and align model to fp in a mechanical environment
in pcbnew fp editor 3dviewer you can align the model just in a visible way, without knowing the real placement (distance) between the model and the pcb/pads
4) when you export your model with ksu, wrl will be just scaled automatically
PS never scale a mechanical model … keeps your work in mm scale 1:1

2 Likes