mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Feature Ironing Inset added (#7969)
This commit is contained in:
parent
ac80575b28
commit
7834f78c90
7 changed files with 26 additions and 6 deletions
|
@ -1109,6 +1109,7 @@ void Layer::make_ironing()
|
|||
double height;
|
||||
double speed;
|
||||
double angle;
|
||||
double inset;
|
||||
|
||||
bool operator<(const IroningParams &rhs) const {
|
||||
if (this->extruder < rhs.extruder)
|
||||
|
@ -1135,12 +1136,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;
|
||||
|
@ -1184,6 +1189,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 = (config.ironing_angle >= 0 ? config.ironing_angle : config.infill_direction) * M_PI / 180.;
|
||||
|
@ -1274,7 +1280,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.
|
||||
|
|
|
@ -767,7 +767,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"seam_position", "staggered_inner_seams", "wall_sequence", "is_infill_first", "sparse_infill_density", "sparse_infill_pattern", "top_surface_pattern", "bottom_surface_pattern",
|
||||
"infill_direction", "solid_infill_direction", "rotate_solid_infill_direction", "counterbore_hole_bridging",
|
||||
"minimum_sparse_infill_area", "reduce_infill_retraction","internal_solid_infill_pattern","gap_fill_target",
|
||||
"ironing_type", "ironing_pattern", "ironing_flow", "ironing_speed", "ironing_spacing", "ironing_angle",
|
||||
"ironing_type", "ironing_pattern", "ironing_flow", "ironing_speed", "ironing_spacing", "ironing_angle", "ironing_inset",
|
||||
"max_travel_detour_distance",
|
||||
"fuzzy_skin", "fuzzy_skin_thickness", "fuzzy_skin_point_distance", "fuzzy_skin_first_layer",
|
||||
"max_volumetric_extrusion_rate_slope", "max_volumetric_extrusion_rate_slope_segment_length","extrusion_rate_smoothing_external_perimeter_only",
|
||||
|
|
|
@ -3082,7 +3082,17 @@ void PrintConfigDef::init_fff_params()
|
|||
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 from the edges. A value of 0 sets this to half of the nozzle diameter");
|
||||
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");
|
||||
|
|
|
@ -931,6 +931,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionEnum<InfillPattern>, ironing_pattern))
|
||||
((ConfigOptionPercent, ironing_flow))
|
||||
((ConfigOptionFloat, ironing_spacing))
|
||||
((ConfigOptionFloat, ironing_inset))
|
||||
((ConfigOptionFloat, ironing_direction))
|
||||
((ConfigOptionFloat, ironing_speed))
|
||||
((ConfigOptionFloat, ironing_angle))
|
||||
|
|
|
@ -646,7 +646,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
|
|||
toggle_field(el, have_support_material && !(support_is_normal_tree && !have_raft));
|
||||
|
||||
bool has_ironing = (config->opt_enum<IroningType>("ironing_type") != IroningType::NoIroning);
|
||||
for (auto el : { "ironing_pattern", "ironing_flow", "ironing_spacing", "ironing_speed", "ironing_angle" })
|
||||
for (auto el : { "ironing_pattern", "ironing_flow", "ironing_spacing", "ironing_speed", "ironing_angle", "ironing_inset"})
|
||||
toggle_line(el, has_ironing);
|
||||
|
||||
bool have_sequential_printing = (config->opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject);
|
||||
|
|
|
@ -101,7 +101,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},{"bridge_flow", "",11},{"make_overhang_printable", "",11},{"bridge_density", "", 1}
|
||||
{ L("Quality"), {{"ironing_type", "",8},{"ironing_flow", "",9},{"ironing_spacing", "",10},{"ironing_inset", "", 11},{"bridge_flow", "",11},{"make_overhang_printable", "",11},{"bridge_density", "", 1}
|
||||
}},
|
||||
{ L("Strength"), {{"wall_loops", "",1},{"top_shell_layers", L("Top Solid Layers"),1},{"top_shell_thickness", L("Top Minimum Shell Thickness"),1},
|
||||
{"bottom_shell_layers", L("Bottom Solid Layers"),1}, {"bottom_shell_thickness", L("Bottom Minimum Shell Thickness"),1},
|
||||
|
|
|
@ -2064,6 +2064,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_angle");
|
||||
|
||||
optgroup = page->new_optgroup(L("Wall generator"), L"param_wall_generator");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue