Renamed slicing engine to perimeter generator and slightly rearrangement of Arachne parameters.

This commit is contained in:
Lukáš Hejl 2022-05-30 15:57:49 +02:00
parent a9b79bdd97
commit c76c497234
8 changed files with 34 additions and 34 deletions

View File

@ -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<SurfaceFill> 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<SurfaceFill> 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<FillLightning::Filler*>(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<FillConcentric *>(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.

View File

@ -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();

View File

@ -449,7 +449,7 @@ static std::vector<std::string> 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"
};

View File

@ -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<SlicingEngine>::get_enum_values();
def->enum_keys_map = &ConfigOptionEnum<PerimeterGeneratorType>::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>(SlicingEngine::Classic));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<PerimeterGeneratorType>(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));

View File

@ -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<SlicingMode>, slicing_mode))
((ConfigOptionEnum<SlicingEngine>, slicing_engine))
((ConfigOptionEnum<PerimeterGeneratorType>, perimeter_generator))
((ConfigOptionFloat, wall_transition_length))
((ConfigOptionFloatOrPercent, wall_transition_filter_deviation))
((ConfigOptionFloat, wall_transition_angle))

View File

@ -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"

View File

@ -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<SlicingEngine>("slicing_engine") == SlicingEngine::Arachne;
bool have_arachne = config->opt_enum<PerimeterGeneratorType>("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);

View File

@ -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"));