ENH: use spiral lift only when it is needed

If a travel path goes through an overhang expolygons, and their distance
is shorter than threshold, lift type will be set to SpiralLift.

Signed-off-by: yifan.wu <yifan.wu@bambulab.com>
Change-Id: I345788711755dd8611ecf385818e6052cd8abe9e
This commit is contained in:
yifan.wu 2022-11-20 22:04:25 +08:00 committed by Lane.Wei
parent 47a46010bd
commit 5d9bb61f8e
11 changed files with 199 additions and 17 deletions

View file

@ -292,6 +292,14 @@ static t_config_enum_values s_keys_map_PerimeterGeneratorType{
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(PerimeterGeneratorType)
static const t_config_enum_values s_keys_map_ZHopType = {
{ "Auto Lift", zhtAuto },
{ "Normal Lift", zhtNormal },
{ "Slope Lift", zhtSlope },
{ "Spiral Lift", zhtSpiral }
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(ZHopType)
static void assign_printer_technology_to_unknown(t_optiondef_map &options, PrinterTechnology printer_technology)
{
for (std::pair<const t_config_option_key, ConfigOptionDef> &kvp : options)
@ -2127,6 +2135,21 @@ void PrintConfigDef::init_fff_params()
def->mode = comSimple;
def->set_default_value(new ConfigOptionFloats { 0.4 });
def = this->add("z_hop_type", coEnum);
def->label = L("Z Hop Type");
def->tooltip = L("");
def->enum_keys_map = &ConfigOptionEnum<ZHopType>::get_enum_values();
def->enum_values.push_back("auto");
def->enum_values.push_back("normal");
def->enum_values.push_back("slope");
def->enum_values.push_back("spiral");
def->enum_labels.push_back(L("Auto"));
def->enum_labels.push_back(L("Normal"));
def->enum_labels.push_back(L("Slope"));
def->enum_labels.push_back(L("Spiral"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum{ ZHopType::zhtSpiral });
def = this->add("retract_restart_extra", coFloats);
//def->label = L("Extra length on restart");
def->label = "Extra length on restart";