Panel Origin #740
|
Hi @set-soft , Love your work!! Quick question: |
Replies: 3 comments
|
Hi @Thorfinn-Thorsson ! |
|
For others who are interested, you can do something like the following. Using a custom fiducial plugin like this one. Then add it to your panel config like this. fiducials:
type: plugin
arg: ' --panel 5 5 --board -2.5 2.5'
code: 'FiducialPlugin.py.CustomFiducialPlugin' |
|
I faced a similar problem and used another solution, here is the script: def kikitPostprocess(panel, args):
board = panel.board
for m in board.GetFootprints():
if m.GetReference() == args:
center = m.GetCenter()
print(f'Changing origin to {center}')
panel.setAuxiliaryOrigin(center)
panel.setGridOrigin(center)Then you can just add the following post-process to KiKit's JSON file: "post": {
"script": "move_origin.py",
"scriptarg": "KiKit_FID_T_3"
},Where KiKit_FID_T_3 is the name of the fiducial you want to use as origin. If you don't know it just open the panel with pcbnew and select the fiducial you want, just use the reference of the footprint here. If not using a separated JSON, but KiBot's YAML use: post:
script: move_origin.py
scriptarg: KiKit_FID_T_3 |
I faced a similar problem and used another solution, here is the script:
Then you can just add the following post-process to KiKit's JSON file:
Where KiKit_FID_T_3 is the name of the fiducial you want to use as origin. If you don't know it just open the panel with pcbnew and select the fiducial you…