mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Editing of the custom GCodes like ColorChange and PausePrint
This commit is contained in:
parent
a4d30fc9bb
commit
629584e28f
17 changed files with 392 additions and 311 deletions
|
@ -188,7 +188,7 @@ namespace Slic3r {
|
|||
_calculate_time(0);
|
||||
|
||||
if (m_needs_custom_gcode_times && (m_custom_gcode_time_cache != 0.0f))
|
||||
m_custom_gcode_times.push_back({ cgtColorChange, m_custom_gcode_time_cache });
|
||||
m_custom_gcode_times.push_back({CustomGCode::ColorChange, m_custom_gcode_time_cache });
|
||||
|
||||
#if ENABLE_MOVE_STATS
|
||||
_log_moves_stats();
|
||||
|
@ -678,7 +678,7 @@ namespace Slic3r {
|
|||
return _get_time_minutes(get_time());
|
||||
}
|
||||
|
||||
std::vector<std::pair<CustomGcodeType, float>> GCodeTimeEstimator::get_custom_gcode_times() const
|
||||
std::vector<std::pair<CustomGCode::Type, float>> GCodeTimeEstimator::get_custom_gcode_times() const
|
||||
{
|
||||
return m_custom_gcode_times;
|
||||
}
|
||||
|
@ -722,9 +722,9 @@ namespace Slic3r {
|
|||
return ret;
|
||||
}
|
||||
|
||||
std::vector<std::pair<CustomGcodeType, std::string>> GCodeTimeEstimator::get_custom_gcode_times_dhm(bool include_remaining) const
|
||||
std::vector<std::pair<CustomGCode::Type, std::string>> GCodeTimeEstimator::get_custom_gcode_times_dhm(bool include_remaining) const
|
||||
{
|
||||
std::vector<std::pair<CustomGcodeType, std::string>> ret;
|
||||
std::vector<std::pair<CustomGCode::Type, std::string>> ret;
|
||||
|
||||
float total_time = 0.0f;
|
||||
for (auto t : m_custom_gcode_times)
|
||||
|
@ -1470,7 +1470,7 @@ namespace Slic3r {
|
|||
size_t pos = comment.find(Color_Change_Tag);
|
||||
if (pos != comment.npos)
|
||||
{
|
||||
_process_custom_gcode_tag(cgtColorChange);
|
||||
_process_custom_gcode_tag(CustomGCode::ColorChange);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1478,14 +1478,14 @@ namespace Slic3r {
|
|||
pos = comment.find(Pause_Print_Tag);
|
||||
if (pos != comment.npos)
|
||||
{
|
||||
_process_custom_gcode_tag(cgtPausePrint);
|
||||
_process_custom_gcode_tag(CustomGCode::PausePrint);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void GCodeTimeEstimator::_process_custom_gcode_tag(CustomGcodeType code)
|
||||
void GCodeTimeEstimator::_process_custom_gcode_tag(CustomGCode::Type code)
|
||||
{
|
||||
PROFILE_FUNC();
|
||||
m_needs_custom_gcode_times = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue