mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-22 21:50:51 -05:00
Turn imported layout as one piece and keep objects in place when centering Preferred orientation turned every imported object around its own part origins and then centered it in X, Y and Z without moving its instance. Objects sank by half their height before the multi-part check, which then asked about objects standing on the bed, AMF objects shifted by the offset of their mesh from the file origin, and multi-part objects fell apart at non-zero angles. Model::rotate_and_center_objects() turns the file's content as one piece, around the placed layout's center, or around the file origin for objects without instances, and centers every placed object with its instances compensating the shift, so nothing moves and origin_translation keeps recording only uncompensated centering. Unplaced objects are centered in XY only, as before minus Z, until they are placed. Fixes #17084
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: