-
Notifications
You must be signed in to change notification settings - Fork 86
Description
@johnbeard , thank you for writing this extremely useful piece of software, and for wading through the spartan documentation on the Python API. Your code is the best documentation I've found for many aspects of the API!
One issue in particular has been a stumbling block for me: filling copper pour zones. Going by this comment in your code, it has been an issue for you, too.
Line 65 in f1c85db
| raise PlotError("Not sure if Python scripts can do zone check!") |
Seth Hillbrand over at the KiCAD forum has been able to answer my question, and I imagine you might find his answer relevant:
https://forum.kicad.info/t/filling-zones-copper-pours-inside-the-python-api/19814
In my own code, I have it as a single line:
pcbnew.ZONE_FILLER(board).Fill(board.Zones())
If you still want to check whether zones are filled (instead of unconditionally filling them as I do), you can use something like this:
for idx in range(0, board.GetAreaCount()):
zone=board.GetArea(idx)
print "zone:", zone.GetNetname(), "isFilled:", zone.IsFilled()