From 09ffaa572a3413d32faf927e6ad32f9feb4022e5 Mon Sep 17 00:00:00 2001 From: supermerill Date: Fri, 6 May 2022 12:47:43 +0200 Subject: Update to/from prusa config --- src/libslic3r/PrintConfig.cpp | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src/libslic3r/PrintConfig.cpp') diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 90e924044..71871db53 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -7049,6 +7049,11 @@ std::map PrintConfigDef::from_prusa(t_config_option_key if ("gcode_resolution" == opt_key) { output["min_length"] = value; } + if ("fill_pattern" == opt_key && "alignedrectilinear" == value) { + value = "rectilinear"; + output["fill_angle_increment"] = "90"; + } + return output; } @@ -7219,6 +7224,7 @@ std::unordered_set prusa_export_to_remove_keys = { "print_retract_lift", "print_temperature", "printhost_client_cert", +"remaining_times_type", "retract_lift_first_layer", "retract_lift_top", "seam_angle_cost", @@ -7250,7 +7256,10 @@ std::unordered_set prusa_export_to_remove_keys = { "thumbnails_end_file", "thumbnails_with_bed", "thumbnails_with_support", +"time_cost", "time_estimation_compensation", +"time_start_gcode", +"time_toolchange", "tool_name", "top_fan_speed", "top_infill_extrusion_spacing", @@ -7280,10 +7289,16 @@ std::map PrintConfigDef::to_prusa(t_config_option_key& opt_key = ""; value = ""; } else if (opt_key.find("_pattern") != std::string::npos) { - if ("smooth" == value || "smoothtriple" == value || "smoothhilbert" == value || "rectiwithperimeter" == value || "scatteredrectilinear" == value || "rectilineargapfill" == value || "monotonicgapfill" == value || "sawtooth" == value) { + if ("smooth" == value || "smoothtriple" == value || "smoothhilbert" == value || "rectiwithperimeter" == value || "scatteredrectilinear" == value || "rectilineargapfill" == value || "sawtooth" == value) { value = "rectilinear"; } else if ("concentricgapfill" == value) { value = "concentric"; + } else if ("monotonicgapfill" == value) { + value = "monotonic"; + } + if (all_conf.has("fill_angle_increment") && ((int(all_conf.option("fill_angle_increment")->getFloat())-90)%180) == 0 && "rectilinear" == value + && ("fill_pattern" == opt_key || "top_fill_pattern" == opt_key)) { + value = "alignedrectilinear"; } } else if ("seam_position" == opt_key) { if ("cost" == value) { @@ -7401,6 +7416,12 @@ std::map PrintConfigDef::to_prusa(t_config_option_key& if ("output_format" == opt_key) { opt_key = "sla_archive_format"; } + if ("host_type" == opt_key) { + if ("klipper" == value || "mpmdv2" == value || "monoprice" == value) value = "octoprint"; + } + if ("fan_below_layer_time" == opt_key) + if (value.find('.') != std::string::npos) + value = value.substr(0, value.find('.')); return new_entries; } -- cgit v1.2.3