ENH: ironing inset
Jira: 7391 Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I2233b267ad7e3eb22ed9c232a89b7679173c7b34
This commit is contained in:
parent
af7f87c238
commit
4b23b42b22
|
@ -636,6 +636,7 @@ void Layer::make_ironing()
|
|||
double height;
|
||||
double speed;
|
||||
double angle;
|
||||
double inset;
|
||||
|
||||
bool operator<(const IroningParams &rhs) const {
|
||||
if (this->extruder < rhs.extruder)
|
||||
|
@ -662,12 +663,16 @@ void Layer::make_ironing()
|
|||
return true;
|
||||
if (this->angle > rhs.angle)
|
||||
return false;
|
||||
if (this->inset < rhs.inset)
|
||||
return true;
|
||||
if (this->inset > rhs.inset)
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator==(const IroningParams &rhs) const {
|
||||
return this->extruder == rhs.extruder && this->just_infill == rhs.just_infill &&
|
||||
this->line_spacing == rhs.line_spacing && this->height == rhs.height && this->speed == rhs.speed && this->angle == rhs.angle && this->pattern == rhs.pattern;
|
||||
this->line_spacing == rhs.line_spacing && this->height == rhs.height && this->speed == rhs.speed && this->angle == rhs.angle && this->pattern == rhs.pattern && this->inset == rhs.inset;
|
||||
}
|
||||
|
||||
LayerRegion *layerm = nullptr;
|
||||
|
@ -711,6 +716,7 @@ void Layer::make_ironing()
|
|||
//TODO just_infill is currently not used.
|
||||
ironing_params.just_infill = false;
|
||||
ironing_params.line_spacing = config.ironing_spacing;
|
||||
ironing_params.inset = config.ironing_inset;
|
||||
ironing_params.height = default_layer_height * 0.01 * config.ironing_flow;
|
||||
ironing_params.speed = config.ironing_speed;
|
||||
ironing_params.angle = (int(config.ironing_direction.value+layerm->region().config().infill_direction.value)%180) * M_PI / 180.;
|
||||
|
@ -801,7 +807,9 @@ void Layer::make_ironing()
|
|||
polys = union_safety_offset(polys);
|
||||
}
|
||||
// Trim the top surfaces with half the nozzle diameter.
|
||||
ironing_areas = intersection_ex(polys, offset(this->lslices, - float(scale_(0.5 * nozzle_dmr))));
|
||||
//BBS: ironing inset
|
||||
double ironing_areas_offset = ironing_params.inset == 0 ? float(scale_(0.5 * nozzle_dmr)) : scale_(ironing_params.inset);
|
||||
ironing_areas = intersection_ex(polys, offset(this->lslices, - ironing_areas_offset));
|
||||
}
|
||||
|
||||
// Create the filler object.
|
||||
|
|
|
@ -799,7 +799,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"seam_position", "wall_sequence", "is_infill_first", "sparse_infill_density", "sparse_infill_pattern", "sparse_infill_anchor", "sparse_infill_anchor_max",
|
||||
"top_surface_pattern", "bottom_surface_pattern", "internal_solid_infill_pattern", "infill_direction", "bridge_angle",
|
||||
"minimum_sparse_infill_area", "reduce_infill_retraction", "ironing_pattern", "ironing_type",
|
||||
"ironing_flow", "ironing_speed", "ironing_spacing","ironing_direction",
|
||||
"ironing_flow", "ironing_speed", "ironing_spacing","ironing_direction", "ironing_inset",
|
||||
"max_travel_detour_distance",
|
||||
"fuzzy_skin", "fuzzy_skin_thickness", "fuzzy_skin_point_distance",
|
||||
#ifdef HAS_PRESSURE_EQUALIZER
|
||||
|
|
|
@ -2226,12 +2226,22 @@ void PrintConfigDef::init_fff_params()
|
|||
def = this->add("ironing_spacing", coFloat);
|
||||
def->label = L("Ironing line spacing");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("The distance between the lines of ironing");
|
||||
def->tooltip = L("The distance between the lines of ironing. 0 means not apply.");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->max = 1;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.1));
|
||||
def->set_default_value(new ConfigOptionFloat(0));
|
||||
|
||||
def = this->add("ironing_inset", coFloat);
|
||||
def->label = L("Ironing inset");
|
||||
def->category = L("Quality");
|
||||
def->tooltip = L("The distance to keep the from the edges of ironing line");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->max = 100;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0));
|
||||
|
||||
def = this->add("ironing_speed", coFloat);
|
||||
def->label = L("Ironing speed");
|
||||
|
|
|
@ -813,6 +813,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionEnum<InfillPattern>, ironing_pattern))
|
||||
((ConfigOptionPercent, ironing_flow))
|
||||
((ConfigOptionFloat, ironing_spacing))
|
||||
((ConfigOptionFloat, ironing_inset))
|
||||
((ConfigOptionFloat, ironing_direction))
|
||||
((ConfigOptionFloat, ironing_speed))
|
||||
// Detect bridging perimeters
|
||||
|
|
|
@ -686,7 +686,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
|
||||
bool has_ironing = (config->opt_enum<IroningType>("ironing_type") != IroningType::NoIroning);
|
||||
for (auto el : {
|
||||
"ironing_pattern","ironing_speed", "ironing_flow", "ironing_spacing", "ironing_direction"})
|
||||
"ironing_pattern","ironing_speed", "ironing_flow", "ironing_spacing", "ironing_direction", "ironing_inset"})
|
||||
toggle_line(el, has_ironing);
|
||||
|
||||
// bool have_sequential_printing = (config->opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject);
|
||||
|
|
|
@ -95,7 +95,7 @@ std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::OBJECT_C
|
|||
};
|
||||
|
||||
std::map<std::string, std::vector<SimpleSettingData>> SettingsFactory::PART_CATEGORY_SETTINGS=
|
||||
{{L("Quality"), {{"ironing_type", "", 8}, {"ironing_flow", "", 9}, {"ironing_spacing", "", 10}, {"ironing_speed", "", 11}, {"ironing_direction", "",12}
|
||||
{{L("Quality"), {{"ironing_type", "", 8}, {"ironing_flow", "", 9}, {"ironing_spacing", "", 10}, {"ironing_inset", "", 11}, {"ironing_speed", "", 12}, {"ironing_direction", "",13}
|
||||
}},
|
||||
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", "",1},{"top_shell_thickness", "",1},
|
||||
{"bottom_shell_layers", "",1}, {"bottom_shell_thickness", "",1}, {"sparse_infill_density", "",1},
|
||||
|
|
|
@ -1967,6 +1967,7 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("ironing_speed");
|
||||
optgroup->append_single_option_line("ironing_flow");
|
||||
optgroup->append_single_option_line("ironing_spacing");
|
||||
optgroup->append_single_option_line("ironing_inset");
|
||||
optgroup->append_single_option_line("ironing_direction");
|
||||
|
||||
optgroup = page->new_optgroup(L("Wall generator"), L"param_wall");
|
||||
|
|
Loading…
Reference in New Issue