Added option to switch between BoundedRectilinear and Concentric infill for the ensure vertical shell thickness.
This commit is contained in:
parent
df01923631
commit
063ae0ccfc
6 changed files with 35 additions and 5 deletions
|
@ -14,7 +14,8 @@ ThickPolylines FillEnsuring::fill_surface_arachne(const Surface *surface, const
|
||||||
assert(this->print_config != nullptr && this->print_object_config != nullptr && this->print_region_config != nullptr);
|
assert(this->print_config != nullptr && this->print_object_config != nullptr && this->print_region_config != nullptr);
|
||||||
|
|
||||||
const coord_t scaled_spacing = scaled<coord_t>(this->spacing);
|
const coord_t scaled_spacing = scaled<coord_t>(this->spacing);
|
||||||
const bool is_bounded_rectilinear = true;
|
const EnsuringInfillPattern infill_patter = this->print_object_config->ensure_vertical_shell_infill;
|
||||||
|
const bool is_bounded_rectilinear = infill_patter == EnsuringInfillPattern::eipBoundedRectilinear;
|
||||||
|
|
||||||
// Perform offset.
|
// Perform offset.
|
||||||
Slic3r::ExPolygons expp = this->overlap != 0. ? offset_ex(surface->expolygon, scaled<float>(this->overlap)) : ExPolygons{surface->expolygon};
|
Slic3r::ExPolygons expp = this->overlap != 0. ? offset_ex(surface->expolygon, scaled<float>(this->overlap)) : ExPolygons{surface->expolygon};
|
||||||
|
@ -96,7 +97,8 @@ ThickPolylines FillEnsuring::fill_surface_arachne(const Surface *surface, const
|
||||||
BOOST_LOG_TRIVIAL(error) << "FillBoundedRectilinear::fill_surface() failed to fill a region.";
|
BOOST_LOG_TRIVIAL(error) << "FillBoundedRectilinear::fill_surface() failed to fill a region.";
|
||||||
append(thick_polylines_out, to_thick_polylines(std::move(polylines), scaled<coord_t>(this->spacing)));
|
append(thick_polylines_out, to_thick_polylines(std::move(polylines), scaled<coord_t>(this->spacing)));
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
assert(infill_patter == EnsuringInfillPattern::eipConcentric);
|
||||||
}
|
}
|
||||||
|
|
||||||
return thick_polylines_out;
|
return thick_polylines_out;
|
||||||
|
|
|
@ -449,7 +449,7 @@ static std::vector<std::string> s_Preset_print_options {
|
||||||
"wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_brim_width", "wipe_tower_bridging", "single_extruder_multi_material_priming", "mmu_segmented_region_max_width",
|
"wipe_tower_width", "wipe_tower_rotation_angle", "wipe_tower_brim_width", "wipe_tower_bridging", "single_extruder_multi_material_priming", "mmu_segmented_region_max_width",
|
||||||
"wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits",
|
"wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits",
|
||||||
"perimeter_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
"perimeter_generator", "wall_transition_length", "wall_transition_filter_deviation", "wall_transition_angle",
|
||||||
"wall_distribution_count", "min_feature_size", "min_bead_width"
|
"wall_distribution_count", "min_feature_size", "min_bead_width", "ensure_vertical_shell_infill"
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::vector<std::string> s_Preset_filament_options {
|
static std::vector<std::string> s_Preset_filament_options {
|
||||||
|
|
|
@ -220,6 +220,12 @@ static t_config_enum_values s_keys_map_PerimeterGeneratorType {
|
||||||
};
|
};
|
||||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(PerimeterGeneratorType)
|
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(PerimeterGeneratorType)
|
||||||
|
|
||||||
|
static t_config_enum_values s_keys_map_EnsuringInfillPattern {
|
||||||
|
{ "bounded_rectilinear", int(EnsuringInfillPattern::eipBoundedRectilinear) },
|
||||||
|
{ "concentric", int(EnsuringInfillPattern::eipConcentric) }
|
||||||
|
};
|
||||||
|
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(EnsuringInfillPattern)
|
||||||
|
|
||||||
static void assign_printer_technology_to_unknown(t_optiondef_map &options, PrinterTechnology printer_technology)
|
static void assign_printer_technology_to_unknown(t_optiondef_map &options, PrinterTechnology printer_technology)
|
||||||
{
|
{
|
||||||
for (std::pair<const t_config_option_key, ConfigOptionDef> &kvp : options)
|
for (std::pair<const t_config_option_key, ConfigOptionDef> &kvp : options)
|
||||||
|
@ -3214,6 +3220,18 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->min = 0;
|
def->min = 0;
|
||||||
def->set_default_value(new ConfigOptionFloatOrPercent(85, true));
|
def->set_default_value(new ConfigOptionFloatOrPercent(85, true));
|
||||||
|
|
||||||
|
def = this->add("ensure_vertical_shell_infill", coEnum);
|
||||||
|
def->label = L("Ensure vertical shell infill");
|
||||||
|
def->category = L("Layers and Perimeters");
|
||||||
|
def->tooltip = L("Ensure vertical shell infill.");
|
||||||
|
def->enum_keys_map = &ConfigOptionEnum<EnsuringInfillPattern>::get_enum_values();
|
||||||
|
def->enum_values.push_back("bounded_rectilinear");
|
||||||
|
def->enum_values.push_back("concentric");
|
||||||
|
def->enum_labels.push_back(L("Bounded Rectilinear"));
|
||||||
|
def->enum_labels.push_back(L("Concentric"));
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionEnum<EnsuringInfillPattern>(EnsuringInfillPattern::eipBoundedRectilinear));
|
||||||
|
|
||||||
// Declare retract values for filament profile, overriding the printer's extruder profile.
|
// Declare retract values for filament profile, overriding the printer's extruder profile.
|
||||||
for (const char *opt_key : {
|
for (const char *opt_key : {
|
||||||
// floats
|
// floats
|
||||||
|
|
|
@ -133,6 +133,11 @@ enum class PerimeterGeneratorType
|
||||||
Arachne
|
Arachne
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class EnsuringInfillPattern {
|
||||||
|
eipBoundedRectilinear,
|
||||||
|
eipConcentric
|
||||||
|
};
|
||||||
|
|
||||||
enum class GCodeThumbnailsFormat {
|
enum class GCodeThumbnailsFormat {
|
||||||
PNG, JPG, QOI
|
PNG, JPG, QOI
|
||||||
};
|
};
|
||||||
|
@ -162,6 +167,8 @@ CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(DraftShield)
|
||||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(GCodeThumbnailsFormat)
|
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(GCodeThumbnailsFormat)
|
||||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(ForwardCompatibilitySubstitutionRule)
|
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(ForwardCompatibilitySubstitutionRule)
|
||||||
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(PerimeterGeneratorType)
|
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(PerimeterGeneratorType)
|
||||||
|
CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS(EnsuringInfillPattern)
|
||||||
|
|
||||||
|
|
||||||
#undef CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS
|
#undef CONFIG_OPTION_ENUM_DECLARE_STATIC_MAPS
|
||||||
|
|
||||||
|
@ -490,6 +497,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
||||||
((ConfigOptionBool, clip_multipart_objects))
|
((ConfigOptionBool, clip_multipart_objects))
|
||||||
((ConfigOptionBool, dont_support_bridges))
|
((ConfigOptionBool, dont_support_bridges))
|
||||||
((ConfigOptionFloat, elefant_foot_compensation))
|
((ConfigOptionFloat, elefant_foot_compensation))
|
||||||
|
((ConfigOptionEnum<EnsuringInfillPattern>, ensure_vertical_shell_infill))
|
||||||
((ConfigOptionFloatOrPercent, extrusion_width))
|
((ConfigOptionFloatOrPercent, extrusion_width))
|
||||||
((ConfigOptionFloat, first_layer_acceleration_over_raft))
|
((ConfigOptionFloat, first_layer_acceleration_over_raft))
|
||||||
((ConfigOptionFloatOrPercent, first_layer_speed_over_raft))
|
((ConfigOptionFloatOrPercent, first_layer_speed_over_raft))
|
||||||
|
|
|
@ -751,7 +751,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
||||||
|| opt_key == "wall_transition_angle"
|
|| opt_key == "wall_transition_angle"
|
||||||
|| opt_key == "wall_distribution_count"
|
|| opt_key == "wall_distribution_count"
|
||||||
|| opt_key == "min_feature_size"
|
|| opt_key == "min_feature_size"
|
||||||
|| opt_key == "min_bead_width") {
|
|| opt_key == "min_bead_width"
|
||||||
|
|| opt_key == "ensure_vertical_shell_infill") {
|
||||||
steps.emplace_back(posSlice);
|
steps.emplace_back(posSlice);
|
||||||
} else if (
|
} else if (
|
||||||
opt_key == "seam_position"
|
opt_key == "seam_position"
|
||||||
|
|
|
@ -1425,6 +1425,7 @@ void TabPrint::build()
|
||||||
optgroup->append_single_option_line("extra_perimeters", category_path + "extra-perimeters-if-needed");
|
optgroup->append_single_option_line("extra_perimeters", category_path + "extra-perimeters-if-needed");
|
||||||
optgroup->append_single_option_line("extra_perimeters_on_overhangs", category_path + "extra-perimeters-on-overhangs");
|
optgroup->append_single_option_line("extra_perimeters_on_overhangs", category_path + "extra-perimeters-on-overhangs");
|
||||||
optgroup->append_single_option_line("ensure_vertical_shell_thickness", category_path + "ensure-vertical-shell-thickness");
|
optgroup->append_single_option_line("ensure_vertical_shell_thickness", category_path + "ensure-vertical-shell-thickness");
|
||||||
|
optgroup->append_single_option_line("ensure_vertical_shell_infill");
|
||||||
optgroup->append_single_option_line("avoid_curled_filament_during_travels", category_path + "avoid-curled-filament-during-travels");
|
optgroup->append_single_option_line("avoid_curled_filament_during_travels", category_path + "avoid-curled-filament-during-travels");
|
||||||
optgroup->append_single_option_line("avoid_crossing_perimeters", category_path + "avoid-crossing-perimeters");
|
optgroup->append_single_option_line("avoid_crossing_perimeters", category_path + "avoid-crossing-perimeters");
|
||||||
optgroup->append_single_option_line("avoid_crossing_perimeters_max_detour", category_path + "avoid_crossing_perimeters_max_detour");
|
optgroup->append_single_option_line("avoid_crossing_perimeters_max_detour", category_path + "avoid_crossing_perimeters_max_detour");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue