mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-14 23:15:54 +08:00
Fixed regression in placement of Color Change event at the correct layer.
This commit is contained in:
parent
10d1b459bb
commit
2c958c021d
@ -484,7 +484,7 @@ void ToolOrdering::assign_custom_gcodes(const Print &print)
|
|||||||
coordf_t print_z_below = 0.;
|
coordf_t print_z_below = 0.;
|
||||||
if (auto it_lt_below = it_lt; ++ it_lt_below != m_layer_tools.rend())
|
if (auto it_lt_below = it_lt; ++ it_lt_below != m_layer_tools.rend())
|
||||||
print_z_below = it_lt_below->print_z;
|
print_z_below = it_lt_below->print_z;
|
||||||
if (custom_gcode.print_z > print_z_below - EPSILON) {
|
if (custom_gcode.print_z > print_z_below + 0.5 * EPSILON) {
|
||||||
// The custom G-code applies to the current layer.
|
// The custom G-code applies to the current layer.
|
||||||
if (custom_gcode.gcode != ColorChangeCode || extruder_printing_above[unsigned(custom_gcode.extruder - 1)])
|
if (custom_gcode.gcode != ColorChangeCode || extruder_printing_above[unsigned(custom_gcode.extruder - 1)])
|
||||||
// If it is color change, it will actually be useful as the exturder above will print.
|
// If it is color change, it will actually be useful as the exturder above will print.
|
||||||
|
@ -95,14 +95,6 @@ void BackgroundSlicingProcess::process_fff()
|
|||||||
m_fff_print->export_gcode(m_temp_output_path, m_gcode_preview_data);
|
m_fff_print->export_gcode(m_temp_output_path, m_gcode_preview_data);
|
||||||
#endif // ENABLE_THUMBNAIL_GENERATOR
|
#endif // ENABLE_THUMBNAIL_GENERATOR
|
||||||
|
|
||||||
/* #ys_FIXME_no_exported_codes
|
|
||||||
if (m_fff_print->model().custom_gcode_per_print_z != GUI::wxGetApp().model().custom_gcode_per_print_z) {
|
|
||||||
GUI::wxGetApp().model().custom_gcode_per_print_z = m_fff_print->model().custom_gcode_per_print_z;
|
|
||||||
GUI::show_info(nullptr, _(L("To except of redundant tool manipulation, \n"
|
|
||||||
"Color change(s) for unused extruder(s) was(were) deleted")), _(L("Info")));
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (this->set_step_started(bspsGCodeFinalize)) {
|
if (this->set_step_started(bspsGCodeFinalize)) {
|
||||||
if (! m_export_path.empty()) {
|
if (! m_export_path.empty()) {
|
||||||
//FIXME localize the messages
|
//FIXME localize the messages
|
||||||
|
Loading…
x
Reference in New Issue
Block a user