From 59606a0ef6f50a0dfcaba1e0a10a247e5430d199 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Thu, 22 Jul 2021 12:32:08 +0200 Subject: [PATCH] Tech ENABLE_START_GCODE_VISUALIZATION set as default --- src/libslic3r/GCode/GCodeProcessor.cpp | 16 ---------------- src/libslic3r/GCode/GCodeProcessor.hpp | 2 -- src/libslic3r/Technologies.hpp | 2 -- src/slic3r/GUI/GCodeViewer.cpp | 4 ---- 4 files changed, 24 deletions(-) diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 273cdbf00..493621e5e 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -836,11 +836,9 @@ void GCodeProcessor::apply_config(const PrintConfig& config) m_time_processor.export_remaining_time_enabled = config.remaining_times.value; m_use_volumetric_e = config.use_volumetric_e; -#if ENABLE_START_GCODE_VISUALIZATION const ConfigOptionFloatOrPercent* first_layer_height = config.option("first_layer_height"); if (first_layer_height != nullptr) m_first_layer_height = std::abs(first_layer_height->value); -#endif // ENABLE_START_GCODE_VISUALIZATION } void GCodeProcessor::apply_config(const DynamicPrintConfig& config) @@ -1065,11 +1063,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config) if (use_volumetric_e != nullptr) m_use_volumetric_e = use_volumetric_e->value; -#if ENABLE_START_GCODE_VISUALIZATION const ConfigOptionFloatOrPercent* first_layer_height = config.option("first_layer_height"); if (first_layer_height != nullptr) m_first_layer_height = std::abs(first_layer_height->value); -#endif // ENABLE_START_GCODE_VISUALIZATION } void GCodeProcessor::enable_stealth_time_estimator(bool enabled) @@ -1115,10 +1111,8 @@ void GCodeProcessor::reset() } m_extruded_last_z = 0.0f; -#if ENABLE_START_GCODE_VISUALIZATION m_first_layer_height = 0.0f; m_processing_start_custom_gcode = false; -#endif // ENABLE_START_GCODE_VISUALIZATION m_g1_line_id = 0; m_layer_id = 0; m_cp_color.reset(); @@ -1497,9 +1491,7 @@ void GCodeProcessor::process_tags(const std::string_view comment) if (m_extrusion_role == erExternalPerimeter) m_seams_detector.activate(true); #endif // ENABLE_SEAMS_VISUALIZATION -#if ENABLE_START_GCODE_VISUALIZATION m_processing_start_custom_gcode = (m_extrusion_role == erCustom && m_g1_line_id == 0); -#endif // ENABLE_START_GCODE_VISUALIZATION return; } @@ -2187,11 +2179,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) #endif // ENABLE_GCODE_VIEWER_DATA_CHECKING } -#if ENABLE_START_GCODE_VISUALIZATION if (type == EMoveType::Extrude && (m_width == 0.0f || m_height == 0.0f)) -#else - if (type == EMoveType::Extrude && (m_extrusion_role == erCustom || m_width == 0.0f || m_height == 0.0f)) -#endif // ENABLE_START_GCODE_VISUALIZATION type = EMoveType::Travel; // time estimate section @@ -2853,11 +2841,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type) m_extrusion_role, m_extruder_id, m_cp_color.current, -#if ENABLE_START_GCODE_VISUALIZATION Vec3f(m_end_position[X], m_end_position[Y], m_processing_start_custom_gcode ? m_first_layer_height : m_end_position[Z]) + m_extruder_offsets[m_extruder_id], -#else - Vec3f(m_end_position[X], m_end_position[Y], m_end_position[Z]) + m_extruder_offsets[m_extruder_id], -#endif // ENABLE_START_GCODE_VISUALIZATION m_end_position[E] - m_start_position[E], m_feedrate, m_width, diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 5e28e9132..d683dacd2 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -485,10 +485,8 @@ namespace Slic3r { ExtruderColors m_extruder_colors; ExtruderTemps m_extruder_temps; float m_extruded_last_z; -#if ENABLE_START_GCODE_VISUALIZATION float m_first_layer_height; // mm bool m_processing_start_custom_gcode; -#endif // ENABLE_START_GCODE_VISUALIZATION unsigned int m_g1_line_id; unsigned int m_layer_id; CpColor m_cp_color; diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 7e83fb677..2f52d4530 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -41,8 +41,6 @@ //==================== #define ENABLE_2_4_0_ALPHA0 1 -// Enable visualization of start gcode as regular toolpaths -#define ENABLE_START_GCODE_VISUALIZATION (1 && ENABLE_2_4_0_ALPHA0) // Enable visualization of seams in preview #define ENABLE_SEAMS_VISUALIZATION (1 && ENABLE_2_4_0_ALPHA0) // Enable project dirty state manager diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index 68bf27d09..0af5f2479 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -1412,11 +1412,7 @@ void GCodeViewer::load_toolpaths(const GCodeProcessor::Result& gcode_result) // for the gcode viewer we need to take in account all moves to correctly size the printbed m_paths_bounding_box.merge(move.position.cast()); else { -#if ENABLE_START_GCODE_VISUALIZATION if (move.type == EMoveType::Extrude && move.extrusion_role != erCustom && move.width != 0.0f && move.height != 0.0f) -#else - if (move.type == EMoveType::Extrude && move.width != 0.0f && move.height != 0.0f) -#endif // ENABLE_START_GCODE_VISUALIZATION m_paths_bounding_box.merge(move.position.cast()); } }