"Close gap" in Fill tool

My code can fill narrow passages and many corners, but fails in some corners. Unfortunately I am a Python novice and cannot read or write C++…
But ideas may be shared. If you find anything puzzling in my code, please ask.

2 Likes