mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-14 09:35:52 +08:00
And separate speed for "inner bridge" (the ones over sparse infill)
This commit is contained in:
parent
f7bf94840a
commit
27196d34ea
@ -5,6 +5,7 @@ Internal infill = B1302A
|
||||
Solid infill = D732D7
|
||||
Top solid infill = FF1A1A
|
||||
Bridge infill = 9999FF
|
||||
Internal Bridge infill = AAAADD
|
||||
Thin wall = FFB000
|
||||
Gap fill = FFFFFF
|
||||
Skirt = 845321
|
||||
|
@ -206,7 +206,9 @@ group:label_width$8:Speed for print moves
|
||||
setting:width$4:support_material_interface_speed
|
||||
end_line
|
||||
line:Bridge speed
|
||||
setting:label$_:width$4:bridge_speed
|
||||
setting:width$4:bridge_speed
|
||||
setting:width$4:bridge_speed_internal
|
||||
setting:width$4:overhangs_speed
|
||||
end_line
|
||||
line:Thin extrusions speed
|
||||
setting:width$4:gap_fill_speed
|
||||
|
@ -274,6 +274,7 @@ std::string ExtrusionEntity::role_to_string(ExtrusionRole role)
|
||||
case erInternalInfill : return L("Internal infill");
|
||||
case erSolidInfill : return L("Solid infill");
|
||||
case erTopSolidInfill : return L("Top solid infill");
|
||||
case erInternalBridgeInfill : return L("Internal Bridge infill");
|
||||
case erBridgeInfill : return L("Bridge infill");
|
||||
case erThinWall : return L("Thin wall");
|
||||
case erGapFill : return L("Gap fill");
|
||||
|
@ -14,6 +14,41 @@ class ExtrusionEntityCollection;
|
||||
class Extruder;
|
||||
|
||||
// Each ExtrusionRole value identifies a distinct set of { extruder, speed }
|
||||
/*
|
||||
enum ExtrusionRoleModifier : uint16_t {
|
||||
ermPerimeter = (1 << 0),
|
||||
ermInfill = (2 << 1),
|
||||
ermThin = (2 << 2),
|
||||
ermSkirt = (2 << 3),
|
||||
ermOther = (2 << 4),
|
||||
ermInternal = (1 << 10),
|
||||
ermExternal = (1 << 11),
|
||||
ermSolid = (1 << 12),
|
||||
ermBridge = (1 << 13),
|
||||
ermSupport = (1 << 13)
|
||||
};
|
||||
enum ExtrusionRole : uint16_t {
|
||||
erNone = 0,
|
||||
erPerimeter = ermPerimeter | ermInternal,
|
||||
erExternalPerimeter = ermPerimeter | ermExternal,
|
||||
erOverhangPerimeter = ermPerimeter | ermBridge,
|
||||
erInternalInfill = ermInfill | ermInternal,
|
||||
erSolidInfill = ermInfill | ermSolid | ermInternal,
|
||||
erTopSolidInfill = ermInfill | ermSolid | ermExternal,
|
||||
erBridgeInfill = ermInfill | ermSolid | ermBridge | ermExternal,
|
||||
erInternalBridgeInfill = ermInfill | ermSolid | ermBridge,
|
||||
erThinWall = ermThin | ermInternal,
|
||||
erGapFill = ermThin | ermExternal,
|
||||
erSkirt = ermSkirt,
|
||||
erSupportMaterial = ermInfill | ermSupport | ermInternal,
|
||||
erSupportMaterialInterface = ermInfill | ermSupport | ermExternal,
|
||||
erWipeTower = ermSkirt | ermSupport,
|
||||
erMilling = ermOther | ermPerimeter,
|
||||
erCustom = ermOther | ermSkirt,
|
||||
// Extrusion role for a collection with multiple extrusion roles.
|
||||
erMixed = ermOther
|
||||
};
|
||||
*/
|
||||
enum ExtrusionRole : uint8_t {
|
||||
erNone,
|
||||
erPerimeter,
|
||||
@ -23,6 +58,7 @@ enum ExtrusionRole : uint8_t {
|
||||
erSolidInfill,
|
||||
erTopSolidInfill,
|
||||
erBridgeInfill,
|
||||
erInternalBridgeInfill,
|
||||
erThinWall,
|
||||
erGapFill,
|
||||
erSkirt,
|
||||
@ -35,6 +71,7 @@ enum ExtrusionRole : uint8_t {
|
||||
erMixed,
|
||||
erCount
|
||||
};
|
||||
|
||||
// perimeter / infill / support / skirt / gapfill / wipetower / custom / mixed
|
||||
// side / internal / top / bottom
|
||||
// bridge
|
||||
|
@ -604,7 +604,7 @@ Fill::do_gap_fill(const ExPolygons &gapfill_areas, const FillParams ¶ms, Ext
|
||||
MedialAxis{ ex, params.flow->scaled_width() * 2, params.flow->scaled_width() / 5, coord_t(params.flow->height) }.build(polylines_gapfill);
|
||||
}
|
||||
}
|
||||
if (!polylines_gapfill.empty() && params.role != erBridgeInfill) {
|
||||
if (!polylines_gapfill.empty() && params.role != erBridgeInfill && params.role != erInternalBridgeInfill) {
|
||||
//test
|
||||
#ifdef _DEBUG
|
||||
for (ThickPolyline poly : polylines_gapfill) {
|
||||
|
@ -147,7 +147,7 @@ protected:
|
||||
ExtrusionRole getRoleFromSurfaceType(const FillParams ¶ms, const Surface *surface) const {
|
||||
if (params.role == erNone || params.role == erCustom) {
|
||||
return params.flow->bridge ?
|
||||
erBridgeInfill :
|
||||
(surface->has_pos_bottom() ? erBridgeInfill :erInternalBridgeInfill) :
|
||||
(surface->has_fill_solid() ?
|
||||
((surface->has_pos_top()) ? erTopSolidInfill : erSolidInfill) :
|
||||
erInternalInfill);
|
||||
|
@ -153,7 +153,7 @@ FillConcentricWGapFill::fill_surface_extrusion(
|
||||
MedialAxis{ ex, coord_t(max), coord_t(min), coord_t(params.flow->height) }.build(polylines);
|
||||
}
|
||||
}
|
||||
if (!polylines.empty() && good_role != erBridgeInfill) {
|
||||
if (!polylines.empty() && good_role != erBridgeInfill && good_role != erInternalBridgeInfill) {
|
||||
ExtrusionEntityCollection gap_fill = thin_variable_width(polylines, erGapFill, *params.flow);
|
||||
//set role if needed
|
||||
if (good_role != erSolidInfill) {
|
||||
|
@ -954,12 +954,13 @@ namespace DoExport {
|
||||
if (region->config().get_abs_value("perimeter_speed") == 0 ||
|
||||
region->config().get_abs_value("small_perimeter_speed") == 0 ||
|
||||
region->config().get_abs_value("external_perimeter_speed") == 0 ||
|
||||
region->config().get_abs_value("bridge_speed") == 0)
|
||||
region->config().get_abs_value("overhangs_speed") == 0)
|
||||
mm3_per_mm.push_back(layerm->perimeters.min_mm3_per_mm());
|
||||
if (region->config().get_abs_value("infill_speed") == 0 ||
|
||||
region->config().get_abs_value("solid_infill_speed") == 0 ||
|
||||
region->config().get_abs_value("top_solid_infill_speed") == 0 ||
|
||||
region->config().get_abs_value("bridge_speed") == 0)
|
||||
region->config().get_abs_value("bridge_speed") == 0 ||
|
||||
region->config().get_abs_value("bridge_speed_internal") == 0)
|
||||
mm3_per_mm.push_back(layerm->fills.min_mm3_per_mm());
|
||||
}
|
||||
}
|
||||
@ -3759,6 +3760,7 @@ std::string extrusion_role_2_string(const ExtrusionRole &er) {
|
||||
case erInternalInfill: return "infill internal";
|
||||
case erSolidInfill: return "infill solid";
|
||||
case erTopSolidInfill: return "infill solid top";
|
||||
case erInternalBridgeInfill:
|
||||
case erBridgeInfill: return "infill bridge";
|
||||
case erThinWall: return "thin_wall";
|
||||
case erGapFill: return "gap_fill";
|
||||
@ -4161,8 +4163,12 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
|
||||
speed = m_config.get_abs_value("perimeter_speed");
|
||||
} else if (path.role() == erExternalPerimeter) {
|
||||
speed = m_config.get_abs_value("external_perimeter_speed");
|
||||
} else if (path.role() == erOverhangPerimeter || path.role() == erBridgeInfill) {
|
||||
speed = m_config.get_abs_value("bridge_speed");
|
||||
} else if (path.role() == erBridgeInfill) {
|
||||
speed = m_config.get_abs_value("bridge_speed");
|
||||
} else if (path.role() == erInternalBridgeInfill) {
|
||||
speed = m_config.get_abs_value("bridge_speed_internal");
|
||||
} else if (path.role() == erOverhangPerimeter) {
|
||||
speed = m_config.get_abs_value("overhangs_speed");
|
||||
} else if (path.role() == erInternalInfill) {
|
||||
speed = m_config.get_abs_value("infill_speed");
|
||||
} else if (path.role() == erSolidInfill) {
|
||||
@ -4181,7 +4187,7 @@ std::string GCode::_before_extrude(const ExtrusionPath &path, const std::string
|
||||
throw std::invalid_argument("Invalid speed");
|
||||
}
|
||||
//don't modify bridge speed
|
||||
if (factor < 1 && !(path.role() == erOverhangPerimeter || path.role() == erBridgeInfill)) {
|
||||
if (factor < 1 && !(path.role() == erOverhangPerimeter || path.role() == erBridgeInfill || path.role() == erInternalBridgeInfill)) {
|
||||
float small_speed = m_config.small_perimeter_speed.get_abs_value(m_config.perimeter_speed);
|
||||
//apply factor between feature speed and small speed
|
||||
speed = speed * factor + (1 - factor) * small_speed;
|
||||
@ -4667,6 +4673,7 @@ GCode::extrusion_role_to_string_for_parser(const ExtrusionRole & role) {
|
||||
case erTopSolidInfill:
|
||||
return "TopSolidInfill";
|
||||
case erBridgeInfill:
|
||||
case erInternalBridgeInfill:
|
||||
return "BridgeInfill";
|
||||
case erThinWall:
|
||||
return "ThinWall";
|
||||
|
@ -62,6 +62,8 @@ void PressureEqualizer::reset()
|
||||
// Don't regulate the pressure in infill.
|
||||
m_max_volumetric_extrusion_rate_slopes[erBridgeInfill].negative = 0;
|
||||
m_max_volumetric_extrusion_rate_slopes[erBridgeInfill].positive = 0;
|
||||
m_max_volumetric_extrusion_rate_slopes[erInternalBridgeInfill].negative = 0;
|
||||
m_max_volumetric_extrusion_rate_slopes[erInternalBridgeInfill].positive = 0;
|
||||
// Don't regulate the pressure in gap fill.
|
||||
m_max_volumetric_extrusion_rate_slopes[erGapFill].negative = 0;
|
||||
m_max_volumetric_extrusion_rate_slopes[erGapFill].positive = 0;
|
||||
|
@ -135,6 +135,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.4f, 0.4f, 0.4f, 1.0f), // erInternalBridgeInfill
|
||||
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
|
||||
|
@ -348,6 +348,17 @@ void PrintConfigDef::init_fff_params()
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(60));
|
||||
|
||||
def = this->add("bridge_speed_internal", coFloatOrPercent);
|
||||
def->label = L("Internal bridges");
|
||||
def->full_label = L("Internal bridge speed");
|
||||
def->category = OptionCategory::speed;
|
||||
def->tooltip = L("Speed for printing the bridges that support the top layer.\nCan be a % of the bridge speed.");
|
||||
def->sidetext = L("mm/s");
|
||||
def->ratio_over = "bridge_speed";
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(150,true));
|
||||
|
||||
def = this->add("brim_inside_holes", coBool);
|
||||
def->label = L("Brim inside holes");
|
||||
@ -2358,6 +2369,17 @@ void PrintConfigDef::init_fff_params()
|
||||
def->mode = comExpert;
|
||||
def->set_default_value(new ConfigOptionString("[input_filename_base].gcode"));
|
||||
|
||||
def = this->add("overhangs_speed", coFloatOrPercent);
|
||||
def->label = L("Overhangs");
|
||||
def->full_label = L("Overhangs speed");
|
||||
def->category = OptionCategory::speed;
|
||||
def->tooltip = L("Speed for printing overhangs.\nCan be a % of the bridge speed.");
|
||||
def->sidetext = L("mm/s");
|
||||
def->ratio_over = "bridge_speed";
|
||||
def->min = 0;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(20, false));
|
||||
|
||||
def = this->add("overhangs_width_speed", coFloatOrPercent);
|
||||
def->label = L("'As bridge' speed threshold");
|
||||
def->full_label = L("Overhang bridge speed threshold");
|
||||
|
@ -651,7 +651,8 @@ public:
|
||||
ConfigOptionPercent bridge_overlap;
|
||||
ConfigOptionEnum<InfillPattern> bottom_fill_pattern;
|
||||
ConfigOptionFloatOrPercent bridged_infill_margin;
|
||||
ConfigOptionFloat bridge_speed;
|
||||
ConfigOptionFloat bridge_speed;
|
||||
ConfigOptionFloatOrPercent bridge_speed_internal;
|
||||
ConfigOptionFloat curve_smoothing_precision;
|
||||
ConfigOptionFloat curve_smoothing_cutoff_dist;
|
||||
ConfigOptionFloat curve_smoothing_angle_convex;
|
||||
@ -697,6 +698,7 @@ public:
|
||||
ConfigOptionFloat milling_speed;
|
||||
ConfigOptionFloatOrPercent min_width_top_surface;
|
||||
// Detect bridging perimeters
|
||||
ConfigOptionFloatOrPercent overhangs_speed;
|
||||
ConfigOptionFloatOrPercent overhangs_width;
|
||||
ConfigOptionFloatOrPercent overhangs_width_speed;
|
||||
ConfigOptionBool overhangs_reverse;
|
||||
@ -747,6 +749,7 @@ protected:
|
||||
OPT_PTR(bottom_fill_pattern);
|
||||
OPT_PTR(bridged_infill_margin);
|
||||
OPT_PTR(bridge_speed);
|
||||
OPT_PTR(bridge_speed_internal);
|
||||
OPT_PTR(curve_smoothing_precision);
|
||||
OPT_PTR(curve_smoothing_cutoff_dist);
|
||||
OPT_PTR(curve_smoothing_angle_convex);
|
||||
@ -791,6 +794,7 @@ protected:
|
||||
OPT_PTR(milling_post_process);
|
||||
OPT_PTR(milling_speed);
|
||||
OPT_PTR(min_width_top_surface);
|
||||
OPT_PTR(overhangs_speed);
|
||||
OPT_PTR(overhangs_width);
|
||||
OPT_PTR(overhangs_width_speed);
|
||||
OPT_PTR(overhangs_reverse);
|
||||
|
@ -744,10 +744,12 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|
||||
//}
|
||||
} else if (
|
||||
opt_key == "bridge_speed"
|
||||
|| opt_key == "bridge_speed_internal"
|
||||
|| opt_key == "external_perimeter_speed"
|
||||
|| opt_key == "external_perimeters_vase"
|
||||
|| opt_key == "gap_fill_speed"
|
||||
|| opt_key == "infill_speed"
|
||||
|| opt_key == "overhangs_speed"
|
||||
|| opt_key == "perimeter_speed"
|
||||
|| opt_key == "seam_position"
|
||||
|| opt_key == "seam_preferred_direction"
|
||||
|
@ -808,7 +808,7 @@ namespace SupportMaterialInternal {
|
||||
return true;
|
||||
} else {
|
||||
assert(! ee->is_loop());
|
||||
if (ee->role() == erBridgeInfill)
|
||||
if (ee->role() == erBridgeInfill || ee->role() == erInternalBridgeInfill)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -273,6 +273,7 @@ bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view
|
||||
_(L("Solid infill")) + "|" +
|
||||
_(L("Top solid infill")) + "|" +
|
||||
_(L("Bridge infill")) + "|" +
|
||||
_(L("Internal Bridge infill")) + "|" +
|
||||
_(L("Thin wall")) + "|" +
|
||||
_(L("Gap fill")) + "|" +
|
||||
_(L("Skirt")) + "|" +
|
||||
@ -331,6 +332,7 @@ bool Preview::init(wxWindow* parent, Bed3D& bed, Camera& camera, GLToolbar& view
|
||||
"Solid infill", "D732D7",
|
||||
"Top solid infill", "FF1A1A",
|
||||
"Bridge infill", "9999FF",
|
||||
"Internal Bridge infill", "9999EE",
|
||||
"Thin wall", "FFB000",
|
||||
"Gap fill", "FFFFFF",
|
||||
"Skirt", "845321",
|
||||
|
@ -440,6 +440,7 @@ const std::vector<std::string>& Preset::print_options()
|
||||
"avoid_crossing_not_first_layer",
|
||||
"thin_perimeters", "thin_perimeters_all",
|
||||
"thin_walls",
|
||||
"overhangs_speed",
|
||||
"overhangs_width",
|
||||
"overhangs_width_speed",
|
||||
"overhangs_reverse",
|
||||
@ -475,6 +476,7 @@ const std::vector<std::string>& Preset::print_options()
|
||||
"external_perimeter_speed", "infill_speed", "solid_infill_speed",
|
||||
"top_solid_infill_speed", "support_material_speed", "support_material_xy_spacing", "support_material_interface_speed",
|
||||
"bridge_speed",
|
||||
"bridge_speed_internal",
|
||||
"gap_fill",
|
||||
"gap_fill_min_area",
|
||||
"gap_fill_overlap",
|
||||
|
Loading…
x
Reference in New Issue
Block a user