Fixed conflicts after merge with master
This commit is contained in:
commit
18cb91a982
53 changed files with 741 additions and 839 deletions
src/libslic3r/GCode
|
@ -759,9 +759,7 @@ const std::vector<std::pair<GCodeProcessor::EProducer, std::string>> GCodeProces
|
|||
{ EProducer::PrusaSlicer, "generated by PrusaSlicer" },
|
||||
{ EProducer::Slic3rPE, "generated by Slic3r Prusa Edition" },
|
||||
{ EProducer::Slic3r, "generated by Slic3r" },
|
||||
#if ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
{ EProducer::SuperSlicer, "generated by SuperSlicer" },
|
||||
#endif // ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
{ EProducer::Cura, "Cura_SteamEngine" },
|
||||
{ EProducer::Simplify3D, "G-Code generated by Simplify3D(R)" },
|
||||
{ EProducer::CraftWare, "CraftWare" },
|
||||
|
@ -824,9 +822,7 @@ bool GCodeProcessor::contains_reserved_tags(const std::string& gcode, unsigned i
|
|||
}
|
||||
|
||||
GCodeProcessor::GCodeProcessor()
|
||||
#if ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
: m_options_z_corrector(m_result)
|
||||
#endif // ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
{
|
||||
reset();
|
||||
m_time_processor.machines[static_cast<size_t>(PrintEstimatedStatistics::ETimeMode::Normal)].line_m73_main_mask = "M73 P%s R%s\n";
|
||||
|
@ -1190,9 +1186,7 @@ void GCodeProcessor::reset()
|
|||
m_use_volumetric_e = false;
|
||||
m_last_default_color_id = 0;
|
||||
|
||||
#if ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
m_options_z_corrector.reset();
|
||||
#endif // ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||
m_mm3_per_mm_compare.reset();
|
||||
|
@ -1249,10 +1243,8 @@ void GCodeProcessor::process_file(const std::string& filename, std::function<voi
|
|||
}
|
||||
else if (m_producer == EProducer::Simplify3D)
|
||||
apply_config_simplify3d(filename);
|
||||
#if ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
else if (m_producer == EProducer::SuperSlicer)
|
||||
apply_config_superslicer(filename);
|
||||
#endif // ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
}
|
||||
|
||||
// process gcode
|
||||
|
@ -1398,7 +1390,6 @@ std::vector<std::pair<ExtrusionRole, float>> GCodeProcessor::get_roles_time(Prin
|
|||
return ret;
|
||||
}
|
||||
|
||||
#if ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
ConfigSubstitutions load_from_superslicer_gcode_file(const std::string& filename, DynamicPrintConfig& config, ForwardCompatibilitySubstitutionRule compatibility_rule)
|
||||
{
|
||||
// for reference, see: ConfigBase::load_from_gcode_file()
|
||||
|
@ -1431,7 +1422,6 @@ void GCodeProcessor::apply_config_superslicer(const std::string& filename)
|
|||
load_from_superslicer_gcode_file(filename, config, ForwardCompatibilitySubstitutionRule::EnableSilent);
|
||||
apply_config(config);
|
||||
}
|
||||
#endif // ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
|
||||
std::vector<float> GCodeProcessor::get_layers_time(PrintEstimatedStatistics::ETimeMode mode) const
|
||||
{
|
||||
|
@ -1868,9 +1858,7 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
|
|||
store_move_vertex(EMoveType::Color_change);
|
||||
CustomGCode::Item item = { static_cast<double>(m_end_position[2]), CustomGCode::ColorChange, extruder_id + 1, color, "" };
|
||||
m_result.custom_gcode_per_print_z.emplace_back(item);
|
||||
#if ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
m_options_z_corrector.set();
|
||||
#endif // ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
process_custom_gcode_time(CustomGCode::ColorChange);
|
||||
process_filaments(CustomGCode::ColorChange);
|
||||
}
|
||||
|
@ -1883,9 +1871,7 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
|
|||
store_move_vertex(EMoveType::Pause_Print);
|
||||
CustomGCode::Item item = { static_cast<double>(m_end_position[2]), CustomGCode::PausePrint, m_extruder_id + 1, "", "" };
|
||||
m_result.custom_gcode_per_print_z.emplace_back(item);
|
||||
#if ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
m_options_z_corrector.set();
|
||||
#endif // ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
process_custom_gcode_time(CustomGCode::PausePrint);
|
||||
return;
|
||||
}
|
||||
|
@ -1895,9 +1881,7 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers
|
|||
store_move_vertex(EMoveType::Custom_GCode);
|
||||
CustomGCode::Item item = { static_cast<double>(m_end_position[2]), CustomGCode::Custom, m_extruder_id + 1, "", "" };
|
||||
m_result.custom_gcode_per_print_z.emplace_back(item);
|
||||
#if ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
m_options_z_corrector.set();
|
||||
#endif // ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1923,9 +1907,7 @@ bool GCodeProcessor::process_producers_tags(const std::string_view comment)
|
|||
{
|
||||
case EProducer::Slic3rPE:
|
||||
case EProducer::Slic3r:
|
||||
#if ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
case EProducer::SuperSlicer:
|
||||
#endif // ENABLE_FIX_SUPERSLICER_GCODE_IMPORT
|
||||
case EProducer::PrusaSlicer: { return process_prusaslicer_tags(comment); }
|
||||
case EProducer::Cura: { return process_cura_tags(comment); }
|
||||
case EProducer::Simplify3D: { return process_simplify3d_tags(comment); }
|
||||
|
@ -2478,12 +2460,8 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
|
|||
if (m_forced_height > 0.0f)
|
||||
m_height = m_forced_height;
|
||||
else {
|
||||
if (m_end_position[Z] > m_extruded_last_z + EPSILON) {
|
||||
if (m_end_position[Z] > m_extruded_last_z + EPSILON)
|
||||
m_height = m_end_position[Z] - m_extruded_last_z;
|
||||
#if !ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
m_extruded_last_z = m_end_position[Z];
|
||||
#endif // !ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
}
|
||||
}
|
||||
|
||||
if (m_height == 0.0f)
|
||||
|
@ -2492,10 +2470,8 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
|
|||
if (m_end_position[Z] == 0.0f)
|
||||
m_end_position[Z] = m_height;
|
||||
|
||||
#if ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
m_extruded_last_z = m_end_position[Z];
|
||||
m_options_z_corrector.update(m_height);
|
||||
#endif // ENABLE_FIX_PREVIEW_OPTIONS_Z
|
||||
|
||||
#if ENABLE_GCODE_VIEWER_DATA_CHECKING
|
||||
m_height_compare.update(m_height, m_extrusion_role);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue