kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #19584
Via stitching (Python)
Hi,
as promised, I've "pushed" my stitching tool to launchpad, you can find my branch here:
http://code.launchpad.net/~torstenhtr/kicad/kicad_via_stitching
if you like to try this tool, get my branch, compile KiCad as usual (with scripting), open
the scripting console and use these commands:
import os
os.chdir("<stitching tool path>") # The tool can be found under <KiCad sources>/pcbnew/scripting/tools/viastitching
import via_stitching_dialog
via_stitching_dialog.start_dialog()
(Change to the GAL view / select a zone with the selection tool first)
See also the attached screenshot.
--
It's possible to use this tool from the Python console as well:
import via_stitching
vs = via_stitching.ViaStitching()
vs.stitch_zone() # Stitches a selected zone
vs.stitch_edge() # Stiches the zone edge only
vs.delete_vias() # Deletes the stitch vias, if a zone was selected deletes only the vias inside that zone
--
Supported is so far:
* Stitching of zones
* Stitching of zone edges
* Staggered rows
* Randomize of the via position
* Alignment of the vias to the selected grid
* Netclass defaults
* Undo
--
The tool is written in Python and I've tried to avoid to use C++ as much as possible
(just here and there an accessor / small helper).
I think via stitching is a great application for the Python scripting interface, because it's
used mostly at the end of the design process it don't has to be fast - but with Python you're
much more flexible, changes require no rebuild of KiCad, it can be used easily as plugin etc.
I've used a single pad module for the vias, because this has practical advantages - e.g. I can
store meta-information, the via can be moved just like any other module, no change of the file
format is required, solder mask can be adjusted and no issues with the net connectivity so far.
Thanks,
Torsten
Attachment:
Via_Stitching_Python.JPG
Description: JPEG image