I’ve just built the 4.0.0 release and I’m starting to re-learn Kicad, last try was this summer. Biggest discomfort is to get my head around library management, anyway…
I want to organize my projects and libraries with git. I would really like to get some input from you guys.
I want my own library repo where I keep my own parts and vetted parts from other libraries. How should I sync these parts local to a project?
1b) and how should I sync my repo with the external repos?
My next project I know I want to do several respins of the PCB from a common starting point (after placing and deciding board dimensions with a script)
Is it okay to use use git branches in a similar way as I would do in SW. Aka working withing the same project, but on different branches?
I want my own library repo where I keep my own parts and vetted parts
from other libraries.
It will depend on your own work flow, But for my company I have a dedicated git repo library that has my approved symbols, footprint and 3D models.
Every part that I use has a dedicated symbol, footprint and 3D model.
How should I sync these parts local to a project?
All I have to do is make sure that I add the symbol and footprint directory to my project configuration path and override kicad 3D model path.
My next project I know I want to do several respins of the PCB from a
common starting point (after placing and deciding board dimensions with
a script)
Is it okay to use use git branches in a similar way as I
would do in SW. Aka working withing the same project, but on different
branches?
Should be fine. Kicad files are all human readable and so lend themselves perfectly to file visioning tool such as git. You should be able to create branches and as long as you generate the Gerber files on every commit then you should be able to you this script tool to visually see the diff between branches/commit.
Thank you very much Ron, that confirms my thoughts.
I’m spending some time now to setup the environment/workflow properly so I can work efficiently, and using that diff script is on my list. I didnt really think of generating gerbers pr commit, but that is actually crucial if I want to use that script. Thanks.
Okay so last time I figured that the solution which gave me most control was to have my symbols, footprints and 3d models in subfolders in the project and link them relative.
Now I will extend it with having them as a git submodule in a separate repo. I think that will work fine.
But I have doubts with how to link in general symbols (and footprints), like power symbols and passive components, which I’m happy with using the default one from KiCads. I got confused because the regular symbols and components was still showing up in Kicad up after deleting them from the search path, but I figured they were cached in a project_cached.lib file.
My goal is to have my project totaly self-contained, independent of system settings, kicad installation and other library installations.
In my own library I have only “special” parts. How should I link in regular kicad symbols and footprints? It would have be neat if I could use KiCads GitHub library as a submodule also, so I could the project commits to a certain commit tag in the library. https://github.com/KiCad/kicad-library
Is this possible?
I also a bit confused how to link to the 3dmodels, I think I’m still getting tricked because there are duplicates in the default system path.
2a) How can I link to specific relative 3d model path for the project? Using the KISYS3DMOD environment variable? Should I overwrite it pr project by having a script for setting the environment variable? Can I link to several 3dmodel paths?
B) general kicad-library as submodule, and selected the actual used symbols and footprints in library manager and fp-lib-table:
projectfolder/kicad-library/power.lib
projectfolder/kicad-library/modules/
projectfolder/kicad-library/modules/3dpackages
I’m trying to figure this out too. I have a bunch of projects in my guthub repo (https://github.com/bobc/bobc_hardware) which work fine in 4022, with relative links to my own libraries in the repo. I want to move out the common libs, to a new repo, and move the projects to v4.
I think your scheme will work for symbols and footprints. Symbols still use a search path (which is likely to change in future), and footprints can be relative to $(KIPRJMOD). 3d models are a problem, there is only a choice between an absolute path and path relative to $(KISYS3DMOD) only, which is inconvenient. It means all 3D models must be stored under a single place, wherever that is. To use my models, users would have to copy files into that folder.
Cirilo is trying to improve the 3D side, but is meeting resistance. I hope he is successful, because the current config makes sharing projects quite awkward, and is a step backwards from previous versions.
Apart from that, duplicating libraries in each project can eat up disk space (and bandwidth) - you may not be worried about that. My complete set of libraries including 3d models has grown to over 400MB, which is a bit too big to have multiple copies of for my taste.
@bobc@pthor
for 3D models it is possible to add manually the var ${KIPRJMOD}/
to each path of the 3D models
e.g.
(model ${KIPRJMOD}/shapes/cap_0603.wrl
than your path will point to your project path plus added path
(the fastest way to add this var is by editing the file with a text editor)
If you download my kicad StepUp demo project you will get a fully self contained project (pcbnew only) with 3D models in STEP, VRML
that can be moved around without any prob
and moreover you can have a look to the way to export kicad board and parts to mechanical world
and here MOD-MPU9150 to MCAD you can download also a copy of the Olimex MOD-MPU9150 git project done in kicad, converted to fully 3D models portable and ready to be exported to MCAD (kicad StepUp exporter included)
I found out (again) that the kicad-library footprints are in dedicated repos, which made the hiearchy a bit more complicated and added to the setup time of the project, but i think I got it set up good enought to actually start learning KiCad and designing now.
The 3d models are still confusing/a mess, but the default kicad models magically shows up due to KISYS3DMOD, and my own shows up when edit (each!) footprint with a relative path.
I don’t want to have my 3d models in each project, as I said that is 400MB data. I want the model path to be relative to the location of the footprint… like how it used to be.
Really, there needs to be a better way to link up symbols, footprints and 3d models into a single object. Dare I say “database”
Yeah, it was actually the StepUp demo and that 3d repo that got me motivated here, the plan is to able to easily generate mechanical files for two stacked PCBs to be used in Fusion 360. I have tested StepUp briefly with one board and it worked quite nice. Great work btw!
I still need to go through the process of creating own 3d models…and to manage them
One question:
I didnt really get to what file you were adding:
(model ${KIPRJMOD}/shapes/cap_0603.wrl
I will look into the StepUp demo and see how it is organized there
@pthor
sorry I just put the text part of the .kicad_pcb file, related to the footprint 3d model
to change this path with pcbnew, you can use the pcbnew GUI as in the picture