Inconsistent/strange hatch fill behaviour
I've noticed there is some strange behaviour when using hatch fills, primarily it being inconsistent about if/when/where it decides to do the fill, and it seems very arbitrary.
For instance, these two zones are identical sizes, and have identical settings, but the left is properly filled while the right is not
{width=594 height=427}
*however* if you copy/paste them, the hover preview shows them hatched somewhat sanely, minus the knockout for the geometry in the middle
{width=698 height=600}
And even if you adjust the line width (0.5mm to 0.1mm in this case), the behaviour changes strangely, in this case only filling in a small interior section and nothing else.
{width=321 height=502}
So I suspect this has something to do with complex concave/convex geometry inside of the zone
# Steps to reproduce
1. Create a rectangle (on the F.Silkscreen, layer in this example)
2. Modify the properties and set it to have a `Hatch` fill
3. Place a text object in the middle with `02`, as the text, normal KiCad font is fine, but you'll want it to be 10mm for height and width, and 1mm for thickness.
4. Hatch will still function normally
5. Right-click > Create From Selection > Create Polygon
6. Use centerlines > OK
7. Hatch solving fails
| Before Steps 5/6 | After |
|------------------|-------|
|{width=568 height=537}|{width=529 height=513}|
The general advice would be "Don't turn text objects into polygons" but normal text objects have the knockout for hatch regions be a bounding box around the text, which doesn't look very nice, by converting them to polygons the idea is to allow the hatch to more tightly hug the contours of the text.
Attached is a PCB layout file with the objects that these screenshots were taken with [weird-hatching.pcb.kicad_pcb](/uploads/6168d68de3384124490c7f74eea16c1a/weird-hatching.pcb.kicad_pcb)
# KiCad Version
```
Application: KiCad PCB Editor x86_64 on x86_64
Version: 10.0.0, release build
Libraries:
wxWidgets 3.2.10 EGL
FreeType 2.14.3
HarfBuzz 13.2.1
FontConfig 2.17.1
libcurl/8.19.0 OpenSSL/3.6.2 zlib/1.3.2 brotli/1.2.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.68.1 ngtcp2/1.22.0 nghttp3/1.15.0 mit-krb5/1.21.3
Platform: Arch Linux, 64 bit, Little endian, wxGTK, X11, x11, KDE, KDE
OpenGL: AMD, AMD Radeon RX Vega (radeonsi, vega10, ACO, DRM 3.64, 6.19.11-arch1-1), 4.6 (Compatibility Profile) Mesa 26.0.4-arch1.1, EGL
Build Info:
Date: Mar 28 2026 09:31:20
wxWidgets: 3.2.10 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.90.0
OCC: 7.9.3
Curl: 8.19.0
ngspice: 45
Compiler: GCC 15.2.1 with C++ ABI 1020
KICAD_IPC_API=ON
KICAD_USE_PCH=OFF
Locale:
Lang: en_US
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)
```
issue