Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filling zones #11

Open
arikrupnik opened this issue Nov 14, 2019 · 1 comment
Open

Filling zones #11

arikrupnik opened this issue Nov 14, 2019 · 1 comment

Comments

@arikrupnik
Copy link

@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.

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()
set-soft added a commit to INTI-CMNB/KiBot that referenced this issue Jun 14, 2020
Implemented in a different way.
For all internal commands now we use Python bindings to fill the zones as
suggested by @arikrupnik in johnbeard#11
For 'print_pcb' now we ask KiCad to do it before printing (needs v1.4.1)
@set-soft
Copy link

Very good idea @arikrupnik I was using a weaker strategy in my fork:
https://github.com/INTI-CMNB/kiplot
Now I'm using your suggestion: INTI-CMNB/KiBot@0d9256f
Thanks!

rdeterre pushed a commit to rdeterre/kiplot that referenced this issue Nov 9, 2020
README: Make navigation more easy
rdeterre pushed a commit to rdeterre/kiplot that referenced this issue Nov 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants