Last active
January 25, 2023 01:09
-
-
Save jmpinit/f9fffe0af7bec4e51ca6379fc1e62d63 to your computer and use it in GitHub Desktop.
Example of using Python to do board layout in KiCad.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Reports | |
*.rpt | |
# CPL data generated from PCB | |
*.pos | |
# KiCad backup | |
*.bak | |
*.bck | |
*.kicad_pcb-bak | |
*.kicad_sch-bak | |
*.sch-bak | |
_saved_* | |
**/*-backups/ | |
# Netlists | |
*.net | |
# BOM plugin output | |
*.csv.tmp | |
*.csv | |
*.xml | |
# Gerbers | |
*.gbr | |
# Drill files | |
*.drl | |
# Footprint info cache | |
fp-info-cache | |
# Autosave files | |
_autosave-*# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# C extensions | |
*.so | |
# Distribution / packaging | |
.Python | |
build/ | |
develop-eggs/ | |
dist/ | |
downloads/ | |
eggs/ | |
.eggs/ | |
lib/ | |
lib64/ | |
parts/ | |
sdist/ | |
var/ | |
wheels/ | |
share/python-wheels/ | |
*.egg-info/ | |
.installed.cfg | |
*.egg | |
MANIFEST | |
# PyInstaller | |
# Usually these files are written by a python script from a template | |
# before PyInstaller builds the exe, so as to inject date/other infos into it. | |
*.manifest | |
*.spec | |
# Installer logs | |
pip-log.txt | |
pip-delete-this-directory.txt | |
# Unit test / coverage reports | |
htmlcov/ | |
.tox/ | |
.nox/ | |
.coverage | |
.coverage.* | |
.cache | |
nosetests.xml | |
coverage.xml | |
*.cover | |
*.py,cover | |
.hypothesis/ | |
.pytest_cache/ | |
cover/ | |
# Translations | |
*.mo | |
*.pot | |
# Django stuff: | |
*.log | |
local_settings.py | |
db.sqlite3 | |
db.sqlite3-journal | |
# Flask stuff: | |
instance/ | |
.webassets-cache | |
# Scrapy stuff: | |
.scrapy | |
# Sphinx documentation | |
docs/_build/ | |
# PyBuilder | |
.pybuilder/ | |
target/ | |
# Jupyter Notebook | |
.ipynb_checkpoints | |
# IPython | |
profile_default/ | |
ipython_config.py | |
# pyenv | |
# For a library or package, you might want to ignore these files since the code is | |
# intended to run in multiple environments; otherwise, check them in: | |
# .python-version | |
# pipenv | |
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. | |
# However, in case of collaboration, if having platform-specific dependencies or dependencies | |
# having no cross-platform support, pipenv may install dependencies that don't work, or not | |
# install all needed dependencies. | |
#Pipfile.lock | |
# poetry | |
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. | |
# This is especially recommended for binary packages to ensure reproducibility, and is more | |
# commonly ignored for libraries. | |
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control | |
#poetry.lock | |
# pdm | |
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. | |
#pdm.lock | |
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it | |
# in version control. | |
# https://pdm.fming.dev/#use-with-ide | |
.pdm.toml | |
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm | |
__pypackages__/ | |
# Celery stuff | |
celerybeat-schedule | |
celerybeat.pid | |
# SageMath parsed files | |
*.sage.py | |
# Environments | |
.env | |
.venv | |
env/ | |
venv/ | |
ENV/ | |
env.bak/ | |
venv.bak/ | |
# Spyder project settings | |
.spyderproject | |
.spyproject | |
# Rope project settings | |
.ropeproject | |
# mkdocs documentation | |
/site | |
# mypy | |
.mypy_cache/ | |
.dmypy.json | |
dmypy.json | |
# Pyre type checker | |
.pyre/ | |
# pytype static type analyzer | |
.pytype/ | |
# Cython debug symbols | |
cython_debug/ | |
# PyCharm | |
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can | |
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | |
# and can be added to the global gitignore or merged into this file. For a more nuclear | |
# option (not recommended) you can uncomment the following to ignore the entire idea folder. | |
#.idea/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(kicad_pcb (version 20211014) (generator pcbnew) | |
(general | |
(thickness 1.6) | |
) | |
(paper "A4") | |
(layers | |
(0 "F.Cu" signal) | |
(31 "B.Cu" signal) | |
(32 "B.Adhes" user "B.Adhesive") | |
(33 "F.Adhes" user "F.Adhesive") | |
(34 "B.Paste" user) | |
(35 "F.Paste" user) | |
(36 "B.SilkS" user "B.Silkscreen") | |
(37 "F.SilkS" user "F.Silkscreen") | |
(38 "B.Mask" user) | |
(39 "F.Mask" user) | |
(40 "Dwgs.User" user "User.Drawings") | |
(41 "Cmts.User" user "User.Comments") | |
(42 "Eco1.User" user "User.Eco1") | |
(43 "Eco2.User" user "User.Eco2") | |
(44 "Edge.Cuts" user) | |
(45 "Margin" user) | |
(46 "B.CrtYd" user "B.Courtyard") | |
(47 "F.CrtYd" user "F.Courtyard") | |
(48 "B.Fab" user) | |
(49 "F.Fab" user) | |
(50 "User.1" user) | |
(51 "User.2" user) | |
(52 "User.3" user) | |
(53 "User.4" user) | |
(54 "User.5" user) | |
(55 "User.6" user) | |
(56 "User.7" user) | |
(57 "User.8" user) | |
(58 "User.9" user) | |
) | |
(setup | |
(pad_to_mask_clearance 0) | |
(pcbplotparams | |
(layerselection 0x00010fc_ffffffff) | |
(disableapertmacros false) | |
(usegerberextensions false) | |
(usegerberattributes true) | |
(usegerberadvancedattributes true) | |
(creategerberjobfile true) | |
(svguseinch false) | |
(svgprecision 6) | |
(excludeedgelayer true) | |
(plotframeref false) | |
(viasonmask false) | |
(mode 1) | |
(useauxorigin false) | |
(hpglpennumber 1) | |
(hpglpenspeed 20) | |
(hpglpendiameter 15.000000) | |
(dxfpolygonmode true) | |
(dxfimperialunits true) | |
(dxfusepcbnewfont true) | |
(psnegative false) | |
(psa4output false) | |
(plotreference true) | |
(plotvalue true) | |
(plotinvisibletext false) | |
(sketchpadsonfab false) | |
(subtractmaskfromsilk false) | |
(outputformat 1) | |
(mirror false) | |
(drillshape 1) | |
(scaleselection 1) | |
(outputdirectory "") | |
) | |
) | |
(net 0 "") | |
(net 1 "GND") | |
(net 2 "Net-(D1-Pad2)") | |
(net 3 "Net-(D2-Pad2)") | |
(net 4 "Net-(D3-Pad2)") | |
(net 5 "VCC") | |
(footprint "Resistor_SMD:R_0603_1608Metric" (layer "F.Cu") | |
(tedit 5F68FEEE) (tstamp 22ad9bd6-d8e0-497a-b356-29d33faf6e6f) | |
(at 75.33 59.65) | |
(descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") | |
(tags "resistor") | |
(property "Sheetfile" "example_custom_auto_layout.kicad_sch") | |
(property "Sheetname" "") | |
(path "/a7e89dea-5efe-457b-829d-23f48f0d485f") | |
(attr smd) | |
(fp_text reference "R2" (at 0 -1.43) (layer "F.SilkS") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp 88311781-ebd5-4fc7-9689-744e82aa3624) | |
) | |
(fp_text value "R" (at 0 1.43) (layer "F.Fab") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp d9b784bb-c971-4a97-a7f4-8f8cb89f15df) | |
) | |
(fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") | |
(effects (font (size 0.4 0.4) (thickness 0.06))) | |
(tstamp 488ce64d-9695-43d7-b6fe-de4a2d368f1b) | |
) | |
(fp_line (start -0.237258 -0.5225) (end 0.237258 -0.5225) (layer "F.SilkS") (width 0.12) (tstamp 0b6366ac-62d3-4044-908a-5d1102ba6ace)) | |
(fp_line (start -0.237258 0.5225) (end 0.237258 0.5225) (layer "F.SilkS") (width 0.12) (tstamp 44806ab8-d9d4-45a3-8a21-939ff710aeaa)) | |
(fp_line (start 1.48 -0.73) (end 1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 870e67f4-dabf-47a4-b1dc-501992e70980)) | |
(fp_line (start -1.48 -0.73) (end 1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp bf0b1542-d842-46dc-8d87-87b26d5f83bf)) | |
(fp_line (start 1.48 0.73) (end -1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp c3613781-7845-4e08-a96e-0ea5a8be3cbb)) | |
(fp_line (start -1.48 0.73) (end -1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp cbef1f59-1acf-431f-9bb4-6fd469710b8c)) | |
(fp_line (start 0.8 0.4125) (end -0.8 0.4125) (layer "F.Fab") (width 0.1) (tstamp 76102f0d-412d-49bd-9c58-4ce82fc16012)) | |
(fp_line (start 0.8 -0.4125) (end 0.8 0.4125) (layer "F.Fab") (width 0.1) (tstamp 897d1e8c-2594-4d20-be63-ca32c55aba6b)) | |
(fp_line (start -0.8 0.4125) (end -0.8 -0.4125) (layer "F.Fab") (width 0.1) (tstamp 9287c113-2663-4879-bdec-303224960c45)) | |
(fp_line (start -0.8 -0.4125) (end 0.8 -0.4125) (layer "F.Fab") (width 0.1) (tstamp ca32b5d8-066f-43e8-a657-aead5d37e883)) | |
(pad "1" smd roundrect (at -0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 3 "Net-(D2-Pad2)") (pintype "passive") (tstamp 8afb12ec-5e8f-4e6f-b802-8ca2e363bf6b)) | |
(pad "2" smd roundrect (at 0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 5 "VCC") (pintype "passive") (tstamp 61a18d27-f8fa-448d-a80d-14b083100062)) | |
(model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0603_1608Metric.wrl" | |
(offset (xyz 0 0 0)) | |
(scale (xyz 1 1 1)) | |
(rotate (xyz 0 0 0)) | |
) | |
) | |
(footprint "Resistor_SMD:R_0603_1608Metric" (layer "F.Cu") | |
(tedit 5F68FEEE) (tstamp 6526db17-7be9-4b82-a11b-5e42e999ec58) | |
(at 71.32 59.65) | |
(descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") | |
(tags "resistor") | |
(property "Sheetfile" "example_custom_auto_layout.kicad_sch") | |
(property "Sheetname" "") | |
(path "/11e7bab4-eaf7-4aae-a5c3-4d6c27efbaa0") | |
(attr smd) | |
(fp_text reference "R3" (at 0 -1.43) (layer "F.SilkS") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp 4f20a1c9-6c8c-488e-aba1-88cf37d6de43) | |
) | |
(fp_text value "R" (at 0 1.43) (layer "F.Fab") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp cbf6c875-acdc-4027-ab3f-95648c7f305b) | |
) | |
(fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") | |
(effects (font (size 0.4 0.4) (thickness 0.06))) | |
(tstamp 6ca0fa72-6ca4-4403-88b4-aa3771ea17c8) | |
) | |
(fp_line (start -0.237258 -0.5225) (end 0.237258 -0.5225) (layer "F.SilkS") (width 0.12) (tstamp 30674117-12bf-4194-b2fe-390af5c48c80)) | |
(fp_line (start -0.237258 0.5225) (end 0.237258 0.5225) (layer "F.SilkS") (width 0.12) (tstamp b87c1655-21a2-431e-8555-090d73490211)) | |
(fp_line (start -1.48 -0.73) (end 1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp 06521991-fa4e-4c5e-b9eb-f588380c9122)) | |
(fp_line (start 1.48 -0.73) (end 1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp a70b18c9-eacf-4888-935e-afaf8c268b20)) | |
(fp_line (start 1.48 0.73) (end -1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp d5182e2e-2642-4b9f-80d9-aff22362040a)) | |
(fp_line (start -1.48 0.73) (end -1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp dd4dd6e0-86b6-4772-aa09-88f9f02c4b50)) | |
(fp_line (start -0.8 0.4125) (end -0.8 -0.4125) (layer "F.Fab") (width 0.1) (tstamp 7a897282-f9a8-4cb2-8af8-962d49714ae7)) | |
(fp_line (start 0.8 0.4125) (end -0.8 0.4125) (layer "F.Fab") (width 0.1) (tstamp aaaf55bf-81bd-4d9d-a5aa-356a4e16982d)) | |
(fp_line (start 0.8 -0.4125) (end 0.8 0.4125) (layer "F.Fab") (width 0.1) (tstamp e9fa8ac9-690a-41ce-99a8-d13d56a81718)) | |
(fp_line (start -0.8 -0.4125) (end 0.8 -0.4125) (layer "F.Fab") (width 0.1) (tstamp fbe6f61a-a4b3-4b8a-ad44-ba607e860e9c)) | |
(pad "1" smd roundrect (at -0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 4 "Net-(D3-Pad2)") (pintype "passive") (tstamp faea38b4-9fb5-4747-9967-2619780c4f63)) | |
(pad "2" smd roundrect (at 0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 5 "VCC") (pintype "passive") (tstamp 52bc72e4-e4ba-45b3-a86c-aecd1f6fd587)) | |
(model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0603_1608Metric.wrl" | |
(offset (xyz 0 0 0)) | |
(scale (xyz 1 1 1)) | |
(rotate (xyz 0 0 0)) | |
) | |
) | |
(footprint "LED_SMD:LED_0603_1608Metric" (layer "F.Cu") | |
(tedit 5F68FEF1) (tstamp 7da6c08d-ad3c-43fc-8595-ee9bbfdc5603) | |
(at 67.31 59.69) | |
(descr "LED SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf), generated with kicad-footprint-generator") | |
(tags "LED") | |
(property "Sheetfile" "example_custom_auto_layout.kicad_sch") | |
(property "Sheetname" "") | |
(path "/bf60a933-2a6a-49b5-93bd-b866b51697fb") | |
(attr smd) | |
(fp_text reference "D1" (at 0 -1.43) (layer "F.SilkS") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp c5c0ece2-6c05-4bdf-9adc-da2c8abd42f3) | |
) | |
(fp_text value "LED" (at 0 1.43) (layer "F.Fab") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp 3da13d26-bc72-4a25-a0b3-ef16356d53f0) | |
) | |
(fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") | |
(effects (font (size 0.4 0.4) (thickness 0.06))) | |
(tstamp 52dbe2c4-d787-4c92-accf-d0dae5123a75) | |
) | |
(fp_line (start 0.8 -0.735) (end -1.485 -0.735) (layer "F.SilkS") (width 0.12) (tstamp 608bd2bd-2460-462c-8c4e-73be16b1ac48)) | |
(fp_line (start -1.485 0.735) (end 0.8 0.735) (layer "F.SilkS") (width 0.12) (tstamp 71f5eca0-6ea0-4c88-b1a7-b8264bdbc553)) | |
(fp_line (start -1.485 -0.735) (end -1.485 0.735) (layer "F.SilkS") (width 0.12) (tstamp 8d5f400b-c577-4463-b3cb-4bb43f2a03f0)) | |
(fp_line (start 1.48 -0.73) (end 1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 3f3d44e4-bafa-422e-83a7-40f211487717)) | |
(fp_line (start 1.48 0.73) (end -1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 80670894-721d-493b-9cf5-ca6754bfa855)) | |
(fp_line (start -1.48 -0.73) (end 1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp 9d68098d-3d4d-4beb-80dd-9867d54f8688)) | |
(fp_line (start -1.48 0.73) (end -1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp e4385492-a15b-4190-b74f-beb6d88abf9f)) | |
(fp_line (start 0.8 -0.4) (end -0.5 -0.4) (layer "F.Fab") (width 0.1) (tstamp 4e89a7d4-7f0d-4a10-8ec0-ce972735a5e7)) | |
(fp_line (start 0.8 0.4) (end 0.8 -0.4) (layer "F.Fab") (width 0.1) (tstamp 72c655fb-0448-4baf-9447-775d3cb1dca9)) | |
(fp_line (start -0.8 -0.1) (end -0.8 0.4) (layer "F.Fab") (width 0.1) (tstamp 9ddda81d-73d3-41ea-990f-ee7686383d6e)) | |
(fp_line (start -0.5 -0.4) (end -0.8 -0.1) (layer "F.Fab") (width 0.1) (tstamp a5ee1217-e5c4-481c-af99-0036070b4973)) | |
(fp_line (start -0.8 0.4) (end 0.8 0.4) (layer "F.Fab") (width 0.1) (tstamp d5b4eb27-ed13-4d26-91fa-59d209bebea2)) | |
(pad "1" smd roundrect (at -0.7875 0) (size 0.875 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 1 "GND") (pinfunction "K") (pintype "passive") (tstamp 76403af2-3918-42f0-8378-127d58e16227)) | |
(pad "2" smd roundrect (at 0.7875 0) (size 0.875 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 2 "Net-(D1-Pad2)") (pinfunction "A") (pintype "passive") (tstamp 026816ea-47fd-4114-852c-33cb2e2d7e87)) | |
(model "${KICAD6_3DMODEL_DIR}/LED_SMD.3dshapes/LED_0603_1608Metric.wrl" | |
(offset (xyz 0 0 0)) | |
(scale (xyz 1 1 1)) | |
(rotate (xyz 0 0 0)) | |
) | |
) | |
(footprint "LED_SMD:LED_0603_1608Metric" (layer "F.Cu") | |
(tedit 5F68FEF1) (tstamp a35393fd-88ca-4cbc-9409-6f034d05f307) | |
(at 71.36 57.1) | |
(descr "LED SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf), generated with kicad-footprint-generator") | |
(tags "LED") | |
(property "Sheetfile" "example_custom_auto_layout.kicad_sch") | |
(property "Sheetname" "") | |
(path "/e16ba19e-4c39-4d97-846a-dab8bbbfa68e") | |
(attr smd) | |
(fp_text reference "D2" (at 0 -1.43) (layer "F.SilkS") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp 3698193f-6a76-4786-a504-13c2e4d165d6) | |
) | |
(fp_text value "LED" (at 0 1.43) (layer "F.Fab") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp 00773806-e3b7-41e9-9187-33a6c001ca54) | |
) | |
(fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") | |
(effects (font (size 0.4 0.4) (thickness 0.06))) | |
(tstamp 427b21f1-01ff-4dd0-add7-1a9032dd1fb2) | |
) | |
(fp_line (start -1.485 -0.735) (end -1.485 0.735) (layer "F.SilkS") (width 0.12) (tstamp 276cf98c-c78a-4143-966b-88341e957d93)) | |
(fp_line (start 0.8 -0.735) (end -1.485 -0.735) (layer "F.SilkS") (width 0.12) (tstamp 3df9ca2b-98bd-4ff2-a526-c643dd3281f6)) | |
(fp_line (start -1.485 0.735) (end 0.8 0.735) (layer "F.SilkS") (width 0.12) (tstamp ee2e171e-9f31-4997-b871-642f8c7355ad)) | |
(fp_line (start 1.48 0.73) (end -1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 03b30dbd-d24e-4ed3-9f44-2346aa52d57c)) | |
(fp_line (start -1.48 0.73) (end -1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp 28ec4026-eddb-40f4-aa14-1a1785e08284)) | |
(fp_line (start 1.48 -0.73) (end 1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 7ca75318-784b-4197-802b-412d07374be6)) | |
(fp_line (start -1.48 -0.73) (end 1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp f5bcbdbf-44b2-4ebe-9726-e60b98a0f8f9)) | |
(fp_line (start 0.8 -0.4) (end -0.5 -0.4) (layer "F.Fab") (width 0.1) (tstamp 2625cb90-92e2-47c1-9fd8-78770baef5c6)) | |
(fp_line (start -0.5 -0.4) (end -0.8 -0.1) (layer "F.Fab") (width 0.1) (tstamp 2b3760a9-596a-43e3-ae54-09c719192981)) | |
(fp_line (start -0.8 0.4) (end 0.8 0.4) (layer "F.Fab") (width 0.1) (tstamp 2f4f01f4-2a65-4962-952e-ec067bb5100d)) | |
(fp_line (start -0.8 -0.1) (end -0.8 0.4) (layer "F.Fab") (width 0.1) (tstamp 4dee4c25-83bb-4455-a6e7-9e9c21f45259)) | |
(fp_line (start 0.8 0.4) (end 0.8 -0.4) (layer "F.Fab") (width 0.1) (tstamp 768e371f-abdb-4ced-bc07-a2444d8b1d4a)) | |
(pad "1" smd roundrect (at -0.7875 0) (size 0.875 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 1 "GND") (pinfunction "K") (pintype "passive") (tstamp f920a0c7-2eeb-4d08-a48d-651225625f49)) | |
(pad "2" smd roundrect (at 0.7875 0) (size 0.875 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 3 "Net-(D2-Pad2)") (pinfunction "A") (pintype "passive") (tstamp 84942d16-82ba-4e6c-8733-c4ba701c7e98)) | |
(model "${KICAD6_3DMODEL_DIR}/LED_SMD.3dshapes/LED_0603_1608Metric.wrl" | |
(offset (xyz 0 0 0)) | |
(scale (xyz 1 1 1)) | |
(rotate (xyz 0 0 0)) | |
) | |
) | |
(footprint "Resistor_SMD:R_0603_1608Metric" (layer "F.Cu") | |
(tedit 5F68FEEE) (tstamp b54c670f-59d2-4825-8391-97455810c6d9) | |
(at 75.37 57.06) | |
(descr "Resistor SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: IPC-SM-782 page 72, https://www.pcb-3d.com/wordpress/wp-content/uploads/ipc-sm-782a_amendment_1_and_2.pdf), generated with kicad-footprint-generator") | |
(tags "resistor") | |
(property "Sheetfile" "example_custom_auto_layout.kicad_sch") | |
(property "Sheetname" "") | |
(path "/56b028bf-027c-4a7a-9e6f-49ce1259537d") | |
(attr smd) | |
(fp_text reference "R1" (at 0 -1.43) (layer "F.SilkS") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp ff1410fc-2ad8-46fe-887a-7e8596d72f68) | |
) | |
(fp_text value "R" (at 0 1.43) (layer "F.Fab") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp 20c63416-8a8e-42ad-9da9-241c970815ac) | |
) | |
(fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") | |
(effects (font (size 0.4 0.4) (thickness 0.06))) | |
(tstamp 9a319b04-99dc-4e91-a705-65630102ceba) | |
) | |
(fp_line (start -0.237258 0.5225) (end 0.237258 0.5225) (layer "F.SilkS") (width 0.12) (tstamp 481b901f-cb15-4b9f-bf44-c932d180852b)) | |
(fp_line (start -0.237258 -0.5225) (end 0.237258 -0.5225) (layer "F.SilkS") (width 0.12) (tstamp b39b7f36-08d2-4f28-8810-b313684eeba4)) | |
(fp_line (start -1.48 0.73) (end -1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp 479177f8-2ea1-41cf-af35-304717701b20)) | |
(fp_line (start 1.48 -0.73) (end 1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 6d4999de-9c54-41eb-ad2b-0f2b2556617b)) | |
(fp_line (start 1.48 0.73) (end -1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp b9045e4f-1556-4e33-a09f-b7b405b758b5)) | |
(fp_line (start -1.48 -0.73) (end 1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp da2fea85-b12a-4a8c-9b08-4ad6c309df90)) | |
(fp_line (start -0.8 0.4125) (end -0.8 -0.4125) (layer "F.Fab") (width 0.1) (tstamp 01971ced-2fb7-4b93-9a6b-c42cbe0d9526)) | |
(fp_line (start -0.8 -0.4125) (end 0.8 -0.4125) (layer "F.Fab") (width 0.1) (tstamp 208a1dbb-5706-4c0d-b87c-794f16e40568)) | |
(fp_line (start 0.8 0.4125) (end -0.8 0.4125) (layer "F.Fab") (width 0.1) (tstamp 85523d01-02ac-4f36-b98e-9b9e8ad115b1)) | |
(fp_line (start 0.8 -0.4125) (end 0.8 0.4125) (layer "F.Fab") (width 0.1) (tstamp fbbbd177-f5e6-44bf-8f52-bca1b90a0236)) | |
(pad "1" smd roundrect (at -0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 2 "Net-(D1-Pad2)") (pintype "passive") (tstamp 07754d5a-f845-425e-b0d3-81a21dafcf92)) | |
(pad "2" smd roundrect (at 0.825 0) (size 0.8 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 5 "VCC") (pintype "passive") (tstamp f21fe342-fab5-4150-a63c-606f5f9b234b)) | |
(model "${KICAD6_3DMODEL_DIR}/Resistor_SMD.3dshapes/R_0603_1608Metric.wrl" | |
(offset (xyz 0 0 0)) | |
(scale (xyz 1 1 1)) | |
(rotate (xyz 0 0 0)) | |
) | |
) | |
(footprint "LED_SMD:LED_0603_1608Metric" (layer "F.Cu") | |
(tedit 5F68FEF1) (tstamp dcba62b1-b61f-4b71-8b37-6299dc4814f8) | |
(at 67.31 57.1) | |
(descr "LED SMD 0603 (1608 Metric), square (rectangular) end terminal, IPC_7351 nominal, (Body size source: http://www.tortai-tech.com/upload/download/2011102023233369053.pdf), generated with kicad-footprint-generator") | |
(tags "LED") | |
(property "Sheetfile" "example_custom_auto_layout.kicad_sch") | |
(property "Sheetname" "") | |
(path "/493b249c-28e2-48b6-ae8e-186e01e8cc25") | |
(attr smd) | |
(fp_text reference "D3" (at 0 -1.43) (layer "F.SilkS") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp 8aeb47b5-7ab6-4195-b2f4-12473f36a654) | |
) | |
(fp_text value "LED" (at 0 1.43) (layer "F.Fab") | |
(effects (font (size 1 1) (thickness 0.15))) | |
(tstamp eb3ffd0c-5217-47e2-9eee-885b653a7767) | |
) | |
(fp_text user "${REFERENCE}" (at 0 0) (layer "F.Fab") | |
(effects (font (size 0.4 0.4) (thickness 0.06))) | |
(tstamp 9d231a83-20f7-44c8-8b70-8ca1087e8fe8) | |
) | |
(fp_line (start -1.485 -0.735) (end -1.485 0.735) (layer "F.SilkS") (width 0.12) (tstamp 1af5afba-4a5c-4a30-91a8-8d74a02e93da)) | |
(fp_line (start -1.485 0.735) (end 0.8 0.735) (layer "F.SilkS") (width 0.12) (tstamp 22f3dc93-14ab-49b4-8cf8-9f4dcf2df380)) | |
(fp_line (start 0.8 -0.735) (end -1.485 -0.735) (layer "F.SilkS") (width 0.12) (tstamp 4b9392f8-c1c7-4fd3-b0ec-b36b18afb90f)) | |
(fp_line (start -1.48 0.73) (end -1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp 20dad229-be29-4508-ad8a-fda295d1f735)) | |
(fp_line (start 1.48 -0.73) (end 1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 28ccc4bb-4d05-446e-b8e8-1fa1daf27f90)) | |
(fp_line (start 1.48 0.73) (end -1.48 0.73) (layer "F.CrtYd") (width 0.05) (tstamp 4f4b9bdd-1b4f-4eb1-95b2-6c05c42bc99f)) | |
(fp_line (start -1.48 -0.73) (end 1.48 -0.73) (layer "F.CrtYd") (width 0.05) (tstamp f03be65e-0942-44ec-9bc1-66920bf7ad71)) | |
(fp_line (start -0.8 -0.1) (end -0.8 0.4) (layer "F.Fab") (width 0.1) (tstamp 1767921c-05e1-4e1a-8820-194b25cf533d)) | |
(fp_line (start 0.8 0.4) (end 0.8 -0.4) (layer "F.Fab") (width 0.1) (tstamp 6247a9f8-3c06-4c37-baf5-bba7b020cad8)) | |
(fp_line (start -0.5 -0.4) (end -0.8 -0.1) (layer "F.Fab") (width 0.1) (tstamp 84dc7d1e-a56e-4199-b935-a5706b090bd8)) | |
(fp_line (start -0.8 0.4) (end 0.8 0.4) (layer "F.Fab") (width 0.1) (tstamp bb8a6d32-e120-4c8f-be90-a2e2faf1716b)) | |
(fp_line (start 0.8 -0.4) (end -0.5 -0.4) (layer "F.Fab") (width 0.1) (tstamp fc267060-a856-48f0-b210-07443b41a9f0)) | |
(pad "1" smd roundrect (at -0.7875 0) (size 0.875 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 1 "GND") (pinfunction "K") (pintype "passive") (tstamp b3e03be8-516e-400a-a726-cdf719febcc3)) | |
(pad "2" smd roundrect (at 0.7875 0) (size 0.875 0.95) (layers "F.Cu" "F.Paste" "F.Mask") (roundrect_rratio 0.25) | |
(net 4 "Net-(D3-Pad2)") (pinfunction "A") (pintype "passive") (tstamp fb9e60b6-fa49-4dd3-a11c-bed9b8913fc8)) | |
(model "${KICAD6_3DMODEL_DIR}/LED_SMD.3dshapes/LED_0603_1608Metric.wrl" | |
(offset (xyz 0 0 0)) | |
(scale (xyz 1 1 1)) | |
(rotate (xyz 0 0 0)) | |
) | |
) | |
(gr_rect (start 101.6 81.28) (end 152.4 124.46) (layer "Edge.Cuts") (width 0.1) (fill none) (tstamp f20f13a8-a1f8-44bd-84b2-7ec17091d69d)) | |
(zone (net 1) (net_name "GND") (layers F&B.Cu) (tstamp 925c38e7-0c09-4b6e-9900-867480c83a52) (hatch edge 0.508) | |
(connect_pads (clearance 0.508)) | |
(min_thickness 0.254) (filled_areas_thickness no) | |
(fill yes (thermal_gap 0.508) (thermal_bridge_width 0.508)) | |
(polygon | |
(pts | |
(xy 152.4 124.46) | |
(xy 101.6 124.46) | |
(xy 101.6 81.28) | |
(xy 152.4 81.28) | |
) | |
) | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"board": { | |
"active_layer": 0, | |
"active_layer_preset": "All Layers", | |
"auto_track_width": true, | |
"hidden_nets": [], | |
"high_contrast_mode": 0, | |
"net_color_mode": 1, | |
"opacity": { | |
"pads": 1.0, | |
"tracks": 1.0, | |
"vias": 1.0, | |
"zones": 0.6 | |
}, | |
"ratsnest_display_mode": 0, | |
"selection_filter": { | |
"dimensions": true, | |
"footprints": true, | |
"graphics": true, | |
"keepouts": true, | |
"lockedItems": true, | |
"otherItems": true, | |
"pads": true, | |
"text": true, | |
"tracks": true, | |
"vias": true, | |
"zones": true | |
}, | |
"visible_items": [ | |
0, | |
1, | |
2, | |
3, | |
4, | |
5, | |
8, | |
9, | |
10, | |
11, | |
12, | |
13, | |
14, | |
15, | |
16, | |
17, | |
18, | |
19, | |
20, | |
21, | |
22, | |
23, | |
24, | |
25, | |
26, | |
27, | |
28, | |
29, | |
30, | |
32, | |
33, | |
34, | |
35, | |
36 | |
], | |
"visible_layers": "fffffff_ffffffff", | |
"zone_display_mode": 0 | |
}, | |
"meta": { | |
"filename": "example_custom_auto_layout.kicad_prl", | |
"version": 3 | |
}, | |
"project": { | |
"files": [] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"board": { | |
"design_settings": { | |
"defaults": { | |
"board_outline_line_width": 0.09999999999999999, | |
"copper_line_width": 0.19999999999999998, | |
"copper_text_italic": false, | |
"copper_text_size_h": 1.5, | |
"copper_text_size_v": 1.5, | |
"copper_text_thickness": 0.3, | |
"copper_text_upright": false, | |
"courtyard_line_width": 0.049999999999999996, | |
"dimension_precision": 4, | |
"dimension_units": 3, | |
"dimensions": { | |
"arrow_length": 1270000, | |
"extension_offset": 500000, | |
"keep_text_aligned": true, | |
"suppress_zeroes": false, | |
"text_position": 0, | |
"units_format": 1 | |
}, | |
"fab_line_width": 0.09999999999999999, | |
"fab_text_italic": false, | |
"fab_text_size_h": 1.0, | |
"fab_text_size_v": 1.0, | |
"fab_text_thickness": 0.15, | |
"fab_text_upright": false, | |
"other_line_width": 0.15, | |
"other_text_italic": false, | |
"other_text_size_h": 1.0, | |
"other_text_size_v": 1.0, | |
"other_text_thickness": 0.15, | |
"other_text_upright": false, | |
"pads": { | |
"drill": 0.762, | |
"height": 1.524, | |
"width": 1.524 | |
}, | |
"silk_line_width": 0.15, | |
"silk_text_italic": false, | |
"silk_text_size_h": 1.0, | |
"silk_text_size_v": 1.0, | |
"silk_text_thickness": 0.15, | |
"silk_text_upright": false, | |
"zones": { | |
"45_degree_only": false, | |
"min_clearance": 0.508 | |
} | |
}, | |
"diff_pair_dimensions": [], | |
"drc_exclusions": [], | |
"meta": { | |
"version": 2 | |
}, | |
"rule_severities": { | |
"annular_width": "error", | |
"clearance": "error", | |
"copper_edge_clearance": "error", | |
"courtyards_overlap": "error", | |
"diff_pair_gap_out_of_range": "error", | |
"diff_pair_uncoupled_length_too_long": "error", | |
"drill_out_of_range": "error", | |
"duplicate_footprints": "warning", | |
"extra_footprint": "warning", | |
"footprint_type_mismatch": "error", | |
"hole_clearance": "error", | |
"hole_near_hole": "error", | |
"invalid_outline": "error", | |
"item_on_disabled_layer": "error", | |
"items_not_allowed": "error", | |
"length_out_of_range": "error", | |
"malformed_courtyard": "error", | |
"microvia_drill_out_of_range": "error", | |
"missing_courtyard": "ignore", | |
"missing_footprint": "warning", | |
"net_conflict": "warning", | |
"npth_inside_courtyard": "ignore", | |
"padstack": "error", | |
"pth_inside_courtyard": "ignore", | |
"shorting_items": "error", | |
"silk_over_copper": "warning", | |
"silk_overlap": "warning", | |
"skew_out_of_range": "error", | |
"through_hole_pad_without_hole": "error", | |
"too_many_vias": "error", | |
"track_dangling": "warning", | |
"track_width": "error", | |
"tracks_crossing": "error", | |
"unconnected_items": "error", | |
"unresolved_variable": "error", | |
"via_dangling": "warning", | |
"zone_has_empty_net": "error", | |
"zones_intersect": "error" | |
}, | |
"rules": { | |
"allow_blind_buried_vias": false, | |
"allow_microvias": false, | |
"max_error": 0.005, | |
"min_clearance": 0.0, | |
"min_copper_edge_clearance": 0.0, | |
"min_hole_clearance": 0.25, | |
"min_hole_to_hole": 0.25, | |
"min_microvia_diameter": 0.19999999999999998, | |
"min_microvia_drill": 0.09999999999999999, | |
"min_silk_clearance": 0.0, | |
"min_through_hole_diameter": 0.3, | |
"min_track_width": 0.19999999999999998, | |
"min_via_annular_width": 0.049999999999999996, | |
"min_via_diameter": 0.39999999999999997, | |
"solder_mask_clearance": 0.0, | |
"solder_mask_min_width": 0.0, | |
"use_height_for_length_calcs": true | |
}, | |
"track_widths": [], | |
"via_dimensions": [], | |
"zones_allow_external_fillets": false, | |
"zones_use_no_outline": true | |
}, | |
"layer_presets": [] | |
}, | |
"boards": [], | |
"cvpcb": { | |
"equivalence_files": [] | |
}, | |
"erc": { | |
"erc_exclusions": [], | |
"meta": { | |
"version": 0 | |
}, | |
"pin_map": [ | |
[ | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
1, | |
0, | |
0, | |
0, | |
0, | |
2 | |
], | |
[ | |
0, | |
2, | |
0, | |
1, | |
0, | |
0, | |
1, | |
0, | |
2, | |
2, | |
2, | |
2 | |
], | |
[ | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
1, | |
0, | |
1, | |
0, | |
1, | |
2 | |
], | |
[ | |
0, | |
1, | |
0, | |
0, | |
0, | |
0, | |
1, | |
1, | |
2, | |
1, | |
1, | |
2 | |
], | |
[ | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
1, | |
0, | |
0, | |
0, | |
0, | |
2 | |
], | |
[ | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
2 | |
], | |
[ | |
1, | |
1, | |
1, | |
1, | |
1, | |
0, | |
1, | |
1, | |
1, | |
1, | |
1, | |
2 | |
], | |
[ | |
0, | |
0, | |
0, | |
1, | |
0, | |
0, | |
1, | |
0, | |
0, | |
0, | |
0, | |
2 | |
], | |
[ | |
0, | |
2, | |
1, | |
2, | |
0, | |
0, | |
1, | |
0, | |
2, | |
2, | |
2, | |
2 | |
], | |
[ | |
0, | |
2, | |
0, | |
1, | |
0, | |
0, | |
1, | |
0, | |
2, | |
0, | |
0, | |
2 | |
], | |
[ | |
0, | |
2, | |
1, | |
1, | |
0, | |
0, | |
1, | |
0, | |
2, | |
0, | |
0, | |
2 | |
], | |
[ | |
2, | |
2, | |
2, | |
2, | |
2, | |
2, | |
2, | |
2, | |
2, | |
2, | |
2, | |
2 | |
] | |
], | |
"rule_severities": { | |
"bus_definition_conflict": "error", | |
"bus_entry_needed": "error", | |
"bus_label_syntax": "error", | |
"bus_to_bus_conflict": "error", | |
"bus_to_net_conflict": "error", | |
"different_unit_footprint": "error", | |
"different_unit_net": "error", | |
"duplicate_reference": "error", | |
"duplicate_sheet_names": "error", | |
"extra_units": "error", | |
"global_label_dangling": "warning", | |
"hier_label_mismatch": "error", | |
"label_dangling": "error", | |
"lib_symbol_issues": "warning", | |
"multiple_net_names": "warning", | |
"net_not_bus_member": "warning", | |
"no_connect_connected": "warning", | |
"no_connect_dangling": "warning", | |
"pin_not_connected": "error", | |
"pin_not_driven": "error", | |
"pin_to_pin": "warning", | |
"power_pin_not_driven": "error", | |
"similar_labels": "warning", | |
"unannotated": "error", | |
"unit_value_mismatch": "error", | |
"unresolved_variable": "error", | |
"wire_dangling": "error" | |
} | |
}, | |
"libraries": { | |
"pinned_footprint_libs": [], | |
"pinned_symbol_libs": [] | |
}, | |
"meta": { | |
"filename": "example_custom_auto_layout.kicad_pro", | |
"version": 1 | |
}, | |
"net_settings": { | |
"classes": [ | |
{ | |
"bus_width": 12.0, | |
"clearance": 0.2, | |
"diff_pair_gap": 0.25, | |
"diff_pair_via_gap": 0.25, | |
"diff_pair_width": 0.2, | |
"line_style": 0, | |
"microvia_diameter": 0.3, | |
"microvia_drill": 0.1, | |
"name": "Default", | |
"pcb_color": "rgba(0, 0, 0, 0.000)", | |
"schematic_color": "rgba(0, 0, 0, 0.000)", | |
"track_width": 0.25, | |
"via_diameter": 0.8, | |
"via_drill": 0.4, | |
"wire_width": 6.0 | |
} | |
], | |
"meta": { | |
"version": 2 | |
}, | |
"net_colors": null | |
}, | |
"pcbnew": { | |
"last_paths": { | |
"gencad": "", | |
"idf": "", | |
"netlist": "", | |
"specctra_dsn": "", | |
"step": "", | |
"vrml": "" | |
}, | |
"page_layout_descr_file": "" | |
}, | |
"schematic": { | |
"annotate_start_num": 0, | |
"drawing": { | |
"default_line_thickness": 6.0, | |
"default_text_size": 50.0, | |
"field_names": [], | |
"intersheets_ref_own_page": false, | |
"intersheets_ref_prefix": "", | |
"intersheets_ref_short": false, | |
"intersheets_ref_show": false, | |
"intersheets_ref_suffix": "", | |
"junction_size_choice": 3, | |
"label_size_ratio": 0.375, | |
"pin_symbol_size": 25.0, | |
"text_offset_ratio": 0.15 | |
}, | |
"legacy_lib_dir": "", | |
"legacy_lib_list": [], | |
"meta": { | |
"version": 1 | |
}, | |
"net_format_name": "", | |
"ngspice": { | |
"fix_include_paths": true, | |
"fix_passive_vals": false, | |
"meta": { | |
"version": 0 | |
}, | |
"model_mode": 0, | |
"workbook_filename": "" | |
}, | |
"page_layout_descr_file": "", | |
"plot_directory": "", | |
"spice_adjust_passive_values": false, | |
"spice_external_command": "spice \"%I\"", | |
"subpart_first_id": 65, | |
"subpart_id_separator": 0 | |
}, | |
"sheets": [ | |
[ | |
"95088e3c-32b2-4d63-b9a3-c7782fd9db7d", | |
"" | |
] | |
], | |
"text_variables": {} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(kicad_sch (version 20211123) (generator eeschema) | |
(uuid 95088e3c-32b2-4d63-b9a3-c7782fd9db7d) | |
(paper "A4") | |
(lib_symbols | |
(symbol "Device:LED" (pin_numbers hide) (pin_names (offset 1.016) hide) (in_bom yes) (on_board yes) | |
(property "Reference" "D" (id 0) (at 0 2.54 0) | |
(effects (font (size 1.27 1.27))) | |
) | |
(property "Value" "LED" (id 1) (at 0 -2.54 0) | |
(effects (font (size 1.27 1.27))) | |
) | |
(property "Footprint" "" (id 2) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_keywords" "LED diode" (id 4) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_description" "Light emitting diode" (id 5) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_fp_filters" "LED* LED_SMD:* LED_THT:*" (id 6) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(symbol "LED_0_1" | |
(polyline | |
(pts | |
(xy -1.27 -1.27) | |
(xy -1.27 1.27) | |
) | |
(stroke (width 0.254) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
(polyline | |
(pts | |
(xy -1.27 0) | |
(xy 1.27 0) | |
) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
(polyline | |
(pts | |
(xy 1.27 -1.27) | |
(xy 1.27 1.27) | |
(xy -1.27 0) | |
(xy 1.27 -1.27) | |
) | |
(stroke (width 0.254) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
(polyline | |
(pts | |
(xy -3.048 -0.762) | |
(xy -4.572 -2.286) | |
(xy -3.81 -2.286) | |
(xy -4.572 -2.286) | |
(xy -4.572 -1.524) | |
) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
(polyline | |
(pts | |
(xy -1.778 -0.762) | |
(xy -3.302 -2.286) | |
(xy -2.54 -2.286) | |
(xy -3.302 -2.286) | |
(xy -3.302 -1.524) | |
) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
) | |
(symbol "LED_1_1" | |
(pin passive line (at -3.81 0 0) (length 2.54) | |
(name "K" (effects (font (size 1.27 1.27)))) | |
(number "1" (effects (font (size 1.27 1.27)))) | |
) | |
(pin passive line (at 3.81 0 180) (length 2.54) | |
(name "A" (effects (font (size 1.27 1.27)))) | |
(number "2" (effects (font (size 1.27 1.27)))) | |
) | |
) | |
) | |
(symbol "Device:R" (pin_numbers hide) (pin_names (offset 0)) (in_bom yes) (on_board yes) | |
(property "Reference" "R" (id 0) (at 2.032 0 90) | |
(effects (font (size 1.27 1.27))) | |
) | |
(property "Value" "R" (id 1) (at 0 0 90) | |
(effects (font (size 1.27 1.27))) | |
) | |
(property "Footprint" "" (id 2) (at -1.778 0 90) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_keywords" "R res resistor" (id 4) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_description" "Resistor" (id 5) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_fp_filters" "R_*" (id 6) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(symbol "R_0_1" | |
(rectangle (start -1.016 -2.54) (end 1.016 2.54) | |
(stroke (width 0.254) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
) | |
(symbol "R_1_1" | |
(pin passive line (at 0 3.81 270) (length 1.27) | |
(name "~" (effects (font (size 1.27 1.27)))) | |
(number "1" (effects (font (size 1.27 1.27)))) | |
) | |
(pin passive line (at 0 -3.81 90) (length 1.27) | |
(name "~" (effects (font (size 1.27 1.27)))) | |
(number "2" (effects (font (size 1.27 1.27)))) | |
) | |
) | |
) | |
(symbol "power:GND" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) | |
(property "Reference" "#PWR" (id 0) (at 0 -6.35 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Value" "GND" (id 1) (at 0 -3.81 0) | |
(effects (font (size 1.27 1.27))) | |
) | |
(property "Footprint" "" (id 2) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "" (id 3) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_keywords" "power-flag" (id 4) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_description" "Power symbol creates a global label with name \"GND\" , ground" (id 5) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(symbol "GND_0_1" | |
(polyline | |
(pts | |
(xy 0 0) | |
(xy 0 -1.27) | |
(xy 1.27 -1.27) | |
(xy 0 -2.54) | |
(xy -1.27 -1.27) | |
(xy 0 -1.27) | |
) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
) | |
(symbol "GND_1_1" | |
(pin power_in line (at 0 0 270) (length 0) hide | |
(name "GND" (effects (font (size 1.27 1.27)))) | |
(number "1" (effects (font (size 1.27 1.27)))) | |
) | |
) | |
) | |
(symbol "power:VCC" (power) (pin_names (offset 0)) (in_bom yes) (on_board yes) | |
(property "Reference" "#PWR" (id 0) (at 0 -3.81 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Value" "VCC" (id 1) (at 0 3.81 0) | |
(effects (font (size 1.27 1.27))) | |
) | |
(property "Footprint" "" (id 2) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "" (id 3) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_keywords" "power-flag" (id 4) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "ki_description" "Power symbol creates a global label with name \"VCC\"" (id 5) (at 0 0 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(symbol "VCC_0_1" | |
(polyline | |
(pts | |
(xy -0.762 1.27) | |
(xy 0 2.54) | |
) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
(polyline | |
(pts | |
(xy 0 0) | |
(xy 0 2.54) | |
) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
(polyline | |
(pts | |
(xy 0 2.54) | |
(xy 0.762 1.27) | |
) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(fill (type none)) | |
) | |
) | |
(symbol "VCC_1_1" | |
(pin power_in line (at 0 0 90) (length 0) hide | |
(name "VCC" (effects (font (size 1.27 1.27)))) | |
(number "1" (effects (font (size 1.27 1.27)))) | |
) | |
) | |
) | |
) | |
(junction (at 148.59 109.22) (diameter 0) (color 0 0 0 0) | |
(uuid 1c009970-b8de-43ef-8599-89a8b513dfb0) | |
) | |
(junction (at 148.59 85.09) (diameter 0) (color 0 0 0 0) | |
(uuid 335c380f-634c-411c-80c7-c7a22055afe8) | |
) | |
(wire (pts (xy 148.59 105.41) (xy 148.59 109.22)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 2031642e-6246-4655-b793-a2ae6856cefb) | |
) | |
(wire (pts (xy 161.29 85.09) (xy 161.29 87.63)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 2861a991-8ba1-4cec-b479-57b79636e9ec) | |
) | |
(wire (pts (xy 148.59 82.55) (xy 148.59 85.09)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 3812ff91-84c7-448a-a5c6-ad1534d0c067) | |
) | |
(wire (pts (xy 135.89 109.22) (xy 148.59 109.22)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 3cccc5d2-5173-40d7-8386-00c96e279812) | |
) | |
(wire (pts (xy 148.59 109.22) (xy 161.29 109.22)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 54a28950-e08d-461f-8da2-bf268ea8285e) | |
) | |
(wire (pts (xy 161.29 105.41) (xy 161.29 109.22)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 56569164-da3d-4e5d-8b94-df6cac8ef277) | |
) | |
(wire (pts (xy 135.89 105.41) (xy 135.89 109.22)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 8a544cd1-9d66-4962-8aac-e7aa22fd9ebd) | |
) | |
(wire (pts (xy 148.59 85.09) (xy 161.29 85.09)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid 99a3678d-2c0a-4ff1-8205-cfe137a9b667) | |
) | |
(wire (pts (xy 148.59 95.25) (xy 148.59 97.79)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid a6e8b2ba-0924-448a-8af0-977f63d85211) | |
) | |
(wire (pts (xy 161.29 95.25) (xy 161.29 97.79)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid b1c78366-2324-49b9-82fa-b381763eb1e9) | |
) | |
(wire (pts (xy 135.89 85.09) (xy 135.89 87.63)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid c14a2991-a371-49ca-9b80-0b0609cfa25b) | |
) | |
(wire (pts (xy 148.59 85.09) (xy 135.89 85.09)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid c7fa1c4e-65d2-4b22-b68a-eda6304886bb) | |
) | |
(wire (pts (xy 135.89 95.25) (xy 135.89 97.79)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid d02ad9fe-a252-4c0f-9c06-393cb89e97f1) | |
) | |
(wire (pts (xy 148.59 111.76) (xy 148.59 109.22)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid ed524e33-acb5-47a5-9da1-3e61f4bbd261) | |
) | |
(wire (pts (xy 148.59 85.09) (xy 148.59 87.63)) | |
(stroke (width 0) (type default) (color 0 0 0 0)) | |
(uuid f7dabfb7-022f-467e-b18a-f3c1166fc589) | |
) | |
(symbol (lib_id "Device:R") (at 161.29 91.44 180) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid 11e7bab4-eaf7-4aae-a5c3-4d6c27efbaa0) | |
(property "Reference" "R3" (id 0) (at 163.83 90.1699 0) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Value" "R" (id 1) (at 163.83 92.7099 0) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Footprint" "Resistor_SMD:R_0603_1608Metric" (id 2) (at 163.068 91.44 90) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 161.29 91.44 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid 900bc4dc-aec5-4054-a34a-83845061cb08)) | |
(pin "2" (uuid 501234b2-e462-497e-8941-7087a05d49f0)) | |
) | |
(symbol (lib_id "Device:LED") (at 161.29 101.6 90) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid 493b249c-28e2-48b6-ae8e-186e01e8cc25) | |
(property "Reference" "D3" (id 0) (at 165.1 101.9174 90) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Value" "LED" (id 1) (at 165.1 104.4574 90) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Footprint" "LED_SMD:LED_0603_1608Metric" (id 2) (at 161.29 101.6 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 161.29 101.6 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid 08b07e89-a3c5-4cec-8817-44122d1da2fd)) | |
(pin "2" (uuid c87a616a-6e67-494e-aa89-6c6e45749a12)) | |
) | |
(symbol (lib_id "Device:R") (at 135.89 91.44 180) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid 56b028bf-027c-4a7a-9e6f-49ce1259537d) | |
(property "Reference" "R1" (id 0) (at 138.43 90.1699 0) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Value" "R" (id 1) (at 138.43 92.7099 0) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Footprint" "Resistor_SMD:R_0603_1608Metric" (id 2) (at 137.668 91.44 90) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 135.89 91.44 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid 0e01eaf1-89d7-4c4d-9a4a-642dffa45299)) | |
(pin "2" (uuid b7565de3-a44b-46cb-9b99-022ad258459b)) | |
) | |
(symbol (lib_id "power:GND") (at 148.59 111.76 0) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid 7183222f-9c7b-4cf8-a269-fe6105456206) | |
(property "Reference" "#PWR0101" (id 0) (at 148.59 118.11 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Value" "GND" (id 1) (at 148.59 116.84 0)) | |
(property "Footprint" "" (id 2) (at 148.59 111.76 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "" (id 3) (at 148.59 111.76 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid 5d0f0316-dcb0-4e14-8952-852ae97fee30)) | |
) | |
(symbol (lib_id "power:VCC") (at 148.59 82.55 0) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid 83801857-8a2d-4947-8350-81c1c19159e7) | |
(property "Reference" "#PWR0102" (id 0) (at 148.59 86.36 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Value" "VCC" (id 1) (at 148.59 77.47 0)) | |
(property "Footprint" "" (id 2) (at 148.59 82.55 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "" (id 3) (at 148.59 82.55 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid f2cc0ac3-339a-457d-8c9c-dd912d4547ad)) | |
) | |
(symbol (lib_id "Device:R") (at 148.59 91.44 180) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid a7e89dea-5efe-457b-829d-23f48f0d485f) | |
(property "Reference" "R2" (id 0) (at 151.13 90.1699 0) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Value" "R" (id 1) (at 151.13 92.7099 0) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Footprint" "Resistor_SMD:R_0603_1608Metric" (id 2) (at 150.368 91.44 90) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 148.59 91.44 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid 915185fb-76d4-4622-82b9-1e8e7a5dd05d)) | |
(pin "2" (uuid e6d48c80-abe8-45e2-a918-b58917548199)) | |
) | |
(symbol (lib_id "Device:LED") (at 135.89 101.6 90) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid bf60a933-2a6a-49b5-93bd-b866b51697fb) | |
(property "Reference" "D1" (id 0) (at 139.7 101.9174 90) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Value" "LED" (id 1) (at 139.7 104.4574 90) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Footprint" "LED_SMD:LED_0603_1608Metric" (id 2) (at 135.89 101.6 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 135.89 101.6 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid 666c59b2-4c45-47eb-b8cb-6faaad0ef9e3)) | |
(pin "2" (uuid 6820e8e6-8f74-4c7b-a928-77066f95f745)) | |
) | |
(symbol (lib_id "Device:LED") (at 148.59 101.6 90) (unit 1) | |
(in_bom yes) (on_board yes) (fields_autoplaced) | |
(uuid e16ba19e-4c39-4d97-846a-dab8bbbfa68e) | |
(property "Reference" "D2" (id 0) (at 152.4 101.9174 90) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Value" "LED" (id 1) (at 152.4 104.4574 90) | |
(effects (font (size 1.27 1.27)) (justify right)) | |
) | |
(property "Footprint" "LED_SMD:LED_0603_1608Metric" (id 2) (at 148.59 101.6 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(property "Datasheet" "~" (id 3) (at 148.59 101.6 0) | |
(effects (font (size 1.27 1.27)) hide) | |
) | |
(pin "1" (uuid 84ec5948-1e71-47b6-9053-b1e818241546)) | |
(pin "2" (uuid 4e76d7ff-c413-4b1e-877b-9f6bb97a367a)) | |
) | |
(sheet_instances | |
(path "/" (page "1")) | |
) | |
(symbol_instances | |
(path "/7183222f-9c7b-4cf8-a269-fe6105456206" | |
(reference "#PWR0101") (unit 1) (value "GND") (footprint "") | |
) | |
(path "/83801857-8a2d-4947-8350-81c1c19159e7" | |
(reference "#PWR0102") (unit 1) (value "VCC") (footprint "") | |
) | |
(path "/bf60a933-2a6a-49b5-93bd-b866b51697fb" | |
(reference "D1") (unit 1) (value "LED") (footprint "LED_SMD:LED_0603_1608Metric") | |
) | |
(path "/e16ba19e-4c39-4d97-846a-dab8bbbfa68e" | |
(reference "D2") (unit 1) (value "LED") (footprint "LED_SMD:LED_0603_1608Metric") | |
) | |
(path "/493b249c-28e2-48b6-ae8e-186e01e8cc25" | |
(reference "D3") (unit 1) (value "LED") (footprint "LED_SMD:LED_0603_1608Metric") | |
) | |
(path "/56b028bf-027c-4a7a-9e6f-49ce1259537d" | |
(reference "R1") (unit 1) (value "R") (footprint "Resistor_SMD:R_0603_1608Metric") | |
) | |
(path "/a7e89dea-5efe-457b-829d-23f48f0d485f" | |
(reference "R2") (unit 1) (value "R") (footprint "Resistor_SMD:R_0603_1608Metric") | |
) | |
(path "/11e7bab4-eaf7-4aae-a5c3-4d6c27efbaa0" | |
(reference "R3") (unit 1) (value "R") (footprint "Resistor_SMD:R_0603_1608Metric") | |
) | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kiutils.board import Board | |
from kiutils.items.common import Position | |
from kiutils.items.fpitems import FpText | |
from kiutils.items.brditems import Segment | |
import uuid | |
board = Board().from_file('./example_custom_auto_layout.kicad_pcb') | |
origin_x = 101.6 | |
origin_y = 81.28 | |
def get_reference(footprint): | |
for graphic_item in footprint.graphicItems: | |
if isinstance(graphic_item, FpText) and graphic_item.type == 'reference': | |
return graphic_item.text | |
def make_trace(start, end): | |
return Segment( | |
start=Position(X=start[0], Y=start[1]), | |
end=Position(X=end[0], Y=end[1]), | |
width=0.25, | |
layer='F.Cu', | |
net=2, | |
locked=False, | |
tstamp=str(uuid.uuid4()), | |
) | |
def main(): | |
for footprint in board.footprints: | |
reference = get_reference(footprint) | |
i = int(reference[1:]) | |
x = origin_x + i * 10 | |
if reference.startswith('R'): | |
y = origin_y + 10 | |
trace = make_trace((x, y), (x, y + 10)) | |
board.traceItems.append(trace) | |
else: | |
y = origin_y + 20 | |
footprint.position = Position(X=x, Y=y) | |
board.to_file() | |
if __name__ == '__main__': | |
main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kiutils==1.2.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment