mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-06-21 10:06:27 +03:00
slaprint with dummy backround processing in plater.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
#include "SLAPrint.hpp"
|
||||
#include "GUI.hpp"
|
||||
#include "GLGizmo.hpp"
|
||||
#include "Plater.hpp"
|
||||
|
||||
#include "GUI_App.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
@@ -16,20 +20,57 @@ const std::string SLAPrint::m_stage_labels[] = {
|
||||
L("SLA print preparation aborted") // ABORT,
|
||||
};
|
||||
|
||||
void SLAPrint::synch() {
|
||||
m_gcfg = m_config_reader();
|
||||
// TODO: check model objects and instances
|
||||
void SLAPrint::_start()
|
||||
{
|
||||
}
|
||||
|
||||
bool SLAPrint::start(std::shared_ptr<BackgroundProcess> scheduler) {
|
||||
if(!m_process || !m_process->is_running()) set_scheduler(scheduler);
|
||||
void SLAPrint::_synch() {
|
||||
m_gcfg = m_config_reader();
|
||||
// TODO: fill PrintObject cache
|
||||
m_dirty.store(false);
|
||||
}
|
||||
|
||||
bool SLAPrint::start() {
|
||||
if(!m_process) return false;
|
||||
|
||||
m_process->schedule([this, scheduler](){
|
||||
|
||||
});
|
||||
m_process->schedule([this](){ _start(); });
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
namespace GUI {
|
||||
|
||||
void GLGizmoSlaSupports::on_deactivate() {
|
||||
std::cout << "gizmo deactivated " << std::endl;
|
||||
if(!m_model_object) return;
|
||||
|
||||
SLAPrint& print = wxGetApp().plater()->sla_print();
|
||||
print.synch();
|
||||
|
||||
print.start();
|
||||
|
||||
// sla::Controller supportctl;
|
||||
// std::cout << "Generating supports:" << std::endl;
|
||||
|
||||
// // TODO: somehow get the global status indicator
|
||||
// supportctl.statuscb = [] (unsigned st, const std::string& msg) {
|
||||
// std::cout << st << "% " << msg << std::endl;
|
||||
// };
|
||||
|
||||
// TriangleMesh&& m = m_model_object->raw_mesh();
|
||||
// m.transform(m_model_object_matrix);
|
||||
// auto emesh = sla::to_eigenmesh(m);
|
||||
|
||||
// sla::SupportConfig cfg;
|
||||
// sla::PointSet input = sla::support_points(*m_model_object, 0 /*instance*/);
|
||||
|
||||
// sla::SLASupportTree stree(input, emesh, cfg, supportctl);
|
||||
|
||||
// TriangleMesh output;
|
||||
// stree.merged_mesh(output);
|
||||
|
||||
// _3DScene::reload_scene(m_parent.get_wxglcanvas(), false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user