#224 setting to force one skirt with complete_objects

This commit is contained in:
supermerill 2020-05-09 19:05:33 +02:00
parent 04f25541b8
commit 6f9dc88aa6
7 changed files with 25 additions and 7 deletions

View File

@ -260,6 +260,7 @@ group:Plater
setting:duplicate_distance
group:Sequential printing
setting:complete_objects
setting:complete_objects_one_skirt
line:Extruder clearance (mm)
setting:width$6:extruder_clearance_radius
setting:width$6:extruder_clearance_height

View File

@ -172,6 +172,7 @@ bool Print::invalidate_state_by_config_options(const std::vector<t_config_option
|| opt_key == "draft_shield"
|| opt_key == "skirt_distance"
|| opt_key == "min_skirt_length"
|| opt_key == "complete_objects_one_skirt"
|| opt_key == "ooze_prevention"
|| opt_key == "wipe_tower_x"
|| opt_key == "wipe_tower_y"
@ -1646,7 +1647,7 @@ void Print::process()
}
if (this->has_skirt()) {
this->set_status(88, L("Generating skirt"));
if (config().complete_objects){
if (config().complete_objects && !config().complete_objects_one_skirt){
for (PrintObject *obj : m_objects){
//create a skirt "pattern" (one per object)
const std::vector<PrintInstance> copies{ obj->instances() };

View File

@ -440,6 +440,14 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("complete_objects_one_skirt", coBool);
def->label = L("Allow only one skirt loop");
def->category = OptionCategory::output;
def->tooltip = L("When using 'Complete individual objects', the default behavior is to draw the skirt around each object."
" if you prefer to have only one skirt for the whole plater, use this option.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("cooling", coBools);
def->label = L("Enable auto cooling");
def->category = OptionCategory::cooling;

View File

@ -975,6 +975,7 @@ public:
ConfigOptionInts bridge_fan_speed;
ConfigOptionInts chamber_temperature;
ConfigOptionBool complete_objects;
ConfigOptionBool complete_objects_one_skirt;
ConfigOptionFloats colorprint_heights;
ConfigOptionBools cooling;
ConfigOptionFloat default_acceleration;
@ -1053,6 +1054,7 @@ protected:
OPT_PTR(bridge_fan_speed);
OPT_PTR(chamber_temperature);
OPT_PTR(complete_objects);
OPT_PTR(complete_objects_one_skirt);
OPT_PTR(colorprint_heights);
OPT_PTR(cooling);
OPT_PTR(default_acceleration);

View File

@ -396,7 +396,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig* config)
toggle_field("support_material_speed", have_support_material || have_brim || have_skirt);
bool have_sequential_printing = config->opt_bool("complete_objects");
for (auto el : { "extruder_clearance_radius", "extruder_clearance_height" })
for (auto el : { "extruder_clearance_radius", "extruder_clearance_height", "complete_objects_one_skirt" })
toggle_field(el, have_sequential_printing);
bool have_ooze_prevention = config->opt_bool("ooze_prevention");

View File

@ -2034,7 +2034,10 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame)
: q(q)
, main_frame(main_frame)
, config(Slic3r::DynamicPrintConfig::new_from_defaults_keys({
"bed_shape", "bed_custom_texture", "bed_custom_model", "complete_objects", "duplicate_distance", "extruder_clearance_radius", "skirts", "skirt_distance",
"bed_shape", "bed_custom_texture", "bed_custom_model",
"complete_objects",
"complete_objects_one_skirt",
"duplicate_distance", "extruder_clearance_radius", "skirts", "skirt_distance",
"brim_width", "variable_layer_height", "serial_port", "serial_speed", "host_type", "print_host",
"printhost_apikey", "printhost_cafile", "nozzle_diameter", "single_extruder_multi_material",
"wipe_tower", "wipe_tower_x", "wipe_tower_y", "wipe_tower_width", "wipe_tower_rotation_angle",

View File

@ -478,7 +478,10 @@ const std::vector<std::string>& Preset::print_options()
, "support_material_contact_distance_type"
, "support_material_contact_distance_top"
, "support_material_contact_distance_bottom"
, "support_material_buildplate_only", "dont_support_bridges", "notes", "complete_objects", "extruder_clearance_radius",
, "support_material_buildplate_only", "dont_support_bridges", "notes",
"complete_objects",
"complete_objects_one_skirt",
"extruder_clearance_radius",
"extruder_clearance_height", "gcode_comments", "gcode_label_objects", "output_filename_format", "post_process", "perimeter_extruder",
"infill_extruder", "solid_infill_extruder", "support_material_extruder", "support_material_interface_extruder",
"ooze_prevention", "standby_temperature_delta", "interface_shells", "extrusion_width", "first_layer_extrusion_width",