mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-01 07:12:07 +00:00
Revert "Fix Compile Warnings (#5963)"
This reverts commit b83e16dbdd.
Found regressions like auto orientation didn't work anymore after this change, revert it
This commit is contained in:
@@ -136,6 +136,7 @@ void ArrangeJob::prepare_selected() {
|
||||
inst_sel[size_t(inst_id)] = true;
|
||||
|
||||
for (size_t i = 0; i < inst_sel.size(); ++i) {
|
||||
ModelInstance* mi = mo->instances[i];
|
||||
ArrangePolygon&& ap = prepare_arrange_polygon(mo->instances[i]);
|
||||
//BBS: partplate_list preprocess
|
||||
//remove the locked plate's instances, neither in selected, nor in un-selected
|
||||
@@ -207,6 +208,7 @@ void ArrangeJob::prepare_all() {
|
||||
ModelObject *mo = model.objects[oidx];
|
||||
|
||||
for (size_t i = 0; i < mo->instances.size(); ++i) {
|
||||
ModelInstance * mi = mo->instances[i];
|
||||
ArrangePolygon&& ap = prepare_arrange_polygon(mo->instances[i]);
|
||||
//BBS: partplate_list preprocess
|
||||
//remove the locked plate's instances, neither in selected, nor in un-selected
|
||||
@@ -322,6 +324,7 @@ void ArrangeJob::prepare_wipe_tower()
|
||||
wipe_tower_ap.name = "WipeTower";
|
||||
wipe_tower_ap.is_virt_object = true;
|
||||
wipe_tower_ap.is_wipe_tower = true;
|
||||
const GLCanvas3D* canvas3D = static_cast<const GLCanvas3D*>(m_plater->canvas3D());
|
||||
|
||||
std::set<int> extruder_ids;
|
||||
PartPlateList& ppl = wxGetApp().plater()->get_partplate_list();
|
||||
@@ -527,6 +530,7 @@ void ArrangeJob::process(Ctl &ctl)
|
||||
auto & partplate_list = m_plater->get_partplate_list();
|
||||
|
||||
const Slic3r::DynamicPrintConfig& global_config = wxGetApp().preset_bundle->full_config();
|
||||
PresetBundle* preset_bundle = wxGetApp().preset_bundle;
|
||||
const bool is_bbl = wxGetApp().preset_bundle->is_bbl_vendor();
|
||||
if (is_bbl && params.avoid_extrusion_cali_region && global_config.opt_bool("scan_first_layer"))
|
||||
partplate_list.preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
|
||||
|
||||
@@ -127,8 +127,8 @@ void FillBedJob::prepare()
|
||||
|
||||
m_bedpts = get_bed_shape(*m_plater->config());
|
||||
|
||||
/*auto &objects = m_plater->model().objects;
|
||||
BoundingBox bedbb = get_extents(m_bedpts);
|
||||
auto &objects = m_plater->model().objects;
|
||||
/*BoundingBox bedbb = get_extents(m_bedpts);
|
||||
|
||||
for (size_t idx = 0; idx < objects.size(); ++idx)
|
||||
if (int(idx) != m_object_idx)
|
||||
@@ -209,7 +209,9 @@ void FillBedJob::process(Ctl &ctl)
|
||||
m_bedpts = get_shrink_bedpts(m_plater->config(), params);
|
||||
|
||||
auto &partplate_list = m_plater->get_partplate_list();
|
||||
auto &print = wxGetApp().plater()->get_partplate_list().get_current_fff_print();
|
||||
const Slic3r::DynamicPrintConfig& global_config = wxGetApp().preset_bundle->full_config();
|
||||
PresetBundle* preset_bundle = wxGetApp().preset_bundle;
|
||||
const bool is_bbl = wxGetApp().preset_bundle->is_bbl_vendor();
|
||||
if (is_bbl && params.avoid_extrusion_cali_region && global_config.opt_bool("scan_first_layer"))
|
||||
partplate_list.preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES);
|
||||
@@ -273,6 +275,8 @@ void FillBedJob::finalize(bool canceled, std::exception_ptr &eptr)
|
||||
int plate_cols = plate_list.get_plate_cols();
|
||||
int cur_plate = plate_list.get_curr_plate_index();
|
||||
|
||||
size_t inst_cnt = model_object->instances.size();
|
||||
|
||||
int added_cnt = std::accumulate(m_selected.begin(), m_selected.end(), 0, [](int s, auto &ap) {
|
||||
return s + int(ap.priority == 0 && ap.bed_idx == 0);
|
||||
});
|
||||
|
||||
@@ -46,6 +46,7 @@ void OrientJob::prepare_selection(std::vector<bool> obj_sel, bool only_one_plate
|
||||
ModelInstance* mi = mo->instances[inst_idx];
|
||||
OrientMesh&& om = get_orient_mesh(mi);
|
||||
|
||||
bool locked = false;
|
||||
if (!only_one_plate) {
|
||||
int plate_index = plate_list.find_instance(oidx, inst_idx);
|
||||
if ((plate_index >= 0)&&(plate_index < plate_list.get_plate_count())) {
|
||||
|
||||
@@ -103,6 +103,9 @@ wxString PrintJob::get_http_error_msg(unsigned int status, std::string body)
|
||||
if (!j["message"].is_null())
|
||||
message = j["message"].get<std::string>();
|
||||
}
|
||||
switch (status) {
|
||||
;
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
;
|
||||
@@ -134,6 +137,7 @@ void PrintJob::process(Ctl &ctl)
|
||||
wxString error_str;
|
||||
int curr_percent = 10;
|
||||
NetworkAgent* m_agent = wxGetApp().getAgent();
|
||||
AppConfig* config = wxGetApp().app_config;
|
||||
|
||||
if (this->connection_type == "lan") {
|
||||
msg = _u8L("Sending print job over LAN");
|
||||
@@ -146,9 +150,12 @@ void PrintJob::process(Ctl &ctl)
|
||||
ctl.call_on_main_thread([this] { prepare(); }).wait();
|
||||
|
||||
int result = -1;
|
||||
unsigned int http_code;
|
||||
std::string http_body;
|
||||
|
||||
int total_plate_num = plate_data.plate_count;
|
||||
if (!plate_data.is_valid) {
|
||||
total_plate_num = m_plater->get_partplate_list().get_plate_count();
|
||||
PartPlate *plate = m_plater->get_partplate_list().get_plate(job_data.plate_idx);
|
||||
if (plate == nullptr) {
|
||||
plate = m_plater->get_partplate_list().get_curr_plate();
|
||||
@@ -305,7 +312,7 @@ void PrintJob::process(Ctl &ctl)
|
||||
try {
|
||||
stl_design_id = std::stoi(wxGetApp().model().stl_design_id);
|
||||
}
|
||||
catch (std::exception&) {
|
||||
catch (const std::exception& e) {
|
||||
stl_design_id = 0;
|
||||
}
|
||||
params.stl_design_id = stl_design_id;
|
||||
@@ -440,7 +447,7 @@ void PrintJob::process(Ctl &ctl)
|
||||
std::string curr_job_id;
|
||||
json job_info_j;
|
||||
try {
|
||||
job_info_j = json::parse(job_info);
|
||||
job_info_j.parse(job_info);
|
||||
if (job_info_j.contains("job_id")) {
|
||||
curr_job_id = job_info_j["job_id"].get<std::string>();
|
||||
}
|
||||
|
||||
@@ -57,7 +57,8 @@ void RotoptimizeJob::process(Ctl &ctl)
|
||||
.print_config(&m_default_print_cfg)
|
||||
.statucb([this, &prev_status, &ctl/*, &statustxt*/](int s)
|
||||
{
|
||||
// if (s > 0 && s < 100)
|
||||
if (s > 0 && s < 100)
|
||||
;
|
||||
// ctl.update_status(prev_status + s / m_selected_object_ids.size(),
|
||||
// statustxt);
|
||||
|
||||
|
||||
@@ -67,6 +67,9 @@ wxString SendJob::get_http_error_msg(unsigned int status, std::string body)
|
||||
if (!j["message"].is_null())
|
||||
message = j["message"].get<std::string>();
|
||||
}
|
||||
switch (status) {
|
||||
;
|
||||
}
|
||||
}
|
||||
catch (...) {
|
||||
;
|
||||
@@ -106,7 +109,9 @@ void SendJob::process(Ctl &ctl)
|
||||
std::string msg;
|
||||
int curr_percent = 10;
|
||||
NetworkAgent* m_agent = wxGetApp().getAgent();
|
||||
AppConfig* config = wxGetApp().app_config;
|
||||
int result = -1;
|
||||
unsigned int http_code;
|
||||
std::string http_body;
|
||||
|
||||
if (this->connection_type == "lan") {
|
||||
|
||||
Reference in New Issue
Block a user