mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-26 16:13:58 -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
|
@ -6,6 +6,8 @@
|
|||
#include "GCodeReader.hpp"
|
||||
#include "CustomGCode.hpp"
|
||||
|
||||
#if !ENABLE_GCODE_VIEWER
|
||||
|
||||
#define ENABLE_MOVE_STATS 0
|
||||
|
||||
namespace Slic3r {
|
||||
|
@ -370,13 +372,7 @@ namespace Slic3r {
|
|||
|
||||
// Returns the estimated time, in format DDd HHh MMm, for each custom_gcode
|
||||
// If include_remaining==true the strings will be formatted as: "time for custom_gcode (remaining time at color start)"
|
||||
#if ENABLE_GCODE_VIEWER
|
||||
#if ENABLE_GCODE_VIEWER_USE_OLD_TIME_ESTIMATOR
|
||||
std::vector<std::pair<CustomGCode::Type, std::pair<std::string, std::string>>> get_custom_gcode_times_dhm(bool include_remaining) const;
|
||||
#endif // ENABLE_GCODE_VIEWER_USE_OLD_TIME_ESTIMATOR
|
||||
#else
|
||||
std::vector<std::pair<CustomGCode::Type, std::string>> get_custom_gcode_times_dhm(bool include_remaining) const;
|
||||
#endif // ENABLE_GCODE_VIEWER
|
||||
|
||||
// Return an estimate of the memory consumed by the time estimator.
|
||||
size_t memory_used() const;
|
||||
|
@ -487,4 +483,6 @@ namespace Slic3r {
|
|||
|
||||
} /* namespace Slic3r */
|
||||
|
||||
#endif // !ENABLE_GCODE_VIEWER
|
||||
|
||||
#endif /* slic3r_GCodeTimeEstimator_hpp_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue