From 48481c10b4720d54e042c284670b1218c11ffdde Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 25 Feb 2021 16:29:18 +0100 Subject: [PATCH] Tech ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING set as default --- src/libslic3r/GCode/GCodeProcessor.cpp | 18 ------------------ src/libslic3r/GCode/GCodeProcessor.hpp | 2 -- src/libslic3r/Technologies.hpp | 10 +--------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index c4b2a3518..a4769af8e 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -705,10 +705,7 @@ void GCodeProcessor::apply_config(const PrintConfig& config) } m_time_processor.export_remaining_time_enabled = config.remaining_times.value; - -#if ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING m_use_volumetric_e = config.use_volumetric_e; -#endif // ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING } void GCodeProcessor::apply_config(const DynamicPrintConfig& config) @@ -870,11 +867,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config) if (m_time_processor.machine_limits.machine_max_acceleration_x.values.size() > 1) enable_stealth_time_estimator(true); -#if ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING const ConfigOptionBool* use_volumetric_e = config.option("use_volumetric_e"); if (use_volumetric_e != nullptr) m_use_volumetric_e = use_volumetric_e->value; -#endif // ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING } void GCodeProcessor::enable_stealth_time_estimator(bool enabled) @@ -930,9 +925,7 @@ void GCodeProcessor::reset() m_result.reset(); m_result.id = ++s_result_id; -#if ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING m_use_volumetric_e = false; -#endif // ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING #if ENABLE_GCODE_VIEWER_DATA_CHECKING m_mm3_per_mm_compare.reset(); @@ -1840,14 +1833,10 @@ void GCodeProcessor::process_G0(const GCodeReader::GCodeLine& line) void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) { -#if ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING float filament_diameter = (static_cast(m_extruder_id) < m_filament_diameters.size()) ? m_filament_diameters[m_extruder_id] : m_filament_diameters.back(); float filament_radius = 0.5f * filament_diameter; float area_filament_cross_section = static_cast(M_PI) * sqr(filament_radius); auto absolute_position = [this, area_filament_cross_section](Axis axis, const GCodeReader::GCodeLine& lineG1) { -#else - auto absolute_position = [this](Axis axis, const GCodeReader::GCodeLine& lineG1) { -#endif // ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING bool is_relative = (m_global_positioning_type == EPositioningType::Relative); if (axis == E) is_relative |= (m_e_local_positioning_type == EPositioningType::Relative); @@ -1855,10 +1844,8 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) if (lineG1.has(Slic3r::Axis(axis))) { float lengthsScaleFactor = (m_units == EUnits::Inches) ? INCHES_TO_MM : 1.0f; float ret = lineG1.value(Slic3r::Axis(axis)) * lengthsScaleFactor; -#if ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING if (axis == E && m_use_volumetric_e) ret /= area_filament_cross_section; -#endif // ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING return is_relative ? m_start_position[axis] + ret : m_origin[axis] + ret; } else @@ -1916,11 +1903,6 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) if (type == EMoveType::Extrude) { float delta_xyz = std::sqrt(sqr(delta_pos[X]) + sqr(delta_pos[Y]) + sqr(delta_pos[Z])); -#if !ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING - float filament_diameter = (static_cast(m_extruder_id) < m_filament_diameters.size()) ? m_filament_diameters[m_extruder_id] : m_filament_diameters.back(); - float filament_radius = 0.5f * filament_diameter; - float area_filament_cross_section = static_cast(M_PI) * sqr(filament_radius); -#endif // !ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING float volume_extruded_filament = area_filament_cross_section * delta_pos[E]; float area_toolpath_cross_section = volume_extruded_filament / delta_xyz; diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 05f9a2ce3..f884df8ec 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -473,9 +473,7 @@ namespace Slic3r { unsigned int m_g1_line_id; unsigned int m_layer_id; CpColor m_cp_color; -#if ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING bool m_use_volumetric_e; -#endif // ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING enum class EProducer { diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 0d4bd2303..3ada1cd35 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -49,22 +49,14 @@ #define ENABLE_CUSTOMIZABLE_FILES_ASSOCIATION_ON_WIN (1 && ENABLE_2_3_0_BETA1) -//================= -// 2.3.0.rc1 techs -//================= -#define ENABLE_2_3_0_RC1 1 - -#define ENABLE_VOLUMETRIC_EXTRUSION_PROCESSING (1 && ENABLE_2_3_0_RC1) - - //==================== // 2.3.1.alpha1 techs //==================== #define ENABLE_2_3_1_ALPHA1 1 #define ENABLE_SPLITTED_VERTEX_BUFFER (1 && ENABLE_2_3_1_ALPHA1) -#define ENABLE_RELOAD_FROM_DISK_FOR_3MF (1 && ENABLE_2_3_1_ALPHA1) #define ENABLE_REDUCED_TOOLPATHS_SEGMENT_CAPS (1 && ENABLE_SPLITTED_VERTEX_BUFFER) +#define ENABLE_RELOAD_FROM_DISK_FOR_3MF (1 && ENABLE_2_3_1_ALPHA1) #define ENABLE_WARNING_TEXTURE_REMOVAL (1 && ENABLE_2_3_1_ALPHA1) #define ENABLE_GCODE_LINES_ID_IN_H_SLIDER (1 && ENABLE_2_3_1_ALPHA1) #define ENABLE_VALIDATE_CUSTOM_GCODE (1 && ENABLE_2_3_1_ALPHA1)