FIX: the nums of filament_type in plater config is incorrect
2. Improve the judgment and display of the extruder printing area jira: none Change-Id: Ie9e1991904bfbc5bffceedb7810b1d1fa598933b
This commit is contained in:
parent
0f6d691597
commit
ca5ec101f9
|
@ -152,8 +152,8 @@ BuildVolume::BuildVolume(const std::vector<Vec2d> &printable_area, const double
|
||||||
}
|
}
|
||||||
//always ignore z
|
//always ignore z
|
||||||
extruder_volume.bboxf.min.z() = -std::numeric_limits<double>::max();
|
extruder_volume.bboxf.min.z() = -std::numeric_limits<double>::max();
|
||||||
m_extruder_volumes.push_back(std::move(extruder_volume));
|
|
||||||
}
|
}
|
||||||
|
m_extruder_volumes.push_back(std::move(extruder_volume));
|
||||||
|
|
||||||
if (m_shared_volume.data[0] < extruder_volume.bboxf.min.x())
|
if (m_shared_volume.data[0] < extruder_volume.bboxf.min.x())
|
||||||
m_shared_volume.data[0] = extruder_volume.bboxf.min.x();
|
m_shared_volume.data[0] = extruder_volume.bboxf.min.x();
|
||||||
|
|
|
@ -149,6 +149,12 @@ std::string& get_right_extruder_unprintable_text() {
|
||||||
return right_unprintable_text;
|
return right_unprintable_text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::string format_number(float value)
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
oss << std::fixed << std::setprecision((static_cast<int>(value * 10) % 10 == 0) ? 0 : 1) << value;
|
||||||
|
return oss.str();
|
||||||
|
}
|
||||||
|
|
||||||
wxString filament_printable_error_msg;
|
wxString filament_printable_error_msg;
|
||||||
|
|
||||||
|
@ -1516,9 +1522,13 @@ static std::pair<bool, bool> construct_extruder_unprintable_error(ObjectFilament
|
||||||
|
|
||||||
tips[idx] += (boost::format(_u8L(" Please check and adjust the part's position or size to fit the printable range:\n"))).str();
|
tips[idx] += (boost::format(_u8L(" Please check and adjust the part's position or size to fit the printable range:\n"))).str();
|
||||||
if (idx == 0)
|
if (idx == 0)
|
||||||
tips[idx] += (boost::format(_u8L("Left nozzle: X:%.0f-%.0f, Y:%.0f-%.0f, Z:%.0f-%.0f\n"))%left_x_min %left_x_max %left_y_min %left_y_max %left_z_min %left_z_max).str();
|
tips[idx] += (boost::format(_u8L("Left nozzle: X:%1%-%2%, Y:%3%-%4%, Z:%5%-%6%\n"))
|
||||||
|
% format_number(left_x_min) % format_number(left_x_max) % format_number(left_y_min)
|
||||||
|
% format_number(left_y_max) % format_number(left_z_min) % format_number(left_z_max)).str();
|
||||||
else
|
else
|
||||||
tips[idx] += (boost::format(_u8L("Right nozzle: X:%.0f-%.0f, Y:%.0f-%.0f, Z:%.0f-%.0f"))%right_x_min %right_x_max %right_y_min %right_y_max %right_z_min %right_z_max).str();
|
tips[idx] += (boost::format(_u8L("Right nozzle: X:%1%-%2%, Y:%3%-%4%, Z:%5%-%6%"))
|
||||||
|
%format_number(right_x_min) %format_number(right_x_max) %format_number(right_y_min)
|
||||||
|
%format_number(right_y_max) %format_number(right_z_min) %format_number(right_z_max)).str();
|
||||||
output_text = tips[idx];
|
output_text = tips[idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14989,7 +14989,11 @@ void Plater::on_config_change(const DynamicPrintConfig &config)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (opt_key == "material_colour" || opt_key == "filament_type") {
|
if (opt_key == "filament_type") {
|
||||||
|
update_filament_colors_in_full_config();
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (opt_key == "material_colour") {
|
||||||
update_scheduled = true; // update should be scheduled (for update 3DScene)
|
update_scheduled = true; // update should be scheduled (for update 3DScene)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue