mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-14 16:02:55 +00:00
Feature/fuzzy skin ripple mode (#13471)
* fuzzy skin ripple mode add fuzzy skin ripple mode, which is a uniform pattern option. fixes #13325 * remove unused wall width parameter * remove cmath import * style consistency --------- Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
@@ -183,7 +183,8 @@ static t_config_enum_values s_keys_map_NoiseType {
|
||||
{ "perlin", int(NoiseType::Perlin) },
|
||||
{ "billow", int(NoiseType::Billow) },
|
||||
{ "ridgedmulti", int(NoiseType::RidgedMulti) },
|
||||
{ "voronoi", int(NoiseType::Voronoi) }
|
||||
{ "voronoi", int(NoiseType::Voronoi) },
|
||||
{ "ripple", int(NoiseType::Ripple) }
|
||||
};
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(NoiseType)
|
||||
|
||||
@@ -3370,7 +3371,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->tooltip = L("The width within which to jitter. It's advised to be below outer wall line width.");
|
||||
def->sidetext = L("mm"); // millimeters, CIS languages need translation
|
||||
def->min = 0;
|
||||
def->max = 1;
|
||||
def->max = 2;
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionFloat(0.2));
|
||||
|
||||
@@ -3422,18 +3423,21 @@ void PrintConfigDef::init_fff_params()
|
||||
"Perlin: Perlin noise, which gives a more consistent texture.\n"
|
||||
"Billow: Similar to perlin noise, but clumpier.\n"
|
||||
"Ridged Multifractal: Ridged noise with sharp, jagged features. Creates marble-like textures.\n"
|
||||
"Voronoi: Divides the surface into voronoi cells, and displaces each one by a random amount. Creates a patchwork texture.");
|
||||
"Voronoi: Divides the surface into voronoi cells, and displaces each one by a random amount. Creates a patchwork texture.\n"
|
||||
"Ripple: Uniform ripple pattern that ripples left and right of the original path. Repeating pattern, woven appearance.");
|
||||
def->enum_keys_map = &ConfigOptionEnum<NoiseType>::get_enum_values();
|
||||
def->enum_values.push_back("classic");
|
||||
def->enum_values.push_back("perlin");
|
||||
def->enum_values.push_back("billow");
|
||||
def->enum_values.push_back("ridgedmulti");
|
||||
def->enum_values.push_back("voronoi");
|
||||
def->enum_values.push_back("ripple");
|
||||
def->enum_labels.push_back(L("Classic"));
|
||||
def->enum_labels.push_back(L("Perlin"));
|
||||
def->enum_labels.push_back(L("Billow"));
|
||||
def->enum_labels.push_back(L("Ridged Multifractal"));
|
||||
def->enum_labels.push_back(L("Voronoi"));
|
||||
def->enum_labels.push_back(L("Ripple"));
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionEnum<NoiseType>(NoiseType::Classic));
|
||||
|
||||
@@ -3465,6 +3469,38 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.5));
|
||||
|
||||
def = this->add("fuzzy_skin_ripples_per_layer", coInt);
|
||||
def->label = L("Number of ripples per layer");
|
||||
def->category = L("Others");
|
||||
def->tooltip = L("When using the Ripple noise type, this controls how many full cycles of ripples will be added per layer.");
|
||||
def->min = 1;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(15));
|
||||
|
||||
def = this->add("fuzzy_skin_ripple_offset", coFloat);
|
||||
def->label = L("Ripple offset");
|
||||
def->category = L("Others");
|
||||
def->tooltip = L("When using the Ripple noise type, shifts the ripple pattern forward along the print path by this amount each "
|
||||
"layer-period. A value of 0 keeps every layer identical. A value equal to 0.5 shifts by a full "
|
||||
"half-wavelength, inverting the pattern. The shift is applied once per 'Layers between Ripple offset' layers, "
|
||||
"so consecutive layers within a period are printed identically on top of each other.");
|
||||
def->min = 0;
|
||||
def->max = 1;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.5));
|
||||
|
||||
def = this->add("fuzzy_skin_layers_between_ripple_offset", coInt);
|
||||
def->label = L("Layers between ripple offset");
|
||||
def->category = L("Others");
|
||||
def->tooltip = L("When using the Ripple noise type with a non-zero layer offset, this controls how "
|
||||
"many consecutive layers share the same ripple phase before the offset is applied. "
|
||||
"For example, a period of 3 means layers 0, 1 and 2 are identical, then layers 3, 4 "
|
||||
"and 5 are shifted by one full 'Ripple layer offset', and so on. "
|
||||
"Set to 1 to shift on every layer.");
|
||||
def->min = 1;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(1));
|
||||
|
||||
def = this->add("filter_out_gap_fill", coFloat);
|
||||
def->label = L("Filter out tiny gaps");
|
||||
def->category = L("Layers and Perimeters");
|
||||
|
||||
Reference in New Issue
Block a user