diff --git a/resources/ui_layout/print.ui b/resources/ui_layout/print.ui index 344104f61..0f12a2ff4 100644 --- a/resources/ui_layout/print.ui +++ b/resources/ui_layout/print.ui @@ -189,8 +189,9 @@ group:label_width$8:Speed for print moves line:Bridge speed setting:label$_:width$4:bridge_speed end_line - line:Gap fill speed - setting:label$_:width$4:gap_fill_speed + line:Thin extrusions speed + setting:width$4:gap_fill_speed + setting:width$4:thin_walls_speed end_line group:Speed for non-print moves setting:travel_speed diff --git a/src/libslic3r/ExtrusionEntity.cpp b/src/libslic3r/ExtrusionEntity.cpp index a59d65e41..703ca1f5d 100644 --- a/src/libslic3r/ExtrusionEntity.cpp +++ b/src/libslic3r/ExtrusionEntity.cpp @@ -274,6 +274,7 @@ std::string ExtrusionEntity::role_to_string(ExtrusionRole role) case erSolidInfill : return L("Solid infill"); case erTopSolidInfill : return L("Top solid infill"); case erBridgeInfill : return L("Bridge infill"); + case erThinWall : return L("Thin wall"); case erGapFill : return L("Gap fill"); case erSkirt : return L("Skirt"); case erSupportMaterial : return L("Support material"); diff --git a/src/libslic3r/ExtrusionEntity.hpp b/src/libslic3r/ExtrusionEntity.hpp index 55201843a..a6441ccd1 100644 --- a/src/libslic3r/ExtrusionEntity.hpp +++ b/src/libslic3r/ExtrusionEntity.hpp @@ -23,6 +23,7 @@ enum ExtrusionRole : uint8_t { erSolidInfill, erTopSolidInfill, erBridgeInfill, + erThinWall, erGapFill, erSkirt, erSupportMaterial, @@ -54,6 +55,7 @@ inline bool is_perimeter(ExtrusionRole role) { return role == erPerimeter || role == erExternalPerimeter + || role == erThinWall || role == erOverhangPerimeter; } diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index b0b42eb78..1ec56d8f6 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -3524,6 +3524,8 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string speed = m_config.get_abs_value("solid_infill_speed"); } else if (path.role() == erTopSolidInfill) { speed = m_config.get_abs_value("top_solid_infill_speed"); + } else if (path.role() == erThinWall) { + speed = m_config.get_abs_value("thin_walls_speed"); } else if (path.role() == erGapFill) { speed = m_config.get_abs_value("gap_fill_speed"); } else if (path.role() == erNone) { @@ -3621,6 +3623,8 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string comment = ";_EXTRUDE_SET_SPEED"; if (path.role() == erExternalPerimeter) comment += ";_EXTERNAL_PERIMETER"; + if (path.role() == erThinWall) + comment += ";_EXTERNAL_PERIMETER"; } // F is mm per minute. gcode += m_writer.set_speed(F, "", comment); @@ -3995,6 +3999,8 @@ GCode::extrusion_role_to_string_for_parser(const ExtrusionRole & role) { return "TopSolidInfill"; case erBridgeInfill: return "BridgeInfill"; + case erThinWall: + return "ThinWall"; case erGapFill: return "GapFill"; case erSkirt: diff --git a/src/libslic3r/GCode/PreviewData.cpp b/src/libslic3r/GCode/PreviewData.cpp index b3b1fb8f5..b7c77e9a0 100644 --- a/src/libslic3r/GCode/PreviewData.cpp +++ b/src/libslic3r/GCode/PreviewData.cpp @@ -118,6 +118,7 @@ const Color GCodePreviewData::Extrusion::Default_Extrusion_Role_Colors[erCount] Color(1.0f, 0.0f, 1.0f, 1.0f), // erSolidInfill Color(0.0f, 1.0f, 1.0f, 1.0f), // erTopSolidInfill Color(0.5f, 0.5f, 0.5f, 1.0f), // erBridgeInfill + Color(0.0f, 1.0f, 0.4f, 1.0f), // erThinWall Color(1.0f, 1.0f, 1.0f, 1.0f), // erGapFill Color(0.5f, 0.0f, 0.0f, 1.0f), // erSkirt Color(0.0f, 0.5f, 0.0f, 1.0f), // erSupportMaterial diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 98e74a6cd..b179035b5 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -613,7 +613,7 @@ void PerimeterGenerator::process() // append thin walls if (!thin_walls.empty()) { ExtrusionEntityCollection tw = thin_variable_width - (thin_walls, erExternalPerimeter, this->ext_perimeter_flow); + (thin_walls, erThinWall, this->ext_perimeter_flow); entities.append(tw.entities); thin_walls.clear(); @@ -814,7 +814,7 @@ ExtrusionEntityCollection PerimeterGenerator::_traverse_loops( // append thin walls to the nearest-neighbor search (only for first iteration) if (!thin_walls.empty()) { - ExtrusionEntityCollection tw = thin_variable_width(thin_walls, erExternalPerimeter, this->ext_perimeter_flow); + ExtrusionEntityCollection tw = thin_variable_width(thin_walls, erThinWall, this->ext_perimeter_flow); coll.append(tw.entities); thin_walls.clear(); } diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index c89e3bebd..7aa12ae37 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2973,6 +2973,16 @@ void PrintConfigDef::init_fff_params() def->min = 0; def->set_default_value(new ConfigOptionFloatOrPercent(50, true)); + def = this->add("thin_walls_speed", coFloat); + def->label = L("Thin walls"); + def->full_label = L("Thin walls speed"); + def->category = OptionCategory::speed; + def->tooltip = L("Speed for thin wall (external extrusion that are alone because the obect is too thin at these places)."); + def->sidetext = L("mm/s"); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloat(30)); + def = this->add("threads", coInt); def->label = L("Threads"); def->tooltip = L("Threads are used to parallelize long-running tasks. Optimal threads number " diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 8402a5fda..644243193 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -639,6 +639,7 @@ public: ConfigOptionBool thin_walls; ConfigOptionFloatOrPercent thin_walls_min_width; ConfigOptionFloatOrPercent thin_walls_overlap; + ConfigOptionFloat thin_walls_speed; ConfigOptionEnum top_fill_pattern; ConfigOptionFloatOrPercent top_infill_extrusion_width; ConfigOptionInt top_solid_layers; @@ -713,6 +714,7 @@ protected: OPT_PTR(thin_walls); OPT_PTR(thin_walls_min_width); OPT_PTR(thin_walls_overlap); + OPT_PTR(thin_walls_speed); OPT_PTR(top_fill_pattern); OPT_PTR(top_infill_extrusion_width); OPT_PTR(top_solid_infill_speed); diff --git a/src/slic3r/GUI/GUI_Preview.cpp b/src/slic3r/GUI/GUI_Preview.cpp index 42f6c9740..085c5e62d 100644 --- a/src/slic3r/GUI/GUI_Preview.cpp +++ b/src/slic3r/GUI/GUI_Preview.cpp @@ -299,6 +299,7 @@ bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view "Solid infill", "D732D7", "Top solid infill", "FF1A1A", "Bridge infill", "9999FF", + "Thin wall", "FFB000", "Gap fill", "FFFFFF", "Skirt", "845321", "Support material", "00FF00", diff --git a/src/slic3r/GUI/Preset.cpp b/src/slic3r/GUI/Preset.cpp index 1fa8a1c78..c8c04ae40 100644 --- a/src/slic3r/GUI/Preset.cpp +++ b/src/slic3r/GUI/Preset.cpp @@ -506,7 +506,8 @@ const std::vector& Preset::print_options() , "infill_not_connected" , "first_layer_infill_speed" , "thin_walls_min_width" - , "thin_walls_overlap" + , "thin_walls_overlap", + "thin_walls_speed" , "model_precision" , "curve_smoothing_precision" , "curve_smoothing_cutoff_dist"