Skip to content

Commit

Permalink
Fix Assets/icon.png, Support PCBWay
Browse files Browse the repository at this point in the history
  • Loading branch information
g200kg committed Mar 8, 2024
1 parent 210ef48 commit 9063658
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 5 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ This is an action script that can be used with pcbnew since KiCad version 5.X (e
Gerber output for the specified board vendor is performed, and the process of zipping the necessary files is automated with one click.

#### Note
- v1.1.5 - Fixed missing Assets/icon.png add Manufacturers/PCBWay

- v1.1.4 - workaround for KiCad 8.0 rc1

- v1.1.3 - Fix incorrect PN in Pos File
Expand Down Expand Up @@ -197,6 +199,8 @@ Settings are written as `.json` files for each board manufacturer in the folder
指定の基板業者向けのガーバー出力を行い、必要なファイルを ZIP でまとめるまでをワンクリックで自動化します。

####
- v1.1.5 - Assets/icon.png が不足していたのを修正 / Manufacturers/PCBWay を追加

- v1.1.4 - KiCad 8.0 rc 1 で GetProperties() ができない問題の workaround

- v1.1.3 - POSファイルの一部に違う品番が出力される場合があるのを修正。
Expand Down
3 changes: 3 additions & 0 deletions makepackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ def addfile(zf, file):
files = os.listdir('plugins/Manufacturers')
for file in files:
addfile(zf, 'plugins/Manufacturers/' + file)
files = os.listdir('plugins/Assets/')
for file in files:
addfile(zf, 'plugins/Assets/' + file)
print('pcmpackage.zip complete')
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"windows"
],
"status": "development",
"version": "1.1.4"
"version": "1.1.5"
}
]
}
Binary file modified pcmpackage.zip
Binary file not shown.
24 changes: 21 additions & 3 deletions plugins/Manufacturers/PCBWay.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
},
"MirrorYAxis":false,
"MinimalHeader":true,
"MergePTHandNPTH":false,
"MergePTHandNPTH":true,
"RouteModeForOvalHoles":true,
"DrillUnitMM":false,
"DrillUnitMM":true,
"ZerosFormat":{
"DecimalFormat":false,
"SuppressLeading":true,
Expand All @@ -62,5 +62,23 @@
"SVG":false,
"PDF":false
},
"OptionalFiles":[]
"OptionalFiles":[],
"BomFile":{
"TopFilename":"*-PCBWay-BOM.csv",
"BottomFilename":"",
"MergeSide":true,
"IncludeTHT":true,
"Tabs":[26, 26, 36, 25, 25, 10],
"Header": "designator,quantity,value,pack,mpn,mount_type",
"Row": "\"${ref}\",${qty},\"${val}\",\"${fp}\",\"${PN}\",\"${type}\""
},
"PosFile":{
"TopFilename":"*-PCBWay-POS-Top.csv",
"BottomFilename":"*-PCBWay-POS-Bottom.csv",
"MergeSide":false,
"IncludeTHT":false,
"Tabs":[10, 10, 10, 6, 10, 36, 8],
"Header": "Designator,Footprint,Mid X,Mid Y,TB,Rotation,Comment",
"Row": "\"${ref}\",\"${fp}\",${x},${y},\"${side1}\",${rot},\"${type}\""
}
}
8 changes: 7 additions & 1 deletion plugins/gerber_zipper_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import traceback
import re

version = "1.1.4"
version = "1.1.5"
strtab = {}

layer_list = [
Expand Down Expand Up @@ -751,6 +751,12 @@ def OnBomPos(self,e):
bomList[side][val] = {'val':val, 'ref':fp.GetReference(), 'fp':fp.GetFPIDAsString().split(':')[1], 'qty':1}
if hasattr(fp, 'GetProperties'):
bomList[side][val].update(fp.GetProperties())
elif hasattr(fp, 'GetFields'):
flds = fp.GetFields()
for fld in flds:
name = fld.GetName()
txt = fld.GetText()
bomList[side][val][name] = txt
bomList[side][val].update(getsubkey(val))
rowformat = bomParam.get('Row')
tfBomTop = None
Expand Down
1 change: 1 addition & 0 deletions plugins/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"default": 7}
41 changes: 41 additions & 0 deletions リリース手順.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# kicad-gerberzipper リポジトリ

## バージョンの更新
gerber_zipper_action.py line 23
metadata.json line 37
README.md #### Note / #### 注

## PCMパッケージ作成
wsl$ python makepackage.py
metadata.json
plugins/Locale/*
plugins/Manufacturers/*
plugins/Assets/*
plugins/gerber_zipper_action.py

## GitHub バージョンTag / Release

# kicad-pcm-repository リポジトリ

## packages.json のversions に追加

* download_url
ファイルページの右上三点メニューから"Copy Permalink"
raw.githubusercontent.com/g200kg/kicad-gerberzipper/XXXXX/pcmpackage.zip
に書き換え

https://github.com/g200kg/kicad-gerberzipper/blob/d339073b3b79eb38438d12c2dbe79edc4779810e/pcmpackage.zip
https://raw.githubusercontent.com/g200kg/kicad-gerberzipper/d339073b3b79eb38438d12c2dbe79edc4779810e/pcmpackage.zip

* download_size : zipのサイズ
* download_sha256 : wsl$ sha256sum pcmpackage.zip
* install_size : 展開したフォルダをエクスプローラで選択してプロパティ
* repository.json : wsl$ python update.py
e.g.
> "packages": {
> "sha256": "5ee5b228c1523cd952a08159690174ee170e9011009297a00e76bfa11079e91a",
> "update_time_utc": "2024-01-01 03:24:36",
> "update_timestamp": 1704047076,
> "url": "https://raw.githubusercontent.com/g200kg/kicad-pcm-repository/main/packages.json"
> }

0 comments on commit 9063658

Please sign in to comment.