python: pcbnew.SEG and missing handling for OPT_VECTOR2I
Description
pcbnew.SEG Intersect
function is not usable due to missing handling for OPT_VECTOR2I
https://forum.kicad.info/t/pcbnew-seg-and-missing-handling-for-opt-vector2i/50765/1
Steps to reproduce
In scripting console:
seg1 = pcbnew.SEG(pos1, pos2)
seg2 = pcbnew.SEG(pos3, pos4)
result = seg1.Intersect(seg2)
Results with:
swig/python detected a memory leak of type 'std::optional< VECTOR2< int > > *', no destructor found.
and unusable result object.
KiCad Version
Application: KiCad PCB Editor x86_64 on x86_64
Version: 8.0.2, release build
Libraries:
wxWidgets 3.2.4
FreeType 2.13.2
HarfBuzz 8.4.0
FontConfig 2.15.0
libcurl/8.7.1 OpenSSL/3.3.0 zlib/1.3.1 brotli/1.1.0 zstd/1.5.5 libidn2/2.3.7 libpsl/0.21.5 libssh2/1.11.0 nghttp2/1.61.0 nghttp3/1.2.0
Platform: Arch Linux, 64 bit, Little endian, wxGTK, X11, , tty
Build Info:
Date: Apr 28 2024 16:02:51
wxWidgets: 3.2.4 (wchar_t,wx containers) GTK+ 3.24
Boost: 1.83.0
OCC: 7.7.2
Curl: 8.7.1
ngspice: 42
Compiler: GCC 13.2.1 with C++ ABI 1018
Build settings:
KICAD_USE_EGL=ON