mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Refactored PrintObject::m_copies to PrintInstances,
so that the ordering code at G-code export may work directly with pointers to PrintInstances instead of with pair of <PrintObject, copy idx>. Also the PrintInstance knows its source ModelInstance, which allows sorting of PrintInstances for sequential printing in the order they appear in Plater's object list.
This commit is contained in:
parent
cea7cbfaa0
commit
71fa411100
10 changed files with 226 additions and 209 deletions
|
@ -121,9 +121,9 @@ BoundingBoxf get_print_object_extrusions_extents(const PrintObject &print_object
|
|||
if (support_layer)
|
||||
for (const ExtrusionEntity *extrusion_entity : support_layer->support_fills.entities)
|
||||
bbox_this.merge(extrusionentity_extents(extrusion_entity));
|
||||
for (const Point &offset : print_object.copies()) {
|
||||
for (const PrintInstance &instance : print_object.instances()) {
|
||||
BoundingBoxf bbox_translated(bbox_this);
|
||||
bbox_translated.translate(unscale(offset));
|
||||
bbox_translated.translate(unscale(instance.shift));
|
||||
bbox.merge(bbox_translated);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue