mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-01 07:12:07 +00:00
make Fuzzy skin options only available when Fuzzy skin is not disabled (#10312)
Mimicking the behavior of Ironing. 
This commit is contained in:
@@ -215,7 +215,7 @@ bool should_fuzzify(const FuzzySkinConfig& config, const int layer_id, const siz
|
||||
{
|
||||
const auto fuzziy_type = config.type;
|
||||
|
||||
if (fuzziy_type == FuzzySkinType::None) {
|
||||
if (fuzziy_type == FuzzySkinType::None|| fuzziy_type == FuzzySkinType::Disabled_fuzzy) {
|
||||
return false;
|
||||
}
|
||||
if (!config.fuzzy_first_layer && layer_id <= 0) {
|
||||
|
||||
@@ -839,7 +839,7 @@ bool verify_update_print_object_regions(
|
||||
for (const PrintObjectRegions::FuzzySkinPaintedRegion ®ion : layer_range.fuzzy_skin_painted_regions) {
|
||||
const PrintRegion &parent_print_region = *region.parent_print_object_region(layer_range);
|
||||
PrintRegionConfig cfg = parent_print_region.config();
|
||||
cfg.fuzzy_skin.value = FuzzySkinType::All;
|
||||
if (cfg.fuzzy_skin.value != FuzzySkinType::Disabled_fuzzy) cfg.fuzzy_skin.value = FuzzySkinType::All;
|
||||
if (cfg != region.region->config()) {
|
||||
// Region configuration changed.
|
||||
if (print_region_ref_cnt(*region.region) == 0) {
|
||||
@@ -1081,7 +1081,7 @@ static PrintObjectRegions* generate_print_object_regions(
|
||||
for (int parent_volume_region_id = 0; parent_volume_region_id < int(layer_range.volume_regions.size()); ++parent_volume_region_id) {
|
||||
if (const PrintObjectRegions::VolumeRegion &parent_volume_region = layer_range.volume_regions[parent_volume_region_id]; parent_volume_region.model_volume->is_model_part() || parent_volume_region.model_volume->is_modifier()) {
|
||||
PrintRegionConfig cfg = parent_volume_region.region->config();
|
||||
cfg.fuzzy_skin.value = FuzzySkinType::All;
|
||||
if (cfg.fuzzy_skin.value != FuzzySkinType::Disabled_fuzzy) cfg.fuzzy_skin.value = FuzzySkinType::All;
|
||||
layer_range.fuzzy_skin_painted_regions.push_back({FuzzySkinParentType::VolumeRegion, parent_volume_region_id, get_create_region(std::move(cfg))});
|
||||
}
|
||||
}
|
||||
@@ -1090,7 +1090,7 @@ static PrintObjectRegions* generate_print_object_regions(
|
||||
const PrintObjectRegions::PaintedRegion &parent_painted_region = layer_range.painted_regions[parent_painted_regions_id];
|
||||
|
||||
PrintRegionConfig cfg = parent_painted_region.region->config();
|
||||
cfg.fuzzy_skin.value = FuzzySkinType::All;
|
||||
if (cfg.fuzzy_skin.value != FuzzySkinType::Disabled_fuzzy) cfg.fuzzy_skin.value = FuzzySkinType::All;
|
||||
layer_range.fuzzy_skin_painted_regions.push_back({FuzzySkinParentType::PaintedRegion, parent_painted_regions_id, get_create_region(std::move(cfg))});
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,8 @@ static t_config_enum_values s_keys_map_FuzzySkinType {
|
||||
{ "none", int(FuzzySkinType::None) },
|
||||
{ "external", int(FuzzySkinType::External) },
|
||||
{ "all", int(FuzzySkinType::All) },
|
||||
{ "allwalls", int(FuzzySkinType::AllWalls)}
|
||||
{ "allwalls", int(FuzzySkinType::AllWalls)},
|
||||
{ "disabled_fuzzy", int(FuzzySkinType::Disabled_fuzzy)}
|
||||
};
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(FuzzySkinType)
|
||||
|
||||
@@ -3223,12 +3224,14 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_values.push_back("external");
|
||||
def->enum_values.push_back("all");
|
||||
def->enum_values.push_back("allwalls");
|
||||
def->enum_labels.push_back(L("None"));
|
||||
def->enum_values.push_back("disabled_fuzzy");
|
||||
def->enum_labels.push_back(L("None (allow paint)"));
|
||||
def->enum_labels.push_back(L("Contour"));
|
||||
def->enum_labels.push_back(L("Contour and hole"));
|
||||
def->enum_labels.push_back(L("All walls"));
|
||||
def->enum_labels.push_back(L("Disabled"));
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionEnum<FuzzySkinType>(FuzzySkinType::None));
|
||||
def->set_default_value(new ConfigOptionEnum<FuzzySkinType>(FuzzySkinType::Disabled_fuzzy));
|
||||
|
||||
def = this->add("fuzzy_skin_thickness", coFloat);
|
||||
def->label = L("Fuzzy skin thickness");
|
||||
|
||||
@@ -41,6 +41,7 @@ enum class FuzzySkinType {
|
||||
External,
|
||||
All,
|
||||
AllWalls,
|
||||
Disabled_fuzzy,
|
||||
};
|
||||
|
||||
enum class FuzzySkinMode {
|
||||
|
||||
Reference in New Issue
Block a user