mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-15 01:05:56 +08:00
parent
4229e489fa
commit
004ec5480d
@ -273,9 +273,10 @@ void PerimeterGenerator::process()
|
|||||||
}
|
}
|
||||||
|
|
||||||
surface_idx = 0;
|
surface_idx = 0;
|
||||||
|
const int extra_odd_perimeter = (config->extra_perimeters_odd_layers && layer_id % 2 == 1 ? 1:0);
|
||||||
for (const Surface &surface : all_surfaces) {
|
for (const Surface &surface : all_surfaces) {
|
||||||
// detect how many perimeters must be generated for this island
|
// detect how many perimeters must be generated for this island
|
||||||
int loop_number = this->config->perimeters + surface.extra_perimeters - 1; // 0-indexed loops
|
int loop_number = this->config->perimeters + surface.extra_perimeters - 1 + extra_odd_perimeter; // 0-indexed loops
|
||||||
surface_idx++;
|
surface_idx++;
|
||||||
|
|
||||||
if (this->config->only_one_perimeter_top && this->upper_slices == NULL){
|
if (this->config->only_one_perimeter_top && this->upper_slices == NULL){
|
||||||
|
@ -619,17 +619,27 @@ void PrintConfigDef::init_fff_params()
|
|||||||
def->enum_labels.push_back(L("Nearest"));
|
def->enum_labels.push_back(L("Nearest"));
|
||||||
def->enum_labels.push_back(L("Rear"));
|
def->enum_labels.push_back(L("Rear"));
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spRear));
|
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spRear));
|
||||||
|
|
||||||
def = this->add("extra_perimeters", coBool);
|
def = this->add("extra_perimeters", coBool);
|
||||||
def->label = L("Extra perimeters if needed");
|
def->label = L("filling horizontal gaps on slopes");
|
||||||
|
def->full_label = L("Extra perimeters if needed");
|
||||||
def->category = L("Layers and Perimeters");
|
def->category = L("Layers and Perimeters");
|
||||||
def->tooltip = L("Add more perimeters when needed for avoiding gaps in sloping walls. "
|
def->tooltip = L("Add more perimeters when needed for avoiding gaps in sloping walls. "
|
||||||
"Slic3r keeps adding perimeters, until more than 70% of the loop immediately above "
|
"Slic3r keeps adding perimeters, until more than 70% of the loop immediately above "
|
||||||
"is supported, and keep adding periemter until all overhangs are filled."
|
"is supported, and keep adding periemter until all overhangs are filled."
|
||||||
"\n!! this is a very slow algorithm !!");
|
"\n!! this is a very slow algorithm !!");
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionBool(true));
|
def->set_default_value(new ConfigOptionBool(false));
|
||||||
|
|
||||||
|
def = this->add("extra_perimeters_odd_layers", coBool);
|
||||||
|
def->label = L("on odd layers");
|
||||||
|
def->full_label = L("Extra perimeter on odd layers");
|
||||||
|
def->category = L("Layers and Perimeters");
|
||||||
|
def->tooltip = L("Add one perimeter every odd layer. With this, infill is taken into sandwitch"
|
||||||
|
" and you may be able to reduce drastically the infill/perimeter overlap setting. ");
|
||||||
|
def->mode = comAdvanced;
|
||||||
|
def->set_default_value(new ConfigOptionBool(false));
|
||||||
|
|
||||||
def = this->add("only_one_perimeter_top", coBool);
|
def = this->add("only_one_perimeter_top", coBool);
|
||||||
def->label = "Only one perimeter on Top surfaces";
|
def->label = "Only one perimeter on Top surfaces";
|
||||||
|
@ -587,6 +587,7 @@ public:
|
|||||||
ConfigOptionFloatOrPercent external_perimeter_speed;
|
ConfigOptionFloatOrPercent external_perimeter_speed;
|
||||||
ConfigOptionBool external_perimeters_first;
|
ConfigOptionBool external_perimeters_first;
|
||||||
ConfigOptionBool extra_perimeters;
|
ConfigOptionBool extra_perimeters;
|
||||||
|
ConfigOptionBool extra_perimeters_odd_layers;
|
||||||
ConfigOptionBool only_one_perimeter_top;
|
ConfigOptionBool only_one_perimeter_top;
|
||||||
ConfigOptionFloat fill_angle;
|
ConfigOptionFloat fill_angle;
|
||||||
ConfigOptionPercent fill_density;
|
ConfigOptionPercent fill_density;
|
||||||
@ -655,6 +656,7 @@ protected:
|
|||||||
OPT_PTR(external_perimeter_speed);
|
OPT_PTR(external_perimeter_speed);
|
||||||
OPT_PTR(external_perimeters_first);
|
OPT_PTR(external_perimeters_first);
|
||||||
OPT_PTR(extra_perimeters);
|
OPT_PTR(extra_perimeters);
|
||||||
|
OPT_PTR(extra_perimeters_odd_layers);
|
||||||
OPT_PTR(only_one_perimeter_top);
|
OPT_PTR(only_one_perimeter_top);
|
||||||
OPT_PTR(fill_angle);
|
OPT_PTR(fill_angle);
|
||||||
OPT_PTR(fill_density);
|
OPT_PTR(fill_density);
|
||||||
|
@ -472,6 +472,7 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|
|||||||
for (const t_config_option_key &opt_key : opt_keys) {
|
for (const t_config_option_key &opt_key : opt_keys) {
|
||||||
if ( opt_key == "perimeters"
|
if ( opt_key == "perimeters"
|
||||||
|| opt_key == "extra_perimeters"
|
|| opt_key == "extra_perimeters"
|
||||||
|
|| opt_key == "extra_perimeters_odd_layers"
|
||||||
|| opt_key == "gap_fill"
|
|| opt_key == "gap_fill"
|
||||||
|| opt_key == "gap_fill_speed"
|
|| opt_key == "gap_fill_speed"
|
||||||
|| opt_key == "overhangs"
|
|| opt_key == "overhangs"
|
||||||
|
@ -241,7 +241,7 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
|
|||||||
void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
|
void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
|
||||||
{
|
{
|
||||||
bool have_perimeters = config->opt_int("perimeters") > 0;
|
bool have_perimeters = config->opt_int("perimeters") > 0;
|
||||||
for (auto el : { "extra_perimeters", "only_one_perimeter_top", "ensure_vertical_shell_thickness", "thin_walls", "overhangs",
|
for (auto el : { "extra_perimeters", "extra_perimeters_odd_layers", "only_one_perimeter_top", "ensure_vertical_shell_thickness", "thin_walls", "overhangs",
|
||||||
"seam_position", "external_perimeters_first", "external_perimeter_extrusion_width",
|
"seam_position", "external_perimeters_first", "external_perimeter_extrusion_width",
|
||||||
"perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "perimeter_loop", "perimeter_loop_seam" })
|
"perimeter_speed", "small_perimeter_speed", "external_perimeter_speed", "perimeter_loop", "perimeter_loop_seam" })
|
||||||
toggle_field(el, have_perimeters);
|
toggle_field(el, have_perimeters);
|
||||||
|
@ -379,7 +379,9 @@ const std::vector<std::string>& Preset::print_options()
|
|||||||
{
|
{
|
||||||
static std::vector<std::string> s_opts {
|
static std::vector<std::string> s_opts {
|
||||||
"layer_height", "first_layer_height", "perimeters", "spiral_vase", "slice_closing_radius", "top_solid_layers", "bottom_solid_layers",
|
"layer_height", "first_layer_height", "perimeters", "spiral_vase", "slice_closing_radius", "top_solid_layers", "bottom_solid_layers",
|
||||||
"extra_perimeters", "only_one_perimeter_top", "ensure_vertical_shell_thickness", "avoid_crossing_perimeters", "thin_walls", "overhangs",
|
"extra_perimeters",
|
||||||
|
"extra_perimeters_odd_layers",
|
||||||
|
"only_one_perimeter_top", "ensure_vertical_shell_thickness", "avoid_crossing_perimeters", "thin_walls", "overhangs",
|
||||||
"overhangs_width",
|
"overhangs_width",
|
||||||
"seam_position", "external_perimeters_first", "fill_density"
|
"seam_position", "external_perimeters_first", "fill_density"
|
||||||
, "fill_pattern"
|
, "fill_pattern"
|
||||||
|
@ -267,7 +267,7 @@ std::string PresetHints::recommended_thin_wall_thickness(const PresetBundle &pre
|
|||||||
|
|
||||||
if (num_perimeters > 0) {
|
if (num_perimeters > 0) {
|
||||||
int num_lines = std::min(num_perimeters * 2, 10);
|
int num_lines = std::min(num_perimeters * 2, 10);
|
||||||
out += (boost::format(_utf8(L("Recommended object min thin wall thickness for layer height %.2f and"))) % layer_height).str() + " ";
|
out += (boost::format(_utf8(L("Recommended object min wall thickness for layer height %.2f and"))) % layer_height).str() + " ";
|
||||||
// Start with the width of two closely spaced
|
// Start with the width of two closely spaced
|
||||||
double width = external_perimeter_flow.width + external_perimeter_flow.spacing();
|
double width = external_perimeter_flow.width + external_perimeter_flow.spacing();
|
||||||
for (int i = 2; i <= num_lines; thin_walls ? ++ i : i += 2) {
|
for (int i = 2; i <= num_lines; thin_walls ? ++ i : i += 2) {
|
||||||
|
@ -1051,7 +1051,10 @@ void TabPrint::build()
|
|||||||
optgroup->append_single_option_line("enforce_full_fill_volume");
|
optgroup->append_single_option_line("enforce_full_fill_volume");
|
||||||
|
|
||||||
optgroup = page->new_optgroup(_(L("Quality (slower slicing)")));
|
optgroup = page->new_optgroup(_(L("Quality (slower slicing)")));
|
||||||
optgroup->append_single_option_line("extra_perimeters");
|
line = { _(L("Extra perimeters")), "" };
|
||||||
|
line.append_option(optgroup->get_option("extra_perimeters"));
|
||||||
|
line.append_option(optgroup->get_option("extra_perimeters_odd_layers"));
|
||||||
|
optgroup->append_line(line);
|
||||||
optgroup->append_single_option_line("only_one_perimeter_top");
|
optgroup->append_single_option_line("only_one_perimeter_top");
|
||||||
optgroup->append_single_option_line("ensure_vertical_shell_thickness");
|
optgroup->append_single_option_line("ensure_vertical_shell_thickness");
|
||||||
optgroup->append_single_option_line("avoid_crossing_perimeters");
|
optgroup->append_single_option_line("avoid_crossing_perimeters");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user