From c76c49723400aea062cadfff8bb5b884a086bcaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Hejl?= Date: Mon, 30 May 2022 15:57:49 +0200 Subject: [PATCH] Renamed slicing engine to perimeter generator and slightly rearrangement of Arachne parameters. --- src/libslic3r/Fill/Fill.cpp | 12 ++++++------ src/libslic3r/LayerRegion.cpp | 2 +- src/libslic3r/Preset.cpp | 2 +- src/libslic3r/PrintConfig.cpp | 26 +++++++++++++------------- src/libslic3r/PrintConfig.hpp | 6 +++--- src/libslic3r/PrintObject.cpp | 2 +- src/slic3r/GUI/ConfigManipulation.cpp | 2 +- src/slic3r/GUI/Tab.cpp | 16 ++++++++-------- 8 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/libslic3r/Fill/Fill.cpp b/src/libslic3r/Fill/Fill.cpp index e68d517b4..f647d3ed5 100644 --- a/src/libslic3r/Fill/Fill.cpp +++ b/src/libslic3r/Fill/Fill.cpp @@ -331,10 +331,10 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive: // this->export_region_fill_surfaces_to_svg_debug("10_fill-initial"); #endif /* SLIC3R_DEBUG_SLICE_PROCESSING */ - std::vector surface_fills = group_fills(*this); - const Slic3r::BoundingBox bbox = this->object()->bounding_box(); - const auto resolution = this->object()->print()->config().gcode_resolution.value; - const auto slicing_engine = this->object()->config().slicing_engine; + std::vector surface_fills = group_fills(*this); + const Slic3r::BoundingBox bbox = this->object()->bounding_box(); + const auto resolution = this->object()->print()->config().gcode_resolution.value; + const auto perimeter_generator = this->object()->config().perimeter_generator; #ifdef SLIC3R_DEBUG_SLICE_PROCESSING { @@ -355,7 +355,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive: if (surface_fill.params.pattern == ipLightning) dynamic_cast(f.get())->generator = lightning_generator; - if (object()->config().slicing_engine.value == SlicingEngine::Arachne && surface_fill.params.pattern == ipConcentric) { + if (perimeter_generator.value == PerimeterGeneratorType::Arachne && surface_fill.params.pattern == ipConcentric) { FillConcentric *fill_concentric = dynamic_cast(f.get()); assert(fill_concentric != nullptr); fill_concentric->print_config = &this->object()->print()->config(); @@ -387,7 +387,7 @@ void Layer::make_fills(FillAdaptive::Octree* adaptive_fill_octree, FillAdaptive: params.anchor_length = surface_fill.params.anchor_length; params.anchor_length_max = surface_fill.params.anchor_length_max; params.resolution = resolution; - params.use_arachne = slicing_engine == SlicingEngine::Arachne && surface_fill.params.pattern == ipConcentric; + params.use_arachne = perimeter_generator == PerimeterGeneratorType::Arachne && surface_fill.params.pattern == ipConcentric; for (ExPolygon &expoly : surface_fill.expolygons) { // Spacing is modified by the filler to indicate adjustments. Reset it for each expolygon. diff --git a/src/libslic3r/LayerRegion.cpp b/src/libslic3r/LayerRegion.cpp index 722f43244..dfae5f188 100644 --- a/src/libslic3r/LayerRegion.cpp +++ b/src/libslic3r/LayerRegion.cpp @@ -101,7 +101,7 @@ void LayerRegion::make_perimeters(const SurfaceCollection &slices, SurfaceCollec g.overhang_flow = this->bridging_flow(frPerimeter); g.solid_infill_flow = this->flow(frSolidInfill); - if (this->layer()->object()->config().slicing_engine.value == SlicingEngine::Arachne) + if (this->layer()->object()->config().perimeter_generator.value == PerimeterGeneratorType::Arachne) g.process_arachne(); else g.process_classic(); diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 8d166d41c..afbd6a154 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -449,7 +449,7 @@ static std::vector s_Preset_print_options { "elefant_foot_compensation", "xy_size_compensation", "threads", "resolution", "gcode_resolution", "wipe_tower", "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_brim_width", "wipe_tower_bridging", "single_extruder_multi_material_priming", "mmu_segmented_region_max_width", "wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits", - "slicing_engine", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle", + "perimeter_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle", "wall_distribution_count", "wall_split_middle_threshold", "wall_add_middle_threshold", "min_feature_size", "min_bead_width" }; diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index bc79f4951..b98a69128 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -195,11 +195,11 @@ static const t_config_enum_values s_keys_map_ForwardCompatibilitySubstitutionRul }; CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(ForwardCompatibilitySubstitutionRule) -static t_config_enum_values s_keys_map_SlicingEngine { - { "classic", int(SlicingEngine::Classic) }, - { "arachne", int(SlicingEngine::Arachne) } +static t_config_enum_values s_keys_map_PerimeterGeneratorType { + { "classic", int(PerimeterGeneratorType::Classic) }, + { "arachne", int(PerimeterGeneratorType::Arachne) } }; -CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(SlicingEngine) +CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(PerimeterGeneratorType) static void assign_printer_technology_to_unknown(t_optiondef_map &options, PrinterTechnology printer_technology) { @@ -3043,19 +3043,19 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0)); - def = this->add("slicing_engine", coEnum); - def->label = L("Slicing engine"); - def->category = L("Advanced"); - def->tooltip = L("Classic slicing engine produces perimeters with constant extrusion width and for" + def = this->add("perimeter_generator", coEnum); + def->label = L("Perimeter generator"); + def->category = L("Layers and Perimeters"); + def->tooltip = L("Classic perimeter generator produces perimeters with constant extrusion width and for" " very thing areas is used gap-fill." "Arachne produces perimeters with variable extrusion width."); - def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); + def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); def->enum_values.push_back("classic"); def->enum_values.push_back("arachne"); def->enum_labels.push_back(L("Classic")); def->enum_labels.push_back(L("Arachne")); - def->mode = comExpert; - def->set_default_value(new ConfigOptionEnum(SlicingEngine::Classic)); + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionEnum(PerimeterGeneratorType::Arachne)); def = this->add("wall_transition_length", coFloat); def->label = L("Wall Transition Length"); @@ -3114,7 +3114,7 @@ void PrintConfigDef::init_fff_params() "between two outer edges of the shape, even if there actually is fill or (other) skin in " "the print instead of wall."); def->sidetext = L("%"); - def->mode = comExpert; + def->mode = comAdvanced; def->min = 1; def->max = 99; def->set_default_value(new ConfigOptionPercent(50)); @@ -3129,7 +3129,7 @@ void PrintConfigDef::init_fff_params() "object between two outer edges of the shape, even if there actually is fill or (other) " "skin in the print instead of wall."); def->sidetext = L("%"); - def->mode = comExpert; + def->mode = comAdvanced; def->min = 1; def->max = 99; def->set_default_value(new ConfigOptionPercent(75)); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index ef7d27388..eff9feeab 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -127,7 +127,7 @@ enum DraftShield { dsDisabled, dsLimited, dsEnabled }; -enum class SlicingEngine +enum class PerimeterGeneratorType { // Classic perimeter generator using Clipper offsets with constant extrusion width. Classic, @@ -158,7 +158,7 @@ CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SLAPillarConnectionMode) CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(BrimType) CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(DraftShield) CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(ForwardCompatibilitySubstitutionRule) -CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SlicingEngine) +CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(PerimeterGeneratorType) #undef CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS @@ -487,7 +487,7 @@ PRINT_CONFIG_CLASS_DEFINE( // ((ConfigOptionFloat, seam_preferred_direction_jitter)) ((ConfigOptionFloat, slice_closing_radius)) ((ConfigOptionEnum, slicing_mode)) - ((ConfigOptionEnum, slicing_engine)) + ((ConfigOptionEnum, perimeter_generator)) ((ConfigOptionFloat, wall_transition_length)) ((ConfigOptionFloatOrPercent, wall_transition_filter_deviation)) ((ConfigOptionFloat, wall_transition_angle)) diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 2b31a7957..007c4796b 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -662,7 +662,7 @@ bool PrintObject::invalidate_state_by_config_options( steps.emplace_back(posSupportMaterial); } } else if ( - opt_key == "slicing_engine" + opt_key == "perimeter_generator" || opt_key == "wall_transition_length" || opt_key == "wall_transition_filter_deviation" || opt_key == "wall_transition_angle" diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index 16b8e5b48..eb6d012dd 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -318,7 +318,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config) bool have_avoid_crossing_perimeters = config->opt_bool("avoid_crossing_perimeters"); toggle_field("avoid_crossing_perimeters_max_detour", have_avoid_crossing_perimeters); - bool have_arachne = config->opt_enum("slicing_engine") == SlicingEngine::Arachne; + bool have_arachne = config->opt_enum("perimeter_generator") == PerimeterGeneratorType::Arachne; toggle_field("wall_transition_length", have_arachne); toggle_field("wall_transition_filter_deviation", have_arachne); toggle_field("wall_transition_angle", have_arachne); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 088d96d29..08e14149b 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1492,6 +1492,7 @@ void TabPrint::build() optgroup->append_single_option_line("seam_position", category_path + "seam-position"); optgroup->append_single_option_line("external_perimeters_first", category_path + "external-perimeters-first"); optgroup->append_single_option_line("gap_fill_enabled", category_path + "fill-gaps"); + optgroup->append_single_option_line("perimeter_generator"); optgroup = page->new_optgroup(L("Fuzzy skin (experimental)")); category_path = "fuzzy-skin_246186/#"; @@ -1670,16 +1671,15 @@ void TabPrint::build() optgroup = page->new_optgroup(L("Other")); optgroup->append_single_option_line("clip_multipart_objects"); - optgroup = page->new_optgroup(L("Experimental")); - optgroup->append_single_option_line("slicing_engine"); - optgroup->append_single_option_line("wall_transition_length"); - optgroup->append_single_option_line("wall_transition_filter_deviation"); - optgroup->append_single_option_line("wall_transition_angle"); - optgroup->append_single_option_line("wall_distribution_count"); - optgroup->append_single_option_line("wall_split_middle_threshold"); + optgroup = page->new_optgroup(L("Arachne")); optgroup->append_single_option_line("wall_add_middle_threshold"); - optgroup->append_single_option_line("min_feature_size"); + optgroup->append_single_option_line("wall_split_middle_threshold"); + optgroup->append_single_option_line("wall_transition_angle"); + optgroup->append_single_option_line("wall_transition_filter_deviation"); + optgroup->append_single_option_line("wall_transition_length"); + optgroup->append_single_option_line("wall_distribution_count"); optgroup->append_single_option_line("min_bead_width"); + optgroup->append_single_option_line("min_feature_size"); page = add_options_page(L("Output options"), "output+page_white"); optgroup = page->new_optgroup(L("Sequential printing"));