Adding 3D models to the library

Most likely we’re done with this Post but I want to finish my posting by addressing above…

Changing FileName’s, Linked Files (assigning an image file) and, most any of a Footprint’s contents is simple - all programming languages can do it.

And, changing/setting position’s/orientation’s…(geometry) is no different than changing ‘text’. Python has Excellent Wildcard ability in combination with Search and Replace… I’ve done it

Python has ‘Walking’ through DIR/Folder/Files ability.

Quick demo showing example of Step-Extension Case change and changing the Name of the linked Step File… (I just added to existing name for demo but I could have changed to anything).

I opened some files to Verify/Show they got changed…

The ‘trick’ isn’t knowing ‘how to do it’, the ‘trick’ is knowing ‘what you want to do’ and that’s where @phil12345678911 fell short…

Thanks @BlackCoffee

My comments were really aimed at requiring to open and identify each 3D image, confirming that that particular image would match a footprint, and then matching the 3D image name somehow to enable an automatic programme to attach the images to the footprints.

IMHO you might just as well attach a 3D image to a footprint as you confirm it is the correct image for a footprint.

1 Like

Well that’s your only realistic option. The current way automate this task needs that you are making your 3D models yourself or at best only have one vendor for your 3D models. In this case you can standardize the models so that it is easy to automate. Another way is if you take in 3d models that already have footprints then you can probably relate them the same way they were form the import.

If your models come from random sources then there’s no guarantees since we can not even standardize on what axis is supposed to be up across 3D CAD applications.

Or you could train a AI for this.

An interesting exercise for someone.
Just teach AI to recognize and understand each 3D image and footprint, then simply match 'em up!
Maybe even teach AI to teach itself the process. :smiley:

The bigger PCB design offices (10+ people working on PCB design) tend to have people who only do “parts management”. From creating (checking, verifying) symbols and footprints to 3D models and database stuff etc, but do not do any schematic or PCB design.

If you are interested in more automation. Look into the library part for KiCad on gitlab. There are scripts for creating footprints and other library management tools that are not part of a normal KiCad install.

I also had a short look at kicad-cli It can export or upgrade footprints and symbols, but it can’t do other things with it. A feature request to be able to add or modify fields seems reasonable.

Kicad has this Library Dept. also, and it takes approximately one hour per symbol/footprint/3D image to confirm everything is correct with an included data sheet.

The OP is complaining that there is no automatic function in any CAD program to match personal footprints to personal 3D images, and he has 100+ to sort.

As @joojala mentions: an exercise in training AI? :smiley:

Yes that old ’ volume’ war is …well…getting old :rage:
:mouse:

I’ve wondered about this also ie if you create a new custom schematic symbol you can add a footprint to it. If you can add a footprint it seems logical to me that you should also be able to add a 3D model to it, since they’re both representations of the physical device.

I assume the answer is along the lines of “because the footprint library is where all that stuff happens”. All well and good however say you assign your new custom symbol a system footprint that doesn’t have a 3D model (many dont), you dont get a 3D model in your PCB. Nor can you add one because the system footprints are read only. To get one you have to edit each of your parts in the PCB. This can be tedious, trust me I know as I use 3D export with every PCB.

Maybe the answer is to duplicate the system footprint to a custom one and add the 3D model there. All seems a bit complicated and would be easier if you could just add the 3D model to the custom schematic symbol I think.

As a matter of interest, because I’ve had to do this quite a bit I find the quickest way is to take a screen grab of the the first item you edit showing all the XYZ rotations/offsets/scales etc, then it’s easy to duplicate as you edit each one, reading from the screen grab. Luckily when you open the “file manager” to point it to your new 3D file, the file manager opens to where you loaded it last time, which saves a few clicks.

My 2 cents anyway.

I get photo-like view of each my PCB, but I have never edited any part at my PCB. If you do it for each PCB than I’m very surprised you don’t prefer to do it only once.
When in 2017 I moved to KiCad (4.0.7) I noticed 3D exists (never used 3D before) and decided to expand my documentations with PCB 3D view (just for fun).
So first what I have done (before designing my first KiCad PCB) was to make my symbol and footprint libraries. Each my symbol has footprint attached, each my footprint have 3D model attached. So I have never run through the step of footprint assigning in schematic and all footprints at my PCBs get 3D model automatically.
Soon I found that I want to use diode bridge that have no 3D model in KiCad (others had, but this (MBS) didn’t). So to make this model I learned FreeCAD to the enough level to be able to design 3D models.
Here is first 3D model I have done:
MBS

Linking 3D model to symbol has no sense, I think. Many IC symbols can use the same (like DIP14) footprint and 3D model once attached to this footprint will work for all of them. It is true until you don’t want to have 3D models with IC names written at their top, but this would probably be an exaggeration.

To say you truth I have a problem to imagine what are you writing here about. I probably newer been in those KiCad regions.
All my models are such defined that all rotations and offsets are 0.

Using 8.0.4.

You can create a local symbol and footprint library and re-map both .sch & .pcb to use these locations. Why has the KiCad team left out 3d models. The plugin does work properly in this version.

It seems if you can re-map the others, why not copy these over as well and add a link under project to the copied models ?

Thanks

For 3D, you use your OS to create folders and libraries. 3D images are then linked to footprints in the Footprint Editor.

In kicad8.99,you can now embed various elements in your schematics, pcb layouts, footprints and symbols,include the 3d model of step format

==========

ADD 3D MODEL STP & WRL FILES

Create [“Foldername”]3D
Add 3D STP & WRL FILES to ['Foldername"]3D

Copy ['Foldername"]3D
To —>
%UserProfile%\Documents\KiCad\VER#.0\3dmodels

==========

==========

ADD PCB MODEL FOOTPRINT LIBRARIES TO SHARE\KICAD\FOOTPRINTS
Create [“Foldername”].pretty
Add [“3DModel.kicad.mod”] Footprints for 3D Models to Folder
Copy ['Foldername"].pretty:
To —>
%UserProfile%\Documents\KiCad\VER#.0\footprints\


ADD FOOTPRINT LIBRARIES TO KICAD THRU MAIN GLOBAL INTERFACE
Open the Main ‘Global’ Interface —>
‘Click On’ Footprint Editor
Select Top Menu Far Left Tab ‘File’ —>
In Drop Down Box Select ‘Add Library…’
BROWSE TO —>
%UserProfile%\Documents\KiCad\VER#.0\footprints
Add [“Foldername”].pretty

==========

@invntefx please consider removing this post. As dsa-t pointed out it is bad advice and people following it will lose their work. Those folders are read-only for a reason.

I have edited the thread post to indicate the KiCad install ‘default’
subdirectories in:
%UserProfile%\Documents\KiCad\VER#.0\

1 Like

We get far too many posts of issues caused by editing the default libraries, which then get overwritten

I’ve never tried the nightly builds before but gave it a whirl and installed 8.99.

I do not see any options under EXPORT (pcb) or another option during the process for including 3D models. Could you explain how you did this in 8.99.

Thanks

I haven’t tried this yet, but here is the link to the 8.99 development features: https://forum.kicad.info/t/post-v8-new-features-and-development-news/48614/28

Thanks for the info…

I found the option and you can embed the file. Note: It would have to be done on each instance of the footprint occurrence within the design (time consuming). Due to the size of 3d models, they should really remain separate from the .pcb file (IMHO). I’m not sure if loading the .pcb also loads all 3d models. Bloating the .pcb file “may” drastically increase load time.

The symbol and footprints are automatically embedded (pretty small in size) so that’s nice for archiving. There was a plugin to extract these and place them into a directory along with changing the 3d model path, but it’s not working (I’ve filed a bug).

My original quest was to archive the design quickly and be able to send it off to the customer. This process would include just those 3d models within the design. I like the plugins functionality, but they can break. If it was part of the application, that would be less likely to happen.

Regards

glad my post inspired so many people…

maybe this is the sign there is room for such a feature to be added

1 Like