I have searched around but found no solution to this: When I try to add a 3D footprint (.wrl) to my own project-specific library under the Footprint Editor, nothing shows in the 3D viewer. Same goes if I try to add afterwards via Pcbnew editor.
Other 3D models DO show up in the 3D PCB view for footprints which Kicad team have kindly made available under the program folder, but any manually selected 3D model do not show.
I understand there could be an issue with paths/environment variables, but I have tried a plethora of combinations and program restarts and made a reasonable effort to resolve this on my own to no avail. RC1 release had the same issue so was hoping a new install would help, but no.
What could be going wrong? Is there a clear step-by-step checklist to add custom 3D models? Why would it be any more difficult than clicking “Add 3d Shape” in the edit footprint dialog?
does the 3d shape work at all? Can you attach it here or upload it somewhere so that others can check it?
how does your KISYS3DMOD path look like? (KiCAD main window, >Preferences>Configure Paths
I can load 3d shapes from anywhere on my machine when I use the ‘absolute’ path option (rejecting relative path) after adding a new shape in the footprint editor via [footprint properties] dialog (that’s in BZR6097 though)
Anyway, the 3D filename resolution is abysmal; hopefully there will be changes soon which make the selection and use of 3D models much easier, but those changes are for the next stable release and there are no plans to backport them to the current stable version.
Here is a link to the 3D file I am trying to add. It was converted from a step file using FreeCad and at least shows up fine in FreeCad.
My KISYS3DMOD path is “C:\Program Files (x86)\KiCad\share\modules\packages3d”. I found Kicad installs with the default directory as something bogus (a bug in the windows version perhaps?) so had to change it to this to get the supplied 3d packages to work.
I can’t get 3d shapes to work using an absolute path. I even tried placing the file in C:\ root folder in case something was up with the long folder names but it made no difference…
Well, the file loads in FreeCAD, but you can’t really see it in KiCAD because… drumroll … it’s way off track for being at the centre of the footprint.
This is a model I made myself (JST SH, 1mm pitch 4 pole side entry) which sits ‘dead centre’ at the origin, flat on the pcb without any positioning needed and yours is back there somewhere and also needs rotation…
That’s why I make my own models… takes forever to align that piece of vertices and it’s not even nice to look at as it’s in one color - has got details though.
To get it to the origin I had to adjust the position data in freecad:
X = -220 mm
Y = +10 mm
Z = +19 mm
Then I exported it as wrl, to get those ‘baked’ into the model.
Importing the saved version and another set of modifications:
Angle = -90’
Axis:
x = 0
y = +1
z = 0
position:
x = +0.05mm
y = 0
z = +2.05 mm
So, now imagine you have to do this for all versions of that model they make… by the time you aligned each of them, you have it modeled 3 times in FreeCAD or Wings3D at the correct position and rotation and be done - also with different colors for the several pieces it’s being made of
Many thanks for the detail on adjusting the origin etc. I suspected this would be an issue that I would have to tackle but haven’t got that far yet
Unfortunately though, I still cannot view either of the files you kindly modified for me. That is, Kicad will not show either shape after assigning one in the footprint editor, so I’m left with the same problem…Argh! I also tried copying them to the KISYS3DMOD folder for relative referencing but no luck there. A close/restart doesn’t seem to help either!
Ups, I made the move/rotate stuff in FreeCAD, but didn’t check that part of the problem. Sorry.
And it’s not showing for me too… well, at least you’re not alone
Exporting it as STEP and opening in Inventor doesn’t help either… nothing get’s imported.
You know that the scale is off as well?
I imported the moved+rotated model into a file with a 15 pole TE 0.5mm pitch FPC connector… the 12 pin model of yours has got the same width (for the pins) as the 15 pins of mine…
Ok… have a look here, should be synched pretty soon:
Checked them against a 14P TE with same pitch… came out well.
The datasheet wasn’t specific where the FPC ends, so I assumed 3.3mm from the entry (where the 4.6mm are measured towards the end of the housing).
This means, if you draw your footprint (or adjust it) to get the model positioned easily take a look at this example for the TE connector - the FPC ends at the centre of the footprint:
And one has to repeat that 3rd confimation step for evry bit of info one wants to see from them… datasheet? step model? spec sheet? drawing?
They’re as insane as that other company that makes connectors… LTW. Paranoid Info grabbers.
Annyhow, had to work from a badly scanned pdf yesterday which didn’t contain the inside of that connector for the model up there, this pdf has got a view of it:
Hirose_FH12-0.5mm_EDC-153024-55-51.pdf (283.3 KB)
Yay! - the FPC ends 3.4mm (2.1+1.3mm) from the entry face… so my 3.3mm are pretty close and good enough.
The STEP model one can download looks like the one @mikaels had converted to VRML.
I loaded it into FreeCAD with the 12 pin variant I did and see what we get:
@Joan_Sparky
I agree that manufacturers have not really nice models…
for that reason I started to build the 3D MCAD library
Anyway @mikaels , if you follow these steps you shouldn’t have any prob: 1. download the STEP model 2. open it in FreeCAD 3. center your model to footprint using kicad StepUp aligner tool (*) 4. export to VRML using kicad StepUp exporter tool