Allow specify wall directions (#4156)

* Add wall direction option

* Force wall direction if specified

* Format

* Rename default to auto
This commit is contained in:
Noisyfox 2024-02-23 20:45:56 +08:00 committed by GitHub
parent d82987ca32
commit e4255b3c01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 67 additions and 5 deletions

View file

@ -189,6 +189,14 @@ static t_config_enum_values s_keys_map_WallSequence {
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(WallSequence)
//Orca
static t_config_enum_values s_keys_map_WallDirection{
{ "auto", int(WallDirection::Auto) },
{ "ccw", int(WallDirection::CounterClockwise) },
{ "cw", int(WallDirection::Clockwise)},
};
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(WallDirection)
//BBS
static t_config_enum_values s_keys_map_PrintSequence {
{ "by layer", int(PrintSequence::ByLayer) },
@ -1486,6 +1494,20 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool{false});
def = this->add("wall_direction", coEnum);
def->label = L("Wall loop direction");
def->category = L("Quality");
def->tooltip = L("The direction which the wall loops are extruded when looking down from the top.\n\nBy default all walls are extruded in counter-clockwise, unless Reverse on odd is enabled. Set this to any option other than Auto will force the wall direction regardless of the Reverse on odd.\n\nThis option will be disabled if sprial vase mode is enabled.");
def->enum_keys_map = &ConfigOptionEnum<WallDirection>::get_enum_values();
def->enum_values.push_back("auto");
def->enum_values.push_back("ccw");
def->enum_values.push_back("cw");
def->enum_labels.push_back(L("Auto"));
def->enum_labels.push_back(L("Counter clockwise"));
def->enum_labels.push_back(L("Clockwise"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<WallDirection>(WallDirection::Auto));
def = this->add("extruder", coInt);
def->gui_type = ConfigOptionDef::GUIType::i_enum_open;
def->label = L("Extruder");