Changed the wizard to generate explicit extrusion widths

for the custom profile (not the zeros).
Changed the default values for filament_diameter and nozzle_diameter.
This commit is contained in:
bubnikv 2019-05-14 12:35:19 +02:00
parent 5f6c7853d4
commit 8a405d5a1c
2 changed files with 18 additions and 2 deletions

View file

@ -680,7 +680,7 @@ void PrintConfigDef::init_fff_params()
"and do multiple measurements along the filament, then compute the average.");
def->sidetext = L("mm");
def->min = 0;
def->set_default_value(new ConfigOptionFloats { 3. });
def->set_default_value(new ConfigOptionFloats { 1.75 });
def = this->add("filament_density", coFloats);
def->label = L("Density");
@ -1286,7 +1286,7 @@ void PrintConfigDef::init_fff_params()
def->label = L("Nozzle diameter");
def->tooltip = L("This is the diameter of your extruder nozzle (for example: 0.5, 0.35 etc.)");
def->sidetext = L("mm");
def->set_default_value(new ConfigOptionFloats { 0.5 });
def->set_default_value(new ConfigOptionFloats { 0.4 });
def = this->add("host_type", coEnum);
def->label = L("Host Type");

View file

@ -590,6 +590,22 @@ void PageDiameters::apply_custom_config(DynamicPrintConfig &config)
config.set_key_value("nozzle_diameter", opt_nozzle);
auto *opt_filam = new ConfigOptionFloats(1, spin_filam->GetValue());
config.set_key_value("filament_diameter", opt_filam);
auto set_extrusion_width = [&config, opt_nozzle](const char *key, double dmr) {
char buf[64];
sprintf(buf, "%.2lf", dmr * opt_nozzle->values.front() / 0.4);
config.set_key_value(key, new ConfigOptionFloatOrPercent(atof(buf), false));
};
set_extrusion_width("support_material_extrusion_width", 0.35);
set_extrusion_width("top_infill_extrusion_width", 0.40);
set_extrusion_width("first_layer_extrusion_width", 0.42);
set_extrusion_width("extrusion_width", 0.45);
set_extrusion_width("perimeter_extrusion_width", 0.45);
set_extrusion_width("external_perimeter_extrusion_width", 0.45);
set_extrusion_width("infill_extrusion_width", 0.45);
set_extrusion_width("solid_infill_extrusion_width", 0.45);
}
PageTemperatures::PageTemperatures(ConfigWizard *parent)