From 06d2b9b2d0a5c823677aba1fb33d3e466aff351f Mon Sep 17 00:00:00 2001 From: supermerill Date: Thu, 27 Aug 2020 17:27:20 +0200 Subject: [PATCH] fix build --- src/slic3r/GUI/FreeCADDialog.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/FreeCADDialog.cpp b/src/slic3r/GUI/FreeCADDialog.cpp index ae4d0187ad0..86934ef7046 100644 --- a/src/slic3r/GUI/FreeCADDialog.cpp +++ b/src/slic3r/GUI/FreeCADDialog.cpp @@ -945,8 +945,9 @@ void FreeCADDialog::create_geometry(wxCommandEvent& event_args) { std::stringstream ss; ss << "plater_" << idx_plater_obj << ".stl"; boost::filesystem::path temp_stl(Slic3r::data_dir()); temp_stl = temp_stl / "temp" / ss.str(); + TriangleMesh mesh = (idx_plater_obj == 0) ? this->main_frame->plater()->model().mesh() : this->main_frame->plater()->model().objects[idx_plater_obj - 1]->mesh(); Slic3r::store_stl(temp_stl.generic_string().c_str(), - (idx_plater_obj == 0) ? &this->main_frame->plater()->model().mesh() : &this->main_frame->plater()->model().objects[idx_plater_obj-1]->mesh(), + &mesh, true); } else { m_errors->AppendText("Error, cannot find object " + std::to_string(idx_plater_obj)