This is an old revision of the document!


KiCAD 7.x for Team Configuration

  • Each functional PCB is a repository and each revision is a folder

.gitignore

# Blacklist everything
*

# Whitelist all directories
!*/

# Project files
!*.kicad_pro

# Schematic files 
!*.kicad_sch

# PCB files
!*.kicad_pcb

# Sym lib table
!sym-lib-table

# Footprint lib table
!fp-lib-table

# Custom rules
!*.kicad_dru

# Schematic change list
!SCH_Changelist.csv

# PCB change list
!PCB_Changelist.csv

# Readme file
!README.md

# Ignor file
!.gitignore

File types may not need to save

# For PCBs designed using KiCad: https://www.kicad.org/
# Format documentation: https://kicad.org/help/file-formats/

# Temporary files
*.000
*.bak
*.bck
*.kicad_pcb-bak
*.kicad_sch-bak
*-backups
*.kicad_prl
*.sch-bak
*~
_autosave-*
*.tmp
*-save.pro
*-save.kicad_pcb
fp-info-cache

# Netlist files (exported from Eeschema)
*.net

# Autorouter files (exported from Pcbnew)
*.dsn
*.ses

# Exported BOM files
*.xml
*.csv

Hide 3D Models

from pcbnew import *
board=GetBoard()
c86=board.FindFootprintByReference('C86')
d3=c86.Models()
d3.clear() # this cleared all the 3D models - not what we want
I did (in the Scripting Console)

models = fp.Models()
m = models[0]
m.m_Show = False
pcbnew.Refresh()
(version 1)

(rule "Distance between different packages"
	(constraint courtyard_clearance (min 10mm))
	(condition "A.Type == 'Footprint' && B.Type == 'Footprint' && A.Library_link == '*R_0402*' && B.Library_link == '*L_1210*'"))
  • Everyone uses the same library (symbol, footprint, 3D model)
  • Only admins and librarians are allowed to create or modify library
  • When a part is updated in the library, everyone gets the latest version automatically
  • Fully specified parts (atomic)
  • No duplications of symbols
  • Automatic BOM generation without manual adjustment
  • Extensible structure for new field to be added in the future
  • symbols - Holds generic schematic symbols in “.kicad_sym” files. Each file represents a category of parts. E.g. passives, ICs, diodes, magnetics, connectors, …
  • footprints - Holds “.pretty” folders that hold footprint files (.kicad_mod files). Each “.pretty” folder represents a category of parts.
  • 3dmodels - Holds “.3dshapes” folders than hold 3d model files (.step and .wrl files). Each “.3dshapes” folder represents a category of parts.

The folders shall resides on a centralized network server that is read only to most users.

  • create “kicad” database with utf8_general_ci collation
  • create table “resistors” with columns (VARCHAR type) “epn” (key), “symbol”, “value”, “pkg”, “footprint”, “datasheet”, “mfg”, “mpn”, “descr”, “status”
    • “status” can be “production”, “development”, “obsolete”, “restricted”
    • “mfg” is manufacturer name
    • “epn” is a unique internal part number. it is the database key
    • “descr” is description

https://help.interfaceware.com/v6/connect-to-postgresql-from-windows-with-odbc

kicad_dbl file

{
    "meta": {
        "version": 0
    },
    "name": "EE Components",
    "description": "EE Components",
    "source": {
        "type": "odbc",
        "dsn": "KiCad_DB",
        "username": "",
        "password": "",
        "timeout_seconds": 2,
        "connection_string": ""
    },
    "libraries": [
        {
            "name": "Resistors",
            "table": "Resistors",
            "key": "EPN",
            "symbols": "Symbol",
            "footprints": "Footprint",
            "fields": [
                {
                    "column": "MPN",
                    "name": "MPN",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Value",
                    "name": "Value",
                    "visible_on_add": true,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Pkg",
                    "name": "Pkg",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "MFG",
                    "name": "MFG",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Status",
                    "name": "Status",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                }
            ],
            "properties": {
                "description": "Descr"
            }
        },
        {
            "name": "Diodes",
            "table": "Diodes",
            "key": "EPN",
            "symbols": "Symbol",
            "footprints": "Footprint",
            "fields": [
                {
                    "column": "MPN",
                    "name": "MPN",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Value",
                    "name": "Value",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Pkg",
                    "name": "Pkg",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "MFG",
                    "name": "MFG",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Status",
                    "name": "Status",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                }
            ],
            "properties": {
                "description": "Descr"
            }
        },
        {
            "name": "Capacitors",
            "table": "Capacitors",
            "key": "EPN",
            "symbols": "Symbol",
            "footprints": "Footprint",
            "fields": [
                {
                    "column": "MPN",
                    "name": "MPN",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Value",
                    "name": "Value",
                    "visible_on_add": true,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Pkg",
                    "name": "Pkg",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "MFG",
                    "name": "MFG",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                },
                {
                    "column": "Status",
                    "name": "Status",
                    "visible_on_add": false,
                    "visible_in_chooser": true,
                    "show_name": false
                }
            ],
            "properties": {
                "description": "Descr"
            }
        }
    ]
}

.gitignore

# Blacklist everything
*
# Whitelist all directories
!*/
# Whitelist the file you're interested in. 
!*.cocci 
git clone -b mybranch --single-branch git://sub.domain.com/repo.git

How to git clone only a specific file or directory

Git does not directly support cloning only a specific file or directory from a repository. However, you can use –depth 1 to clone only one specific revision (as opposed to the entire history) and use –no-checkout followed by git sparse-checkout set to checkout not the entire file tree but only a specific file.

  • Last modified: 2023/06/19 09:25
  • by Normal User