Tech ENABLE_Z_OFFSET_CORRECTION set as default
This commit is contained in:
parent
86160685c0
commit
a7d466dc7c
@ -905,11 +905,9 @@ void GCodeProcessor::apply_config(const PrintConfig& config)
|
|||||||
if (spiral_vase != nullptr)
|
if (spiral_vase != nullptr)
|
||||||
m_spiral_vase_active = spiral_vase->value;
|
m_spiral_vase_active = spiral_vase->value;
|
||||||
|
|
||||||
#if ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
const ConfigOptionFloat* z_offset = config.option<ConfigOptionFloat>("z_offset");
|
const ConfigOptionFloat* z_offset = config.option<ConfigOptionFloat>("z_offset");
|
||||||
if (z_offset != nullptr)
|
if (z_offset != nullptr)
|
||||||
m_z_offset = z_offset->value;
|
m_z_offset = z_offset->value;
|
||||||
#endif // ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
||||||
@ -1158,11 +1156,9 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config)
|
|||||||
if (spiral_vase != nullptr)
|
if (spiral_vase != nullptr)
|
||||||
m_spiral_vase_active = spiral_vase->value;
|
m_spiral_vase_active = spiral_vase->value;
|
||||||
|
|
||||||
#if ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
const ConfigOptionFloat* z_offset = config.option<ConfigOptionFloat>("z_offset");
|
const ConfigOptionFloat* z_offset = config.option<ConfigOptionFloat>("z_offset");
|
||||||
if (z_offset != nullptr)
|
if (z_offset != nullptr)
|
||||||
m_z_offset = z_offset->value;
|
m_z_offset = z_offset->value;
|
||||||
#endif // ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GCodeProcessor::enable_stealth_time_estimator(bool enabled)
|
void GCodeProcessor::enable_stealth_time_estimator(bool enabled)
|
||||||
@ -1195,9 +1191,7 @@ void GCodeProcessor::reset()
|
|||||||
m_forced_height = 0.0f;
|
m_forced_height = 0.0f;
|
||||||
m_mm3_per_mm = 0.0f;
|
m_mm3_per_mm = 0.0f;
|
||||||
m_fan_speed = 0.0f;
|
m_fan_speed = 0.0f;
|
||||||
#if ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
m_z_offset = 0.0f;
|
m_z_offset = 0.0f;
|
||||||
#endif // ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
|
|
||||||
m_extrusion_role = erNone;
|
m_extrusion_role = erNone;
|
||||||
m_extruder_id = 0;
|
m_extruder_id = 0;
|
||||||
@ -2743,11 +2737,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line)
|
|||||||
// the threshold value = 0.0625f == 0.25 * 0.25 is arbitrary, we may find some smarter condition later
|
// the threshold value = 0.0625f == 0.25 * 0.25 is arbitrary, we may find some smarter condition later
|
||||||
|
|
||||||
if ((new_pos - *first_vertex).squaredNorm() < 0.0625f) {
|
if ((new_pos - *first_vertex).squaredNorm() < 0.0625f) {
|
||||||
#if ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
set_end_position(0.5f * (new_pos + *first_vertex) + m_z_offset * Vec3f::UnitZ());
|
set_end_position(0.5f * (new_pos + *first_vertex) + m_z_offset * Vec3f::UnitZ());
|
||||||
#else
|
|
||||||
set_end_position(0.5f * (new_pos + *first_vertex));
|
|
||||||
#endif // ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
store_move_vertex(EMoveType::Seam);
|
store_move_vertex(EMoveType::Seam);
|
||||||
set_end_position(curr_pos);
|
set_end_position(curr_pos);
|
||||||
}
|
}
|
||||||
@ -3279,11 +3269,7 @@ void GCodeProcessor::store_move_vertex(EMoveType type)
|
|||||||
m_extrusion_role,
|
m_extrusion_role,
|
||||||
m_extruder_id,
|
m_extruder_id,
|
||||||
m_cp_color.current,
|
m_cp_color.current,
|
||||||
#if ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
Vec3f(m_end_position[X], m_end_position[Y], m_processing_start_custom_gcode ? m_first_layer_height : m_end_position[Z] - m_z_offset) + m_extruder_offsets[m_extruder_id],
|
Vec3f(m_end_position[X], m_end_position[Y], m_processing_start_custom_gcode ? m_first_layer_height : m_end_position[Z] - m_z_offset) + m_extruder_offsets[m_extruder_id],
|
||||||
#else
|
|
||||||
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],
|
|
||||||
#endif // ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
static_cast<float>(m_end_position[E] - m_start_position[E]),
|
static_cast<float>(m_end_position[E] - m_start_position[E]),
|
||||||
m_feedrate,
|
m_feedrate,
|
||||||
m_width,
|
m_width,
|
||||||
|
@ -540,9 +540,7 @@ namespace Slic3r {
|
|||||||
float m_forced_height; // mm
|
float m_forced_height; // mm
|
||||||
float m_mm3_per_mm;
|
float m_mm3_per_mm;
|
||||||
float m_fan_speed; // percentage
|
float m_fan_speed; // percentage
|
||||||
#if ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
float m_z_offset; // mm
|
float m_z_offset; // mm
|
||||||
#endif // ENABLE_Z_OFFSET_CORRECTION
|
|
||||||
ExtrusionRole m_extrusion_role;
|
ExtrusionRole m_extrusion_role;
|
||||||
unsigned char m_extruder_id;
|
unsigned char m_extruder_id;
|
||||||
ExtruderColors m_extruder_colors;
|
ExtruderColors m_extruder_colors;
|
||||||
|
@ -36,15 +36,6 @@
|
|||||||
#define ENABLE_SMOOTH_NORMALS 0
|
#define ENABLE_SMOOTH_NORMALS 0
|
||||||
|
|
||||||
|
|
||||||
//================
|
|
||||||
// 2.4.1.rc techs
|
|
||||||
//================
|
|
||||||
#define ENABLE_2_4_1_RC 1
|
|
||||||
|
|
||||||
// Enable correction of toolpaths when z offset is set
|
|
||||||
#define ENABLE_Z_OFFSET_CORRECTION (1 && ENABLE_2_4_1_RC)
|
|
||||||
|
|
||||||
|
|
||||||
//====================
|
//====================
|
||||||
// 2.5.0.alpha1 techs
|
// 2.5.0.alpha1 techs
|
||||||
//====================
|
//====================
|
||||||
|
Loading…
Reference in New Issue
Block a user