Altium symbol import coordinate rounding 24.9999 12.6999 etc / Schematic editor cannot connect wire when grid snapping on
Description
I'm importing schematics from Altium, and when inspecting the lisp-like KiCad schematics file, I can see that many coordinates are imported as truncated decimals that end with 9999. When the grid is switched on in the schematic, it's impossible to draw a wire that links to the pin - the grid snapping takes precedence over pin snapping and a mismatch of 0.0001 is enough for the wire not to link to the pin.
Suggested fixing is to improve floating-point rounding of the coordinates so that the import of 24.9999 resolves to 25.0. Also maybe relax snapping rules and let pin connection take precedence over grid if it's within some small delta.
Steps to reproduce
- Import some complicated Altium schematic
- Look for unconnected pins (overlapped rectangles with circles without the actual connection
KiCad Version
Application: KiCad Schematic Editor
Version: (6.99.0-2017-gabba1b04bd), release build
Libraries:
wxWidgets 3.1.5
FreeType 2.12.0
HarfBuzz 4.3.0
FontConfig 2.14.0
libcurl/7.79.1 SecureTransport (LibreSSL/3.3.6) zlib/1.2.11 nghttp2/1.45.1
Platform: macOS Version 12.4 (Build 21F79), 64 bit, Little endian, wxMac
Build Info:
Date: May 30 2022 22:19:40
wxWidgets: 3.1.5 (wchar_t,wx containers)
Boost: 1.78.0
OCC: 7.6.2
Curl: 7.64.1
ngspice: 35
Compiler: Clang 12.0.0 with C++ ABI 1002
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON