diff --git a/slic3r.pl b/slic3r.pl index 651efa483..a593f93c9 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -426,9 +426,9 @@ $j Support material angle in degrees (range: 0-90, default: $config->{support_material_angle}) --support-material-contact-distance Vertical distance between object and support material (0+, default: $config->{support_material_contact_distance}) - --support-material-xy-spacing - horizontal distance between object and support material (0+, default: $config->{support_material_xy_spacing}) + "XY separation between an object and its support. If expressed as percentage (for example 50%), + it will be calculated over external perimeter width (default: half of exteral perimeter width) --support-material-interface-layers Number of perpendicular layers between support material and object (0+, default: $config->{support_material_interface_layers}) --support-material-interface-spacing diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index c530b30aa..8556783fc 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1121,12 +1121,16 @@ PrintConfigDef::PrintConfigDef() def->cli = "support-material!"; def->default_value = new ConfigOptionBool(false); - def = this->add("support_material_xy_spacing", coFloat); - def->label = "Extra separation between part and support (mm)"; + def = this->add("support_material_xy_spacing", coFloatOrPercent); + def->label = "XY separation between an object and its support"; def->category = "Support material"; - def->tooltip = "Add offset to support material separation (0 is 1 extrusion width)."; - def->cli = "support-material-xy-spacing=f"; - def->default_value = new ConfigOptionFloat(0.0); + def->tooltip = "XY separation between an object and its support. If expressed as percentage (for example 50%), it will be calculated over external perimeter width."; + def->sidetext = "mm or %"; + def->cli = "support-material-xy-spacing=s"; + def->ratio_over = "external_perimeter_extrusion_width"; + def->min = 0; + // Default is half the external perimeter width. + def->default_value = new ConfigOptionFloatOrPercent(50, true); def = this->add("support_material_angle", coInt); def->label = "Pattern angle"; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index c14889c88..c8933bcd9 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -164,7 +164,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig ConfigOptionBool support_material_synchronize_layers; ConfigOptionInt support_material_threshold; ConfigOptionBool support_material_with_sheath; - ConfigOptionFloat support_material_xy_spacing; + ConfigOptionFloatOrPercent support_material_xy_spacing; ConfigOptionFloat xy_size_compensation; PrintObjectConfig(bool initialize = true) : StaticPrintConfig() {