Full python Via Stitching

Hi All,

Please find attached a tool to via stitching in python. It’s work directly on python console inside pcbnew.
I had successfully test it under Linux. Tell me if it’s working on OSX and Windows…
I had use it on daily build of KiCad. Not (yet) tested on stable versions 4.0.X…

To use it:

  • First you neet to copy this file (named FillArea.py) in your kicad_plugins directory (~/.kicad_plugins/ on Linux)
  • Launch pcbnew and open python console (last entry of Tools menu)
  • Then enter the following line (one by one, Hit enter after each)
    import FillArea FillArea.FillArea().Run()
  • Hit F11 to redraw (F3 is not enough)
  • run DRC.
  • You will be able to save your document

Is anybody know how to avoid this last 3 steps ?

Screenshot:


The script:
FillArea.py (12.8 KB)

3 Likes

Hi @jsreynaud
are you planning to port it to Action Script? :smiley:

Maurice

Yes, I was done since a long time… But never committed.
Now it’s available:

3 Likes

A potential improvement suggestion: Check board edges to avoid placing the vias outside the board. I usually do double-sided ground pours by placing the zone borders outside the board for easy access.

where on windows machines should the scripts be placed?

using ver 5.0.0

Why are you using pads instead of vias in your scripts? In Kicad V5, vias retain their nets unless connected to a pad containing a different net.

Tom

i can not even get the script to run

Did you ever make it work on Windows? I can’t seem to import the script.

Nice, since I am using Linux, KiCad still have a issue with GTK3 (standard graphical library) and does’t allow use the python window (just action plugins).

:+1:
It is reported here

I couldn’t made it run.
Other issue that I found: selected a filled zone, the net in the dialog is always GND (not taking account my selected filled zone).

Apparently the pcbnew API changed in Kicad 6. This plugin does not work anymore. Is there any replacement for BuildFilledSolidAreasPolygons to fill zones?

There is no KiCad 6. Builds that report them selves as v6 are nightly builds (development snapshots). The ones you get right now will someday become version 5.1.0 (goal is FOSDEM 2019)

The python API can change a lot during fast development phases as there is no abstraction layer between the c code ant the python API. (@pointhi is working on one)
This means that most python plugins do not work well on nightly.
This is only one of the downsides of using nightly builds

Allright. Thanks. I was not familiar with the development model, that is used here.