mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Refactoring to allow to quickly build the various options to show the estimated printing time in gcode viewer scene
This commit is contained in:
parent
510e787bc7
commit
8fc5be7e4f
15 changed files with 125 additions and 174 deletions
|
@ -17,8 +17,8 @@
|
|||
#include "GCode/GCodeProcessor.hpp"
|
||||
#else
|
||||
#include "GCode/Analyzer.hpp"
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
#include "GCodeTimeEstimator.hpp"
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
#include "EdgeGrid.hpp"
|
||||
#include "GCode/ThumbnailData.hpp"
|
||||
|
||||
|
@ -179,8 +179,10 @@ public:
|
|||
#endif // !ENABLE_GCODE_VIEWER
|
||||
m_brim_done(false),
|
||||
m_second_layer_things_done(false),
|
||||
#if !ENABLE_GCODE_VIEWER
|
||||
m_normal_time_estimator(GCodeTimeEstimator::Normal),
|
||||
m_silent_time_estimator(GCodeTimeEstimator::Silent),
|
||||
#endif // !ENABLE_GCODE_VIEWER
|
||||
m_silent_time_estimator_enabled(false),
|
||||
m_last_obj_copy(nullptr, Point(std::numeric_limits<coord_t>::max(), std::numeric_limits<coord_t>::max()))
|
||||
{}
|
||||
|
@ -405,9 +407,11 @@ private:
|
|||
// Index of a last object copy extruded.
|
||||
std::pair<const PrintObject*, Point> m_last_obj_copy;
|
||||
|
||||
#if !ENABLE_GCODE_VIEWER
|
||||
// Time estimators
|
||||
GCodeTimeEstimator m_normal_time_estimator;
|
||||
GCodeTimeEstimator m_silent_time_estimator;
|
||||
#endif // !ENABLE_GCODE_VIEWER
|
||||
bool m_silent_time_estimator_enabled;
|
||||
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue