Fixed conflicts after merge with master
This commit is contained in:
commit
c242f31353
119 changed files with 2603 additions and 2317 deletions
src/libslic3r/GCode
|
@ -354,7 +354,7 @@ void GCodeProcessor::TimeProcessor::reset()
|
|||
machines[static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Normal)].enabled = true;
|
||||
}
|
||||
|
||||
void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, std::vector<MoveVertex>& moves, std::vector<size_t>& lines_ends)
|
||||
void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, std::vector<GCodeProcessorResult::MoveVertex>& moves, std::vector<size_t>& lines_ends)
|
||||
{
|
||||
FilePtr in{ boost::nowide::fopen(filename.c_str(), "rb") };
|
||||
if (in.f == nullptr)
|
||||
|
@ -647,7 +647,7 @@ void GCodeProcessor::TimeProcessor::post_process(const std::string& filename, st
|
|||
// updates moves' gcode ids which have been modified by the insertion of the M73 lines
|
||||
unsigned int curr_offset_id = 0;
|
||||
unsigned int total_offset = 0;
|
||||
for (MoveVertex& move : moves) {
|
||||
for (GCodeProcessorResult::MoveVertex& move : moves) {
|
||||
while (curr_offset_id < static_cast<unsigned int>(offsets.size()) && offsets[curr_offset_id].first <= move.gcode_id) {
|
||||
total_offset += offsets[curr_offset_id].second;
|
||||
++curr_offset_id;
|
||||
|
@ -727,12 +727,10 @@ void GCodeProcessor::UsedFilaments::process_caches(GCodeProcessor* processor)
|
|||
}
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_STATISTICS
|
||||
void GCodeProcessor::Result::reset() {
|
||||
moves = std::vector<GCodeProcessor::MoveVertex>();
|
||||
void GCodeProcessorResult::reset() {
|
||||
moves = std::vector<GCodeProcessorResult::MoveVertex>();
|
||||
bed_shape = Pointfs();
|
||||
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
max_print_height = 0.0f;
|
||||
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
settings_ids.reset();
|
||||
extruders_count = 0;
|
||||
extruder_colors = std::vector<std::string>();
|
||||
|
@ -742,14 +740,12 @@ void GCodeProcessor::Result::reset() {
|
|||
time = 0;
|
||||
}
|
||||
#else
|
||||
void GCodeProcessor::Result::reset() {
|
||||
void GCodeProcessorResult::reset() {
|
||||
|
||||
moves.clear();
|
||||
lines_ends.clear();
|
||||
bed_shape = Pointfs();
|
||||
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
max_print_height = 0.0f;
|
||||
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
settings_ids.reset();
|
||||
extruders_count = 0;
|
||||
extruder_colors = std::vector<std::string>();
|
||||
|
@ -900,9 +896,7 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
|
|||
if (first_layer_height != nullptr)
|
||||
m_first_layer_height = std::abs(first_layer_height->value);
|
||||
|
||||
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
m_result.max_print_height = config.max_print_height;
|
||||
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
}
|
||||
|
||||
void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
||||
|
@ -1133,11 +1127,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||
if (first_layer_height != nullptr)
|
||||
m_first_layer_height = std::abs(first_layer_height->value);
|
||||
|
||||
#if ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
const ConfigOptionFloat* max_print_height = config.option<ConfigOptionFloat>("max_print_height");
|
||||
if (max_print_height != nullptr)
|
||||
m_result.max_print_height = max_print_height->value;
|
||||
#endif // ENABLE_OUT_OF_BED_DETECTION_IMPROVEMENTS
|
||||
}
|
||||
|
||||
void GCodeProcessor::enable_stealth_time_estimator(bool enabled)
|
||||
|
@ -1267,7 +1259,7 @@ void GCodeProcessor::process_file(const std::string& filename, std::function<voi
|
|||
m_result.filename = filename;
|
||||
m_result.id = ++s_result_id;
|
||||
// 1st move must be a dummy move
|
||||
m_result.moves.emplace_back(MoveVertex());
|
||||
m_result.moves.emplace_back(GCodeProcessorResult::MoveVertex());
|
||||
size_t parse_line_callback_cntr = 10000;
|
||||
m_parser.parse_file(filename, [this, cancel_callback, &parse_line_callback_cntr](GCodeReader& reader, const GCodeReader::GCodeLine& line) {
|
||||
if (-- parse_line_callback_cntr == 0) {
|
||||
|
@ -1295,7 +1287,7 @@ void GCodeProcessor::initialize(const std::string& filename)
|
|||
m_result.filename = filename;
|
||||
m_result.id = ++s_result_id;
|
||||
// 1st move must be a dummy move
|
||||
m_result.moves.emplace_back(MoveVertex());
|
||||
m_result.moves.emplace_back(GCodeProcessorResult::MoveVertex());
|
||||
}
|
||||
|
||||
void GCodeProcessor::process_buffer(const std::string &buffer)
|
||||
|
@ -1309,7 +1301,7 @@ void GCodeProcessor::process_buffer(const std::string &buffer)
|
|||
void GCodeProcessor::finalize(bool post_process)
|
||||
{
|
||||
// update width/height of wipe moves
|
||||
for (MoveVertex& move : m_result.moves) {
|
||||
for (GCodeProcessorResult::MoveVertex& move : m_result.moves) {
|
||||
if (move.type == EMoveType::Wipe) {
|
||||
move.width = Wipe_Width;
|
||||
move.height = Wipe_Height;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue