mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-24 06:20:30 -05:00
* By object: order rotated copies of an object by their list position Copies of one object that differ in rotation get one PrintObject each, and print.objects() lists those groups by transformation. sequential_print_ clearance_valid() keyed the instances by their object's index, which all copies share, so std::stable_sort kept the transformation grouping and every second copy on a rotated plate printed out of place. Key each instance by its position in the model's object and instance lists instead. No key repeats, so the sort no longer depends on being stable, and arrange_order is then the list order the G-code export and the sequence labels already print in. Fixes #17260. * Keep the sequential printed-copy tests in step with the list order The new by-object test rotated a cube centred on its corner, which moved the footprint by half the cube and closed the 12 mm grid gap under the 2 mm clearance distance, so validation rejected the plate. Centre the mesh on the object origin so the rotation turns the footprint in place. Sequential clearance warned the copy that print.objects() listed first, which for a plate of rotated copies was the rotated one. Copies now print in object list order, so print validation warns the first copy in the list; expect that copy from the preview as well, and drop the now incorrect header comment.
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: