mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-18 07:25:57 +08:00
don't emit warning when generate calibration
supermerill/SuperSlicer#1325
This commit is contained in:
parent
532ecec73a
commit
428b4c0f56
@ -1276,7 +1276,7 @@ static inline bool sequential_print_horizontal_clearance_valid(const Print &prin
|
|||||||
Polygons convex_hulls_other;
|
Polygons convex_hulls_other;
|
||||||
std::map<ObjectID, Polygon> map_model_object_to_convex_hull;
|
std::map<ObjectID, Polygon> map_model_object_to_convex_hull;
|
||||||
for (const PrintObject *print_object : print.objects()) {
|
for (const PrintObject *print_object : print.objects()) {
|
||||||
double dist_grow = PrintConfig::min_object_distance(&print_object->config());
|
double dist_grow = PrintConfig::min_object_distance(&print.full_print_config());// &print_object->config());
|
||||||
assert(! print_object->model_object()->instances.empty());
|
assert(! print_object->model_object()->instances.empty());
|
||||||
assert(! print_object->instances().empty());
|
assert(! print_object->instances().empty());
|
||||||
ObjectID model_object_id = print_object->model_object()->id();
|
ObjectID model_object_id = print_object->model_object()->id();
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#include "libslic3r/Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/AppConfig.hpp"
|
#include "libslic3r/AppConfig.hpp"
|
||||||
|
#include "GLCanvas3D.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
@ -36,12 +37,12 @@ void CalibrationBedDialog::create_geometry(wxCommandEvent& event_args) {
|
|||||||
if (!plat->new_project(L("First layer calibration")))
|
if (!plat->new_project(L("First layer calibration")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GLCanvas3D::set_warning_freeze(true);
|
||||||
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
||||||
if(autocenter) {
|
if(autocenter) {
|
||||||
//disable aut-ocenter for this calibration.
|
//disable aut-ocenter for this calibration.
|
||||||
gui_app->app_config->set("autocenter", "0");
|
gui_app->app_config->set("autocenter", "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{
|
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{
|
||||||
Slic3r::resources_dir()+"/calibration/bed_leveling/patch.amf",
|
Slic3r::resources_dir()+"/calibration/bed_leveling/patch.amf",
|
||||||
Slic3r::resources_dir()+"/calibration/bed_leveling/patch.amf",
|
Slic3r::resources_dir()+"/calibration/bed_leveling/patch.amf",
|
||||||
@ -134,6 +135,7 @@ void CalibrationBedDialog::create_geometry(wxCommandEvent& event_args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//update plater
|
//update plater
|
||||||
|
GLCanvas3D::set_warning_freeze(false);
|
||||||
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
||||||
plat->on_config_change(new_print_config);
|
plat->on_config_change(new_print_config);
|
||||||
plat->changed_objects(objs_idx);
|
plat->changed_objects(objs_idx);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/AppConfig.hpp"
|
#include "libslic3r/AppConfig.hpp"
|
||||||
#include "Jobs/ArrangeJob.hpp"
|
#include "Jobs/ArrangeJob.hpp"
|
||||||
|
#include "GLCanvas3D.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
@ -56,6 +57,7 @@ void CalibrationBridgeDialog::create_geometry(std::string setting_to_test, bool
|
|||||||
if (!plat->new_project(L("Bridge calibration")))
|
if (!plat->new_project(L("Bridge calibration")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GLCanvas3D::set_warning_freeze(true);
|
||||||
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
||||||
if (autocenter) {
|
if (autocenter) {
|
||||||
//disable auto-center for this calibration.
|
//disable auto-center for this calibration.
|
||||||
@ -143,6 +145,7 @@ void CalibrationBridgeDialog::create_geometry(std::string setting_to_test, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
//update plater
|
//update plater
|
||||||
|
GLCanvas3D::set_warning_freeze(false);
|
||||||
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
||||||
plat->on_config_change(new_print_config);
|
plat->on_config_change(new_print_config);
|
||||||
plat->changed_objects(objs_idx);
|
plat->changed_objects(objs_idx);
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#include "I18N.hpp"
|
#include "I18N.hpp"
|
||||||
#include "libslic3r/Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
|
#include "GLCanvas3D.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
@ -60,6 +61,7 @@ void CalibrationCubeDialog::create_geometry(std::string calibration_path) {
|
|||||||
if (!plat->new_project(L("Calibration cube")))
|
if (!plat->new_project(L("Calibration cube")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GLCanvas3D::set_warning_freeze(true);
|
||||||
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{
|
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{
|
||||||
Slic3r::resources_dir()+"/calibration/cube/"+ calibration_path}, true, false, false);
|
Slic3r::resources_dir()+"/calibration/cube/"+ calibration_path}, true, false, false);
|
||||||
|
|
||||||
@ -103,6 +105,7 @@ void CalibrationCubeDialog::create_geometry(std::string calibration_path) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//update plater
|
//update plater
|
||||||
|
GLCanvas3D::set_warning_freeze(false);
|
||||||
plat->changed_objects(objs_idx);
|
plat->changed_objects(objs_idx);
|
||||||
plat->is_preview_shown();
|
plat->is_preview_shown();
|
||||||
//update everything, easier to code.
|
//update everything, easier to code.
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/AppConfig.hpp"
|
#include "libslic3r/AppConfig.hpp"
|
||||||
#include "Jobs/ArrangeJob.hpp"
|
#include "Jobs/ArrangeJob.hpp"
|
||||||
|
#include "GLCanvas3D.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
@ -41,6 +42,7 @@ void CalibrationFlowDialog::create_geometry(float start, float delta) {
|
|||||||
if (!plat->new_project(L("Flow calibration")))
|
if (!plat->new_project(L("Flow calibration")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GLCanvas3D::set_warning_freeze(true);
|
||||||
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
||||||
if (autocenter) {
|
if (autocenter) {
|
||||||
//disable auto-center for this calibration.
|
//disable auto-center for this calibration.
|
||||||
@ -159,6 +161,7 @@ void CalibrationFlowDialog::create_geometry(float start, float delta) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//update plater
|
//update plater
|
||||||
|
GLCanvas3D::set_warning_freeze(false);
|
||||||
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
||||||
plat->on_config_change(new_print_config);
|
plat->on_config_change(new_print_config);
|
||||||
plat->changed_objects(objs_idx);
|
plat->changed_objects(objs_idx);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/AppConfig.hpp"
|
#include "libslic3r/AppConfig.hpp"
|
||||||
#include "Jobs/ArrangeJob.hpp"
|
#include "Jobs/ArrangeJob.hpp"
|
||||||
|
#include "GLCanvas3D.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
@ -46,6 +47,7 @@ void CalibrationOverBridgeDialog::create_geometry(bool over_bridge) {
|
|||||||
if (!plat->new_project(L("Over-bridge calibration")))
|
if (!plat->new_project(L("Over-bridge calibration")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GLCanvas3D::set_warning_freeze(true);
|
||||||
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
||||||
if (autocenter) {
|
if (autocenter) {
|
||||||
//disable aut-ocenter for this calibration.
|
//disable aut-ocenter for this calibration.
|
||||||
@ -135,6 +137,7 @@ void CalibrationOverBridgeDialog::create_geometry(bool over_bridge) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//update plater
|
//update plater
|
||||||
|
GLCanvas3D::set_warning_freeze(false);
|
||||||
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
||||||
plat->on_config_change(new_print_config);
|
plat->on_config_change(new_print_config);
|
||||||
plat->changed_objects(objs_idx);
|
plat->changed_objects(objs_idx);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "libslic3r/Utils.hpp"
|
#include "libslic3r/Utils.hpp"
|
||||||
#include "libslic3r/AppConfig.hpp"
|
#include "libslic3r/AppConfig.hpp"
|
||||||
#include "Jobs/ArrangeJob.hpp"
|
#include "Jobs/ArrangeJob.hpp"
|
||||||
|
#include "GLCanvas3D.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
@ -104,6 +105,7 @@ void CalibrationRetractionDialog::create_geometry(wxCommandEvent& event_args) {
|
|||||||
if (!plat->new_project(L("Retraction calibration")))
|
if (!plat->new_project(L("Retraction calibration")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GLCanvas3D::set_warning_freeze(true);
|
||||||
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
bool autocenter = gui_app->app_config->get("autocenter") == "1";
|
||||||
if (autocenter) {
|
if (autocenter) {
|
||||||
//disable aut-ocenter for this calibration.
|
//disable aut-ocenter for this calibration.
|
||||||
@ -254,6 +256,7 @@ void CalibrationRetractionDialog::create_geometry(wxCommandEvent& event_args) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//update plater
|
//update plater
|
||||||
|
GLCanvas3D::set_warning_freeze(false);
|
||||||
plat->changed_objects(objs_idx);
|
plat->changed_objects(objs_idx);
|
||||||
//if (plat->printer_technology() == ptFFF)
|
//if (plat->printer_technology() == ptFFF)
|
||||||
//plat->fff_print().full_print_config().apply(plat->config());
|
//plat->fff_print().full_print_config().apply(plat->config());
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "libslic3r/CustomGCode.hpp"
|
#include "libslic3r/CustomGCode.hpp"
|
||||||
#include "libslic3r/Model.hpp"
|
#include "libslic3r/Model.hpp"
|
||||||
#include "libslic3r/AppConfig.hpp"
|
#include "libslic3r/AppConfig.hpp"
|
||||||
|
#include "GLCanvas3D.hpp"
|
||||||
#include "GUI.hpp"
|
#include "GUI.hpp"
|
||||||
#include "GUI_ObjectList.hpp"
|
#include "GUI_ObjectList.hpp"
|
||||||
#include "Plater.hpp"
|
#include "Plater.hpp"
|
||||||
@ -59,6 +60,7 @@ void CalibrationTempDialog::create_geometry(wxCommandEvent& event_args) {
|
|||||||
if (!plat->new_project(L("Temperature calibration")))
|
if (!plat->new_project(L("Temperature calibration")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
GLCanvas3D::set_warning_freeze(true);
|
||||||
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{
|
std::vector<size_t> objs_idx = plat->load_files(std::vector<std::string>{
|
||||||
Slic3r::resources_dir()+"/calibration/filament_temp/Smart_compact_temperature_calibration_item.amf"}, true, false, false);
|
Slic3r::resources_dir()+"/calibration/filament_temp/Smart_compact_temperature_calibration_item.amf"}, true, false, false);
|
||||||
|
|
||||||
@ -165,6 +167,7 @@ void CalibrationTempDialog::create_geometry(wxCommandEvent& event_args) {
|
|||||||
model.objects[objs_idx[0]]->config.set_key_value("top_fill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinearWGapFill));
|
model.objects[objs_idx[0]]->config.set_key_value("top_fill_pattern", new ConfigOptionEnum<InfillPattern>(ipRectilinearWGapFill));
|
||||||
|
|
||||||
//update plater
|
//update plater
|
||||||
|
GLCanvas3D::set_warning_freeze(false);
|
||||||
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
this->gui_app->get_tab(Preset::TYPE_PRINT)->load_config(new_print_config);
|
||||||
plat->on_config_change(new_print_config);
|
plat->on_config_change(new_print_config);
|
||||||
//this->gui_app->get_tab(Preset::TYPE_PRINTER)->load_config(new_printer_config);
|
//this->gui_app->get_tab(Preset::TYPE_PRINTER)->load_config(new_printer_config);
|
||||||
|
@ -627,6 +627,9 @@ GLCanvas3D::WarningTexture::WarningTexture()
|
|||||||
|
|
||||||
void GLCanvas3D::WarningTexture::activate(WarningTexture::Warning warning, bool state, const GLCanvas3D& canvas, std::string str_override)
|
void GLCanvas3D::WarningTexture::activate(WarningTexture::Warning warning, bool state, const GLCanvas3D& canvas, std::string str_override)
|
||||||
{
|
{
|
||||||
|
if (m_freeze)
|
||||||
|
return;
|
||||||
|
|
||||||
// Since we have NotificationsManager.hpp the warning textures are no loger needed.
|
// Since we have NotificationsManager.hpp the warning textures are no loger needed.
|
||||||
// However i have left the infrastructure here and only commented the rendering.
|
// However i have left the infrastructure here and only commented the rendering.
|
||||||
// The plater warning / error notifications are added and closed from here.
|
// The plater warning / error notifications are added and closed from here.
|
||||||
|
@ -323,6 +323,7 @@ class GLCanvas3D
|
|||||||
// function used to get an information for rescaling of the warning
|
// function used to get an information for rescaling of the warning
|
||||||
void msw_rescale(const GLCanvas3D& canvas);
|
void msw_rescale(const GLCanvas3D& canvas);
|
||||||
|
|
||||||
|
inline static bool m_freeze = false;
|
||||||
private:
|
private:
|
||||||
static const unsigned char Background_Color[3];
|
static const unsigned char Background_Color[3];
|
||||||
static const unsigned char Opacity;
|
static const unsigned char Opacity;
|
||||||
@ -432,6 +433,8 @@ public:
|
|||||||
bool enable_rotation = false;
|
bool enable_rotation = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void set_warning_freeze(bool freeze) { WarningTexture::m_freeze = freeze; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxGLCanvas* m_canvas;
|
wxGLCanvas* m_canvas;
|
||||||
wxGLContext* m_context;
|
wxGLContext* m_context;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user