mirror of
https://github.com/QIDITECH/QIDIStudio.git
synced 2026-02-02 09:58:41 +03:00
update slic3r
This commit is contained in:
@@ -230,11 +230,16 @@ void FillBedJob::process()
|
||||
|
||||
if (m_selected.size() > 100){
|
||||
// too many items, just find grid empty cells to put them
|
||||
Vec2f step = unscaled<float>(get_extents(m_selected.front().poly).size()) + Vec2f(m_selected.front().brim_width, m_selected.front().brim_width);
|
||||
Vec2f step = unscaled<float>(get_extents(m_selected.front().poly).size()) + 2 * Vec2f(m_selected.front().brim_width, m_selected.front().brim_width);
|
||||
|
||||
// calc the polygon position offset based on origin, in order to normalize the initial position of the arrange polygon
|
||||
auto offset_on_origin = m_selected.front().poly.contour.bounding_box().center();
|
||||
|
||||
std::vector<Vec2f> empty_cells = Plater::get_empty_cells(step);
|
||||
size_t n=std::min(m_selected.size(), empty_cells.size());
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
m_selected[i].translation = scaled<coord_t>(empty_cells[i]);
|
||||
m_selected[i].translation -= offset_on_origin;
|
||||
m_selected[i].bed_idx= 0;
|
||||
}
|
||||
for (size_t i = n; i < m_selected.size(); i++) {
|
||||
|
||||
@@ -528,8 +528,11 @@ void PrintJob::process()
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
if (params.connection_type != "lan") {
|
||||
if (m_print_type == "from_sdcard_view") {
|
||||
BOOST_LOG_TRIVIAL(info) << "print_job: try to send with cloud, model is sdcard view";
|
||||
this->update_status(curr_percent, _L("Sending print job through cloud service"));
|
||||
result = m_agent->start_sdcard_print(params, update_fn, cancel_fn);
|
||||
} else if (params.connection_type != "lan") {
|
||||
if (params.dev_ip.empty())
|
||||
params.comments = "no_ip";
|
||||
else if (this->cloud_print_only)
|
||||
@@ -541,12 +544,7 @@ void PrintJob::process()
|
||||
|
||||
|
||||
//use ftp only
|
||||
if (m_print_type == "from_sdcard_view") {
|
||||
BOOST_LOG_TRIVIAL(info) << "print_job: try to send with cloud, model is sdcard view";
|
||||
this->update_status(curr_percent, _L("Sending print job through cloud service"));
|
||||
result = m_agent->start_sdcard_print(params, update_fn, cancel_fn);
|
||||
}
|
||||
else if (!wxGetApp().app_config->get("lan_mode_only").empty() && wxGetApp().app_config->get("lan_mode_only") == "1") {
|
||||
if (!wxGetApp().app_config->get("lan_mode_only").empty() && wxGetApp().app_config->get("lan_mode_only") == "1") {
|
||||
|
||||
if (params.password.empty() || params.dev_ip.empty()) {
|
||||
error_text = wxString::Format("Access code:%s Ip address:%s", params.password, params.dev_ip);
|
||||
|
||||
@@ -206,8 +206,15 @@ void SendJob::process()
|
||||
params.dev_id = m_dev_id;
|
||||
params.project_name = m_project_name + ".gcode.3mf";
|
||||
params.preset_name = wxGetApp().preset_bundle->prints.get_selected_preset_name();
|
||||
params.filename = job_data._3mf_path.string();
|
||||
|
||||
if (wxGetApp().plater()->using_exported_file())
|
||||
params.filename = wxGetApp().plater()->get_3mf_filename();
|
||||
else
|
||||
params.filename = job_data._3mf_path.string();
|
||||
|
||||
|
||||
params.config_filename = job_data._3mf_config_path.string();
|
||||
|
||||
params.plate_index = curr_plate_idx;
|
||||
params.ams_mapping = this->task_ams_mapping;
|
||||
params.connection_type = this->connection_type;
|
||||
|
||||
Reference in New Issue
Block a user