From 61ae78432ce92adb47ea6a7eb3aca65bb353459e Mon Sep 17 00:00:00 2001 From: bubnikv Date: Wed, 14 Mar 2018 20:08:34 +0100 Subject: [PATCH] Removed the unsupported "pillars" support pattern. --- xs/src/libslic3r/PrintConfig.cpp | 7 ++++--- xs/src/libslic3r/PrintConfig.hpp | 3 +-- xs/src/libslic3r/SupportMaterial.cpp | 1 - xs/t/15_config.t | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index a1ca7cbfe..d7ee1e591 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1527,12 +1527,10 @@ PrintConfigDef::PrintConfigDef() def->enum_values.push_back("rectilinear"); def->enum_values.push_back("rectilinear-grid"); def->enum_values.push_back("honeycomb"); - def->enum_values.push_back("pillars"); def->enum_labels.push_back("rectilinear"); def->enum_labels.push_back("rectilinear grid"); def->enum_labels.push_back("honeycomb"); - def->enum_labels.push_back("pillars"); - def->default_value = new ConfigOptionEnum(smpPillars); + def->default_value = new ConfigOptionEnum(smpRectilinear); def = this->add("support_material_spacing", coFloat); def->label = L("Pattern spacing"); @@ -1804,6 +1802,9 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va values is a dirty hack and will need to be removed sometime in the future, but it will avoid lots of complaints for now. */ value = "0"; + } else if (opt_key == "support_material_pattern" && value == "pillars") { + // Slic3r PE does not support the pillars. They never worked well. + value = "rectilinear"; } else if (opt_key == "support_material_threshold" && value == "0") { // 0 used to be automatic threshold, but we introduced percent values so let's // transform it into the default value diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index e87ea11bf..cb94a7921 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -33,7 +33,7 @@ enum InfillPattern { }; enum SupportMaterialPattern { - smpRectilinear, smpRectilinearGrid, smpHoneycomb, smpPillars, + smpRectilinear, smpRectilinearGrid, smpHoneycomb, }; enum SeamPosition { @@ -87,7 +87,6 @@ template<> inline t_config_enum_values& ConfigOptionEnum keys_map["rectilinear"] = smpRectilinear; keys_map["rectilinear-grid"] = smpRectilinearGrid; keys_map["honeycomb"] = smpHoneycomb; - keys_map["pillars"] = smpPillars; } return keys_map; } diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp index b8df67ba6..0cecf0014 100644 --- a/xs/src/libslic3r/SupportMaterial.cpp +++ b/xs/src/libslic3r/SupportMaterial.cpp @@ -2491,7 +2491,6 @@ void PrintObjectSupportMaterial::generate_toolpaths( infill_pattern = ipRectilinear; break; case smpHoneycomb: - case smpPillars: infill_pattern = ipHoneycomb; break; } diff --git a/xs/t/15_config.t b/xs/t/15_config.t index 6e73c8a9a..397f7e479 100644 --- a/xs/t/15_config.t +++ b/xs/t/15_config.t @@ -99,8 +99,8 @@ foreach my $config (Slic3r::Config->new, Slic3r::Config::Static::new_FullPrintCo $config->set_deserialize('fill_pattern', 'line'); is $config->get('fill_pattern'), 'line', 'deserialize enum (fill_pattern)'; - $config->set_deserialize('support_material_pattern', 'pillars'); - is $config->get('support_material_pattern'), 'pillars', 'deserialize enum (support_material_pattern)'; + $config->set_deserialize('support_material_pattern', 'rectilinear'); + is $config->get('support_material_pattern'), 'rectilinear', 'deserialize enum (support_material_pattern)'; $config->set('extruder_offset', [[10,20],[30,45]]); is_deeply [ map $_->pp, @{$config->get('extruder_offset')} ], [[10,20],[30,45]], 'set/get points';