mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
ENH: show travel time in gcode viewer
Seperate travel time from extrusion role time and show it seperately. Signed-off-by: salt.wei <salt.wei@bambulab.com> Change-Id: Icf0aaf63c4d4ed7d1407037e5ae051d61938f973
This commit is contained in:
@@ -49,6 +49,7 @@ namespace Slic3r {
|
||||
struct Mode
|
||||
{
|
||||
float time;
|
||||
float prepare_time;
|
||||
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> custom_gcode_times;
|
||||
std::vector<std::pair<EMoveType, float>> moves_times;
|
||||
std::vector<std::pair<ExtrusionRole, float>> roles_times;
|
||||
@@ -56,6 +57,7 @@ namespace Slic3r {
|
||||
|
||||
void reset() {
|
||||
time = 0.0f;
|
||||
prepare_time = 0.0f;
|
||||
custom_gcode_times.clear();
|
||||
moves_times.clear();
|
||||
roles_times.clear();
|
||||
@@ -298,6 +300,7 @@ namespace Slic3r {
|
||||
{
|
||||
bool recalculate{ false };
|
||||
bool nominal_length{ false };
|
||||
bool prepare_stage{ false };
|
||||
};
|
||||
|
||||
EMoveType move_type{ EMoveType::Noop };
|
||||
@@ -381,6 +384,8 @@ namespace Slic3r {
|
||||
std::array<float, static_cast<size_t>(EMoveType::Count)> moves_time;
|
||||
std::array<float, static_cast<size_t>(ExtrusionRole::erCount)> roles_time;
|
||||
std::vector<float> layers_time;
|
||||
//BBS: prepare stage time before print model, including start gcode time and mostly same with start gcode time
|
||||
float prepare_time;
|
||||
|
||||
void reset();
|
||||
|
||||
@@ -681,6 +686,7 @@ namespace Slic3r {
|
||||
void finalize(bool post_process);
|
||||
|
||||
float get_time(PrintEstimatedStatistics::ETimeMode mode) const;
|
||||
float get_prepare_time(PrintEstimatedStatistics::ETimeMode mode) const;
|
||||
std::string get_time_dhm(PrintEstimatedStatistics::ETimeMode mode) const;
|
||||
std::vector<std::pair<CustomGCode::Type, std::pair<float, float>>> get_custom_gcode_times(PrintEstimatedStatistics::ETimeMode mode, bool include_remaining) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user