remove SLAPrint and its integration

This commit is contained in:
tamasmeszaros 2018-11-08 16:18:05 +01:00
parent 3b373a55e6
commit bf1188442a
7 changed files with 2 additions and 331 deletions

View file

@ -33,7 +33,6 @@
#include "libslic3r/Format/AMF.hpp"
#include "libslic3r/Format/3mf.hpp"
#include "slic3r/AppController.hpp"
#include "SLAPrint.hpp"
#include "GUI.hpp"
#include "GUI_App.hpp"
#include "GUI_ObjectList.hpp"
@ -841,43 +840,6 @@ bool PlaterDropTarget::OnDropFiles(wxCoord x, wxCoord y, const wxArrayString &fi
}
// Plater / private
// For the SLAPrint: No multi-threading here
class DummyBackgroundProcess: public BackgroundProcess {
public:
/// schedule a task on the background
virtual void schedule(std::function<void()> fn) override {
/*std::asynch*/ fn();
}
/// Report status change, used inside the worker thread
virtual void status(unsigned st, const std::string& msg) {
// TODO would use the statusbar gauge
std::cout << "Processing " << st << "% " << msg << std::endl;
}
/// Check whether the calculation was canceled from the UI. Called by the
/// worker thread
virtual bool is_canceled() {
// this would be connected to the statusbar's cancel button
// and return true if that was pushed during the processing
return false;
}
/// Determine the state of the background process. If something is running
/// returns true. If no job is running, returns false.
virtual bool is_running() { return false; }
virtual void input_changed() override {
/*lock();*/
BackgroundProcess::input_changed();
/*unlock();*/
}
};
struct Plater::priv
{
// PIMPL back pointer ("Q-Pointer")
@ -893,9 +855,6 @@ struct Plater::priv
Slic3r::Model model;
Slic3r::GCodePreviewData gcode_preview_data;
// Will live only in this branch:
Slic3r::SLAPrint slaprint;
// GUI elements
wxNotebook *notebook;
Sidebar *sidebar;
@ -994,10 +953,8 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) :
})),
notebook(new wxNotebook(q, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_BOTTOM)),
sidebar(new Sidebar(q)),
canvas3D(GLCanvas3DManager::create_wxglcanvas(notebook)),
slaprint(&model)
canvas3D(GLCanvas3DManager::create_wxglcanvas(notebook))
{
slaprint.set_scheduler(std::make_shared<DummyBackgroundProcess>());
// TODO: background_process.set_print(&slaprint);
background_process.set_print(&print);
background_process.set_gcode_preview_data(&gcode_preview_data);
@ -1567,9 +1524,6 @@ void Plater::priv::async_apply_config()
// Apply new config to the possibly running background task.
Print::ApplyStatus invalidated = this->background_process.apply(this->q->model(), std::move(config));
// Thread safe invalidation of the SLAPrint data cache
this->slaprint.synch();
// Just redraw the 3D canvas without reloading the scene to consume the update of the layer height profile.
if (Slic3r::_3DScene::is_layers_editing_enabled(this->canvas3D))
this->canvas3D->Refresh();
@ -1980,11 +1934,6 @@ Sidebar& Plater::sidebar() { return *p->sidebar; }
Model& Plater::model() { return p->model; }
Print& Plater::print() { return p->print; }
SLAPrint &Plater::sla_print()
{
return p->slaprint;
}
void Plater::add()
{
wxArrayString input_files;