diff --git a/resources/calib/retraction/retraction_tower.stl b/resources/calib/retraction/retraction_tower.stl index e6239bdf8b..bae70d5924 100644 Binary files a/resources/calib/retraction/retraction_tower.stl and b/resources/calib/retraction/retraction_tower.stl differ diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 4c9eecb10c..f0bac05a8d 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2859,7 +2859,7 @@ GCode::LayerResult GCode::process_layer( m_calib_config.set_key_value("outer_wall_speed", new ConfigOptionFloat(std::round(_speed))); } else if (print.calib_mode() == CalibMode::Calib_Retraction_tower) { - auto _length = print.calib_params().start + std::floor(print_z) * print.calib_params().step; + auto _length = print.calib_params().start + std::floor(std::max(0.0,print_z-0.4)) * print.calib_params().step; DynamicConfig _cfg; _cfg.set_key_value("retraction_length", new ConfigOptionFloats{_length}); writer().config.apply(_cfg); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 32094143df..cd5baa548c 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -8384,16 +8384,6 @@ void Plater::calib_retraction(const Calib_Params& params) auto printer_config = &wxGetApp().preset_bundle->printers.get_edited_preset().config; auto obj = model().objects[0]; - //auto bed_shape = printer_config->option("printable_area")->values; - //BoundingBoxf bed_ext = get_extents(bed_shape); - //auto scale_obj = (bed_ext.size().x() - 10) / obj->bounding_box().size().x(); - //if (scale_obj < 1.0) - // obj->scale(scale_obj, 1, 1); - - //const ConfigOptionFloats* nozzle_diameter_config = printer_config->option("nozzle_diameter"); - //assert(nozzle_diameter_config->values.size() > 0); - //double nozzle_diameter = nozzle_diameter_config->values[0]; - //double line_width = nozzle_diameter * 1.75; double layer_height = 0.2; auto max_lh = printer_config->option("max_layer_height"); @@ -8402,22 +8392,16 @@ void Plater::calib_retraction(const Calib_Params& params) obj->config.set_key_value("wall_loops", new ConfigOptionInt(2)); obj->config.set_key_value("top_shell_layers", new ConfigOptionInt(0)); - obj->config.set_key_value("bottom_shell_layers", new ConfigOptionInt(1)); + obj->config.set_key_value("bottom_shell_layers", new ConfigOptionInt(3)); obj->config.set_key_value("sparse_infill_density", new ConfigOptionPercent(0)); obj->config.set_key_value("initial_layer_print_height", new ConfigOptionFloat(layer_height)); obj->config.set_key_value("layer_height", new ConfigOptionFloat(layer_height)); changed_objects({ 0 }); - //wxGetApp().get_tab(Preset::TYPE_PRINT)->update_dirty(); - //wxGetApp().get_tab(Preset::TYPE_FILAMENT)->update_dirty(); - //wxGetApp().get_tab(Preset::TYPE_PRINTER)->update_dirty(); - //wxGetApp().get_tab(Preset::TYPE_PRINT)->reload_config(); - //wxGetApp().get_tab(Preset::TYPE_FILAMENT)->reload_config(); - //wxGetApp().get_tab(Preset::TYPE_PRINTER)->reload_config(); // cut upper auto obj_bb = obj->bounding_box(); - auto height = (params.end - params.start + 1) / params.step; + auto height = 1.0 + 0.4 + ((params.end - params.start)) / params.step; if (height < obj_bb.size().z()) { std::array plane_pts = get_cut_plane(obj_bb, height); cut(0, 0, plane_pts, ModelObjectCutAttribute::KeepLower);