Intersect polygons bug

I tried this on V9.0.2 and it seemed to work OK for me . . .

image

It was two simple polygons . . .

image

did it stay the same when you closed it and reopened?

Sorry for the delay.
Ist. It was my dinner time.
2nd. I wasn’t sure how to use the function 'till you explained it.
3rd. I was using 9.0.2 and this experienced a total Kicad crash every time the “Draw Polygon” function was unfilled and then filled.
4th. I had to download 9.0.3 to see if the crash still occurred.
Finally, I managed to attempt to replicate your problem. See below. This is the result when using 9.0.3.

LH drawing = circle not yet turned to a polygon + the reverse E polygon.
Middle drawing = result of Shape Modification > Intersect Polygons after polygons filled. Looks good.
RH drawing is result after Save > Close > Reopen Kicad.

I agree with your findings. There is a bug. I am using Linux Mint.

@marko.f Will you do the honors and file the bug report or would you rather I did it?

A couple of comments:
This problem has only been introduced in 9.0.3 to my knowledge. This problem did not occur in 9.0.2. Saving the drawing, closing Kicad, and then re-opening gave the correct result. HOWEVER there was a major crash every time I tried to unfill and then refill an item created with the “Draw Polygons” tool.
This crash has now been fixed in 9.0.3, but this new problem seems to have been introduced.
These comments may well be worth including with a bug report.

EDIT: As it turns out, I did save the 9.0.2 experiment. The result was perfect after Save > Reopen Kicad. See below:

ksnip_20250715-002113

Application: KiCad PCB Editor x86_64 on x86_64

Version: 9.0.3-9.0.3-0~ubuntu22.04.1, release build

Libraries:
wxWidgets 3.2.1
FreeType 2.11.1
HarfBuzz 2.7.4
FontConfig 2.13.1
libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.19

Platform: Linux Mint 21.3, 64 bit, Little endian, wxGTK, X11, cinnamon, x11
OpenGL: Mesa, NV106, 4.3 (Compatibility Profile) Mesa 23.2.1-1ubuntu3.1~22.04.3

Build Info:
Date: Jul 8 2025 13:03:32
wxWidgets: 3.2.1 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.74.0
OCC: 7.5.1
Curl: 7.81.0
ngspice: 43
Compiler: GCC 11.4.0 with C++ ABI 1016
KICAD_IPC_API=ON

Locale:
Lang: en_AU
Enc: UTF-8
Num: 1,234.5
Encoded кΩ丈: D0BACEA9E4B888 (sys), D0BACEA9E4B888 (utf8)strong text

@RaptorUK

If you’re still on 9.0.2, please try to confirm/verify my comments.

Draw a polygon using the “Draw Polygons” tool, then using Properties, un-fill and then refill the polygon. See if this crashes Kicad.

Also, please try the save > close & re-open Kicad after completing your Shape Modification > Intersect Polygons.
Thanks.