mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-28 01:31:57 +08:00
parent
48b8fc16e0
commit
2fae23a512
@ -394,6 +394,10 @@ Point SeamPlacer::get_seam(const Layer& layer, SeamPosition seam_position,
|
||||
last_pos_weight = 5.f;
|
||||
travel_cost = 0;
|
||||
}else if (seam_position == spNearest) {
|
||||
last_pos_weight = 25.f;
|
||||
travel_cost = 0;
|
||||
angle_weight = 0;
|
||||
}else if (seam_position == spCost) {
|
||||
// last_pos already contains current nozzle position
|
||||
// set base last_pos_weight to the same value as penaltyFlatSurface
|
||||
last_pos_weight = 5.f;
|
||||
|
@ -3177,7 +3177,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->tooltip = L("Position of perimeters' starting points."
|
||||
"\n ");
|
||||
def->enum_keys_map = &ConfigOptionEnum<SeamPosition>::get_enum_values();
|
||||
def->enum_values.push_back("near");
|
||||
def->enum_values.push_back("cost");
|
||||
def->enum_values.push_back("random");
|
||||
def->enum_values.push_back("aligned");
|
||||
def->enum_values.push_back("rear");
|
||||
@ -3186,7 +3186,7 @@ void PrintConfigDef::init_fff_params()
|
||||
def->enum_labels.push_back(L("Aligned"));
|
||||
def->enum_labels.push_back(L("Rear"));
|
||||
def->mode = comSimple;
|
||||
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spNearest));
|
||||
def->set_default_value(new ConfigOptionEnum<SeamPosition>(spCost));
|
||||
|
||||
def = this->add("seam_angle_cost", coPercent);
|
||||
def->label = L("Angle cost");
|
||||
@ -5296,7 +5296,8 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va
|
||||
if (value == "hidden") {
|
||||
opt_key = "seam_travel_cost";
|
||||
value = "20%";
|
||||
}
|
||||
}else if ("near" == value || "nearest" == value )
|
||||
value = "cost";
|
||||
} else if (opt_key == "overhangs") {
|
||||
opt_key = "overhangs_width_speed";
|
||||
if (value == "1")
|
||||
@ -5521,7 +5522,7 @@ void PrintConfigDef::to_prusa(t_config_option_key& opt_key, std::string& value,
|
||||
value = "concentric";
|
||||
}
|
||||
} else if ("seam_position" == opt_key) {
|
||||
if ("seam_travel_cost" == value || "near" == value || "hidden" == value) {
|
||||
if ("cost" == value) {
|
||||
value = "nearest";
|
||||
}
|
||||
} else if ("first_layer_size_compensation" == opt_key) {
|
||||
|
@ -109,7 +109,7 @@ enum SupportMaterialPattern {
|
||||
};
|
||||
|
||||
enum SeamPosition {
|
||||
spRandom, spNearest, spAligned, spRear, spCustom
|
||||
spRandom, spNearest, spAligned, spRear, spCustom, spCost
|
||||
};
|
||||
|
||||
enum SLAMaterial {
|
||||
@ -293,10 +293,9 @@ template<> inline const t_config_enum_values& ConfigOptionEnum<SeamPosition>::ge
|
||||
static t_config_enum_values keys_map{
|
||||
{"random", spRandom},
|
||||
{"nearest", spNearest},
|
||||
{"near", spNearest},
|
||||
{"cost", spCost},
|
||||
{"aligned", spAligned},
|
||||
{"rear", spRear},
|
||||
{"hidden", spNearest},
|
||||
{"custom", spCustom},
|
||||
};
|
||||
return keys_map;
|
||||
|
@ -373,7 +373,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
|
||||
toggle_field(el, have_perimeters && config->opt_bool("thin_walls"));
|
||||
|
||||
for (auto el : { "seam_angle_cost", "seam_travel_cost" })
|
||||
toggle_field(el, have_perimeters && config->option<ConfigOptionEnum<SeamPosition>>("seam_position")->value == SeamPosition::spNearest);
|
||||
toggle_field(el, have_perimeters && config->option<ConfigOptionEnum<SeamPosition>>("seam_position")->value == SeamPosition::spCost);
|
||||
|
||||
toggle_field("perimeter_loop_seam", config->opt_bool("perimeter_loop"));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user