Files
OrcaSlicer/tests/libslic3r
Ian Bassi ea10c84d6b Fix scale and mirror of rotated mirrored objects (#16131)
* Fix decomposition of mirrored transformations

computeRotationScaling() may place the mirror on any axis, giving unstable rotation/scale for mirrored matrices. Decompose them by flipping each local axis and choosing the one needing the least rotation (lowest axis on ties). Merge the extract helpers into a single extract_rotation_scale() and simplify contains_skew() to check that the scale is diagonal.

set_scaling_factor() now preserves the mirror sign on the scaled axis. Selection::scale_and_translate() uses Transformation's rotation and scale instead of calling computeRotationScaling() directly, so scaling a mirrored instance adds no skew.

Add tests for mirrored decomposition, scaling, and skew detection.

* Use Eigen polar decomposition for instance scaling

Selection::scale_and_translate now splits the instance matrix with computeRotationScaling instead of get_rotation_matrix().

Adds a Model test checking that an instance created from another's offset, scale, rotation and mirror reproduces its matrix (as Add instance and Fill bed do).

* tidy
2026-10-10 16:03:34 -03:00
..
2025-12-08 22:42:11 +08:00