Negative scaling factors in Pcbnew footprint editor / 3D properties
Negative scaling factors DO make sense in footprint 3D properties (= mirroring). I didn't find anwers here with "negative scaling".
In Pcbnew, 3D models are not correctly mirrored. see video : https://www.youtube.com/watch?v=iIffExcJXHA
Description
The 3D model (step or wrl) is mirrored as expected, but totally messed up. The pcb file is not displayed properly, in KiCad and in KiCadStepUp. Exported step files are also not correctly imported with at least another CAD software.
see video : https://www.youtube.com/watch?v=iIffExcJXHA
Steps to reproduce
see video : https://www.youtube.com/watch?v=iIffExcJXHA
KiCad Version
KiCad 1.71.0 64bit
Application: KiCad
Version: (5.1.6)-1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.66.0 OpenSSL/1.1.1d (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.1.1) nghttp2/1.39.2
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8)
Boost: 1.71.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.66.0
Compiler: GCC 9.2.0 with C++ ABI 1013
Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=OFF
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=OFF
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=ON
KICAD_USE_OCC=OFF
KICAD_SPICE=ON
------------------ some thoughts -----------------
It seems KiCad, or 3D engine, or step/wrl management doe not support negative scaling (= mirroring). If this problem cannot be fixed, negative scaling factors should be immediatly rejected from the edit fields ('-' character). Exported step files with negative scaling factors are not recognized by CAD softwares. Is the problem in step and wrl file formats ? I don't know anything about these formats. But I suspect a transformation matrix is saved in some header. Either the matrix is not properly multiplied with the vectors, or a abs() is used somewhere, or a squared value is square-rooted later or whatever... There's no mathematical reason such a transformation couldn't be applied.
There's a workaround. It takes a (tiny) bit more time, and is perfectly suitable for components (headers) with one symetry plane : rotation + offset. So it is not a huge problem.
Better : KiCad could automatically recompute the 3D model attached to a footprint when the footprint is mirrored.
Ok, it makes sense for headers and a few other components only, but it would make their use much more efficient in Pcbnew !
Please, note I created hundreds (620 !) 3D models for left/right pin/socket headers before I discover how to avoid this LMFAO
[EDIT] The bot tells me the description is incomplete. I don't understand what's missing ; I even spent a lot of time making a video...