mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-12 02:09:03 +08:00
Merge remote-tracking branch 'remotes/prusa/stable' into master_slic3rPE_PR
This commit is contained in:
commit
b9b8be9827
@ -643,7 +643,8 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::tool_change(unsigned int tool, boo
|
|||||||
"\n\n");
|
"\n\n");
|
||||||
|
|
||||||
// Ask our writer about how much material was consumed:
|
// Ask our writer about how much material was consumed:
|
||||||
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
if (m_current_tool < m_used_filament_length.size())
|
||||||
|
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
||||||
|
|
||||||
ToolChangeResult result;
|
ToolChangeResult result;
|
||||||
result.priming = false;
|
result.priming = false;
|
||||||
@ -1068,8 +1069,9 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::finish_layer()
|
|||||||
|
|
||||||
m_depth_traversed = m_wipe_tower_depth-m_perimeter_width;
|
m_depth_traversed = m_wipe_tower_depth-m_perimeter_width;
|
||||||
|
|
||||||
// Ask our writer about how much material was consumed:
|
// Ask our writer about how much material was consumed.
|
||||||
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
if (m_current_tool < m_used_filament_length.size())
|
||||||
|
m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length();
|
||||||
|
|
||||||
ToolChangeResult result;
|
ToolChangeResult result;
|
||||||
result.priming = false;
|
result.priming = false;
|
||||||
@ -1166,7 +1168,6 @@ void WipeTowerPrusaMM::save_on_last_wipe()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Processes vector m_plan and calls respective functions to generate G-code for the wipe tower
|
// Processes vector m_plan and calls respective functions to generate G-code for the wipe tower
|
||||||
// Resulting ToolChangeResults are appended into vector "result"
|
// Resulting ToolChangeResults are appended into vector "result"
|
||||||
void WipeTowerPrusaMM::generate(std::vector<std::vector<WipeTower::ToolChangeResult>> &result)
|
void WipeTowerPrusaMM::generate(std::vector<std::vector<WipeTower::ToolChangeResult>> &result)
|
||||||
@ -1256,6 +1257,4 @@ void WipeTowerPrusaMM::make_wipe_tower_square()
|
|||||||
lay.extra_spacing = lay.depth / lay.toolchanges_depth();
|
lay.extra_spacing = lay.depth / lay.toolchanges_depth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}; // namespace Slic3r
|
}; // namespace Slic3r
|
||||||
|
@ -455,10 +455,14 @@ void Model::adjust_min_z()
|
|||||||
unsigned int Model::get_auto_extruder_id(unsigned int max_extruders)
|
unsigned int Model::get_auto_extruder_id(unsigned int max_extruders)
|
||||||
{
|
{
|
||||||
unsigned int id = s_auto_extruder_id;
|
unsigned int id = s_auto_extruder_id;
|
||||||
|
if (id > max_extruders) {
|
||||||
if (++s_auto_extruder_id > max_extruders)
|
// The current counter is invalid, likely due to switching the printer profiles
|
||||||
|
// to a profile with a lower number of extruders.
|
||||||
reset_auto_extruder_id();
|
reset_auto_extruder_id();
|
||||||
|
id = s_auto_extruder_id;
|
||||||
|
} else if (++s_auto_extruder_id > max_extruders) {
|
||||||
|
reset_auto_extruder_id();
|
||||||
|
}
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
|
|
||||||
#define SLIC3R_FORK_NAME "Slic3r Prusa Edition"
|
#define SLIC3R_FORK_NAME "Slic3r Prusa Edition"
|
||||||
#define SLIC3R_VERSION "1.41.1"
|
#define SLIC3R_VERSION "1.41.2-beta"
|
||||||
#define SLIC3R_BUILD "UNKNOWN"
|
#define SLIC3R_BUILD "UNKNOWN"
|
||||||
|
|
||||||
typedef int32_t coord_t;
|
typedef int32_t coord_t;
|
||||||
|
@ -3436,8 +3436,14 @@ void GLCanvas3D::_refresh_if_shown_on_screen()
|
|||||||
{
|
{
|
||||||
const Size& cnv_size = get_canvas_size();
|
const Size& cnv_size = get_canvas_size();
|
||||||
_resize((unsigned int)cnv_size.get_width(), (unsigned int)cnv_size.get_height());
|
_resize((unsigned int)cnv_size.get_width(), (unsigned int)cnv_size.get_height());
|
||||||
if (m_canvas != nullptr)
|
|
||||||
m_canvas->Refresh();
|
// Because of performance problems on macOS, where PaintEvents are not delivered
|
||||||
|
// frequently enough, we call render() here directly when we can.
|
||||||
|
// We can't do that when m_force_zoom_to_bed_enabled == true, because then render()
|
||||||
|
// ends up calling back here via _force_zoom_to_bed(), causing a stack overflow.
|
||||||
|
if (m_canvas != nullptr) {
|
||||||
|
m_force_zoom_to_bed_enabled ? m_canvas->Refresh() : render();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user