Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2020-01-23 11:53:06 +0300
committerbubnikv <bubnikv@gmail.com>2020-01-23 11:53:06 +0300
commit71fa41110049a79ec1d5c3052d22647a38d01bed (patch)
treec528dab838e328005de9fca998c61ded3e7327fa /src/slic3r/GUI/GLCanvas3D.cpp
parentcea7cbfaa09b6fb159bcb48e694271ed192b63a3 (diff)
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.
Diffstat (limited to 'src/slic3r/GUI/GLCanvas3D.cpp')
-rw-r--r--src/slic3r/GUI/GLCanvas3D.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp
index 7cceb1a5f..9a5cea511 100644
--- a/src/slic3r/GUI/GLCanvas3D.cpp
+++ b/src/slic3r/GUI/GLCanvas3D.cpp
@@ -5251,7 +5251,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
struct Ctxt
{
- const Points *shifted_copies;
+ const PrintInstances *shifted_copies;
std::vector<const Layer*> layers;
bool has_perimeters;
bool has_infill;
@@ -5384,7 +5384,7 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
ctxt.is_single_material_print = this->fff_print()->extruders().size()==1;
ctxt.extruders_cnt = wxGetApp().extruders_edited_cnt();
- ctxt.shifted_copies = &print_object.copies();
+ ctxt.shifted_copies = &print_object.instances();
// order layers by print_z
{
@@ -5473,7 +5473,8 @@ void GLCanvas3D::_load_print_object_toolpaths(const PrintObject& print_object, c
vol->offsets.push_back(vol->indexed_vertex_array.quad_indices.size());
vol->offsets.push_back(vol->indexed_vertex_array.triangle_indices.size());
}
- for (const Point &copy : *ctxt.shifted_copies) {
+ for (const PrintInstance &instance : *ctxt.shifted_copies) {
+ const Point &copy = instance.shift;
for (const LayerRegion *layerm : layer->regions()) {
if (is_selected_separate_extruder)
{