KiCAD - imported 3D model in FreeCAD has components with wrong orientation

I am trying to export 3D model from KiCAD and I found nice FreeCAD macro named “KiCAD stepup tools” which looks promising…

I got 3D STEP (version AP214) models on[3D Contents Central, put them next to .wrl files inside of “/usr/share/kicad/modules/packages3d/” and I changed their prefix to match .wrl file names.

Then I opened FreeCAD, started the macro, edited the configuration file “~/ksu-config.ini” and I just set the constant “prefix3D_1 = /usr/share/kicad/modules/packages3d/”. When I clicked the button “Load KiCAD board *.kicad_pcb” I get an error below:

"/home/ziga/Dropbox/workspace/programi/kicad/projects/2017-03-21 – blinky/libraries/models/s8211-46r.wrl error: reset values of scale to (xyz 1 1 1)

This is for a component that I prepared following this tutorial.

Board gets assembled, but I get the wrong orientation for three parts:

Does anyone have any sugestions about the error that I get for one part and could anyone give me an advice on how to fix part orientations.

try it all over with https://sourceforge.net/projects/kicadstepup/ :slight_smile:
this does automatic scaling of your component and makes everything so much easier

the problem lies with the need of using the scaling in the footprint editor. the model should already be scaled
you need to change the .kicad_mod file or open the footprint in the footprint editor…
the last part of the kicad_mod file should look like this:
(model pathblabla/filebla.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)

1 Like

this often happens because the footprint .kicad_mod has not the same orientation values as the footprint one inside the board… probably you aligned your model to fp in FreeCAD but you didn’t update those values to your kicad_pcb file

as @Shack said, check the 3D fp parameters in your board…

PS ATM there are already a lot of 3D models already working out of the box in the kicad official library and in a side repo especially built for MCAD integration

PPS don’t use WRL models not derived from STEP models… in your picture I see you are using wrl that are not exported from STEP mechanical model

PPS this thread may also help a bit :wink:

1 Like

The 3d model library is not automatically updated. In the last few month a lot has changed. It might be worth downloading the 3d library files by hand. Either from the packages3d repo or from the kicad-library repo.
I think especially the resistor and capacitor models have been updated. There should also be new soic models in the repo.

I saw this video of yours and is this the way I should do it? https://www.youtube.com/watch?v=O6vr8QFnYGw

Yup. At least of some parts. (everything that is in the packages3d repo has step files.)
Currently everything that is in the new repo should also be in the old repo. A few parts have not been copied to the old repo though.

1 Like

yes, there is also a thread here


and a video from a user here
(he is doing a bit of extra stuff, copying all the demo and not only the macro file, but the video is quite complete)

Please have a look also to the FC-script-generator-starter-Guide.pdf available in the demo folder

But recently main SMD 3D parts have been merged to official KiCad repo, so it is now just a copy and paste operation or an update now…
For Connectors and missing mechanical models the way is just following the StepUp video above

1 Like

Thanks, but it is still useful to know how to generate your own elements. =)

1 Like