mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-30 15:22:03 +08:00
Add scarf seam config options
This commit is contained in:
parent
b065ab6078
commit
7042c1a34e
@ -456,6 +456,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||
"top_solid_layers", "top_solid_min_thickness", "bottom_solid_layers", "bottom_solid_min_thickness",
|
||||
"extra_perimeters", "extra_perimeters_on_overhangs", "avoid_crossing_curled_overhangs", "avoid_crossing_perimeters", "thin_walls", "overhangs",
|
||||
"seam_position","staggered_inner_seams", "external_perimeters_first", "fill_density", "fill_pattern", "top_fill_pattern", "bottom_fill_pattern",
|
||||
"scarf_seam_placement", "scarf_seam_only_on_smooth", "scarf_seam_start_height", "scarf_seam_entire_loop", "scarf_seam_length", "scarf_seam_max_segment_length", "scarf_seam_on_inner_perimeters",
|
||||
"infill_every_layers", /*"infill_only_where_needed",*/ "solid_infill_every_layers", "fill_angle", "bridge_angle",
|
||||
"solid_infill_below_area", "only_retract_when_crossing_perimeters", "infill_first",
|
||||
"ironing", "ironing_type", "ironing_flowrate", "ironing_speed", "ironing_spacing",
|
||||
|
@ -193,8 +193,17 @@ static const t_config_enum_values s_keys_map_SeamPosition {
|
||||
{ "aligned", spAligned },
|
||||
{ "rear", spRear }
|
||||
};
|
||||
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(SeamPosition)
|
||||
|
||||
static const t_config_enum_values s_keys_map_ScarfSeamPlacement {
|
||||
{ "nowhere", static_cast<int>(ScarfSeamPlacement::nowhere) },
|
||||
{ "contours", static_cast<int>(ScarfSeamPlacement::countours) },
|
||||
{ "everywhere", static_cast<int>(ScarfSeamPlacement::everywhere) }
|
||||
};
|
||||
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(ScarfSeamPlacement)
|
||||
|
||||
static const t_config_enum_values s_keys_map_SLADisplayOrientation = {
|
||||
{ "landscape", sladoLandscape},
|
||||
{ "portrait", sladoPortrait}
|
||||
@ -2645,6 +2654,66 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
def = this->add("scarf_seam_placement", coEnum);
|
||||
def->label = L("Scarf joint placement");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Where to place scarf joint seam.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<ScarfSeamPlacement>(ScarfSeamPlacement::nowhere));
|
||||
def->set_enum<ScarfSeamPlacement>({
|
||||
{ "nowhere", L("Nowhere") },
|
||||
{ "contours", L("Contours") },
|
||||
{ "everywhere", L("Everywhere") }
|
||||
});
|
||||
|
||||
def = this->add("scarf_seam_only_on_smooth", coBool);
|
||||
def->label = L("Scarf joint only on smooth perimeters");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Only use the scarf joint when the perimeter is smooth.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
def = this->add("scarf_seam_start_height", coPercent);
|
||||
def->label = L("Scarf start height");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Start height of the scarf joint specified as fraction of the current layer height.");
|
||||
def->sidetext = L(" %");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionPercent(0));
|
||||
|
||||
def = this->add("scarf_seam_entire_loop", coBool);
|
||||
def->label = L("Scarf joint around entire perimeter");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Extend the scarf around entire length of the perimeter.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
def = this->add("scarf_seam_length", coFloat);
|
||||
def->label = L("Scarf joint length");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Length of the scarf joint.");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(20));
|
||||
|
||||
def = this->add("scarf_seam_max_segment_length", coFloat);
|
||||
def->label = L("Max scarf joint segment length");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Maximal length of any scarf joint segment.");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0.15;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(1.0));
|
||||
|
||||
def = this->add("scarf_seam_on_inner_perimeters", coBool);
|
||||
def->label = L("Scarf joint on inner perimeters");
|
||||
def->category = L("Layers and Perimeters");
|
||||
def->tooltip = L("Use scarf joint on inner perimeters.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
#if 0
|
||||
def = this->add("seam_preferred_direction", coFloat);
|
||||
// def->gui_type = ConfigOptionDef::GUIType::slider;
|
||||
|
@ -143,6 +143,12 @@ enum SeamPosition {
|
||||
spRandom, spNearest, spAligned, spRear
|
||||
};
|
||||
|
||||
enum class ScarfSeamPlacement {
|
||||
nowhere,
|
||||
countours,
|
||||
everywhere
|
||||
};
|
||||
|
||||
enum SLAMaterial {
|
||||
slamTough,
|
||||
slamFlex,
|
||||
@ -244,6 +250,7 @@ CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SupportMaterialPattern)
|
||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SupportMaterialStyle)
|
||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SupportMaterialInterfacePattern)
|
||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SeamPosition)
|
||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(ScarfSeamPlacement)
|
||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SLADisplayOrientation)
|
||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SLAPillarConnectionMode)
|
||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(SLASupportTreeType)
|
||||
@ -732,6 +739,14 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||
// Single perimeter.
|
||||
((ConfigOptionEnum<TopOnePerimeterType>, top_one_perimeter_type))
|
||||
((ConfigOptionBool, only_one_perimeter_first_layer))
|
||||
|
||||
((ConfigOptionEnum<ScarfSeamPlacement>, scarf_seam_placement))
|
||||
((ConfigOptionBool, scarf_seam_only_on_smooth))
|
||||
((ConfigOptionPercent, scarf_seam_start_height))
|
||||
((ConfigOptionBool, scarf_seam_entire_loop))
|
||||
((ConfigOptionFloat, scarf_seam_length))
|
||||
((ConfigOptionFloat, scarf_seam_max_segment_length))
|
||||
((ConfigOptionBool, scarf_seam_on_inner_perimeters))
|
||||
)
|
||||
|
||||
PRINT_CONFIG_CLASS_DEFINE(
|
||||
|
@ -875,6 +875,13 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||
steps.emplace_back(posSlice);
|
||||
} else if (
|
||||
opt_key == "seam_position"
|
||||
|| opt_key == "scarf_seam_placement"
|
||||
|| opt_key == "scarf_seam_only_on_smooth"
|
||||
|| opt_key == "scarf_seam_start_height"
|
||||
|| opt_key == "scarf_seam_entire_loop"
|
||||
|| opt_key == "scarf_seam_length"
|
||||
|| opt_key == "scarf_seam_max_segment_length"
|
||||
|| opt_key == "scarf_seam_on_inner_perimeters"
|
||||
|| opt_key == "seam_preferred_direction"
|
||||
|| opt_key == "seam_preferred_direction_jitter"
|
||||
|| opt_key == "support_material_speed"
|
||||
|
@ -345,6 +345,16 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
|
||||
toggle_field("min_feature_size", have_arachne);
|
||||
toggle_field("min_bead_width", have_arachne);
|
||||
toggle_field("thin_walls", !have_arachne);
|
||||
|
||||
toggle_field("scarf_seam_placement", !has_spiral_vase);
|
||||
const auto scarf_seam_placement{config->opt_enum<ScarfSeamPlacement>("scarf_seam_placement")};
|
||||
const bool uses_scarf_seam{!has_spiral_vase && scarf_seam_placement != ScarfSeamPlacement::nowhere};
|
||||
toggle_field("scarf_seam_only_on_smooth", uses_scarf_seam);
|
||||
toggle_field("scarf_seam_start_height", uses_scarf_seam);
|
||||
toggle_field("scarf_seam_entire_loop", uses_scarf_seam);
|
||||
toggle_field("scarf_seam_length", uses_scarf_seam);
|
||||
toggle_field("scarf_seam_max_segment_length", uses_scarf_seam);
|
||||
toggle_field("scarf_seam_on_inner_perimeters", uses_scarf_seam);
|
||||
}
|
||||
|
||||
void ConfigManipulation::toggle_print_sla_options(DynamicPrintConfig* config)
|
||||
|
@ -1458,6 +1458,15 @@ void TabPrint::build()
|
||||
optgroup = page->new_optgroup(L("Advanced"));
|
||||
optgroup->append_single_option_line("seam_position", category_path + "seam-position");
|
||||
optgroup->append_single_option_line("staggered_inner_seams", category_path + "staggered-inner-seams");
|
||||
|
||||
optgroup->append_single_option_line("scarf_seam_placement", category_path + "scarf-seam-placement");
|
||||
optgroup->append_single_option_line("scarf_seam_only_on_smooth", category_path + "scarf-seam-only-on-smooth");
|
||||
optgroup->append_single_option_line("scarf_seam_start_height", category_path + "scarf-seam-start-height");
|
||||
optgroup->append_single_option_line("scarf_seam_entire_loop", category_path + "scarf-seam-entire-loop");
|
||||
optgroup->append_single_option_line("scarf_seam_length", category_path + "scarf-seam-length");
|
||||
optgroup->append_single_option_line("scarf_seam_max_segment_length", category_path + "scarf-seam-max-segment-length");
|
||||
optgroup->append_single_option_line("scarf_seam_on_inner_perimeters", category_path + "scarf-seam-on-inner-perimeters");
|
||||
|
||||
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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user