python pcbnew filler behaves differently than pressing 'B' in the GUI
Description
I am creating a PCB using the pcbnew kicad-python interface. At the end of the script, I do:
filler = pcbnew.ZONE_FILLER(board)
zones = board.Zones()
filler.Fill(zones)
Unfortunately, after doing this, when I open KiCad, some zones are filled, some are not. If I then click 'B', the zones that were not filled finally fill. Why is the script version behaving differently? Or can I pass in the script some argument to the function so that it behaves as in the GUI?
Steps to reproduce
- Open the script-generated PCB board attached in https://forum.kicad.info/t/copper-pour-not-filling-in-small-zones-no-matter-the-clearance/22761/23?u=ferdymercury
- Press B to fill missing zones
KiCad Version
Application: Pcbnew
Version: 5.1.5-52549c5~86~ubuntu18.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-72-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
Boost: 1.65.1
OpenCASCADE Community Edition: 6.9.1
Curl: 7.58.0
Compiler: GCC 7.5.0 with C++ ABI 1011
Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON