Replaced parameters wall_add_middle_threshold and wall_split_middle_threshold with automatic computation based on extrusion width.
That allows computed better values in cases when the extrusion width of the first layer or for the infill differs from the extrusion width for perimeters. Parameters min_feature_size and wall_transition_length now can be set in percentages, and then they will be calculated based on nozzle size. Old profiles with default values are forced to replace old default values with new default values in percentages.
This commit is contained in:
parent
b8c3905e82
commit
c9ddf7315e
14 changed files with 70 additions and 72 deletions
|
@ -454,6 +454,7 @@ namespace Slic3r {
|
|||
|
||||
bool load_model_from_file(const std::string& filename, Model& model, DynamicPrintConfig& config, ConfigSubstitutionContext& config_substitutions, bool check_version);
|
||||
unsigned int version() const { return m_version; }
|
||||
boost::optional<Semver> prusaslicer_generator_version() const { return m_prusaslicer_generator_version; }
|
||||
|
||||
private:
|
||||
void _destroy_xml_parser();
|
||||
|
@ -3098,8 +3099,7 @@ bool _3MF_Exporter::_add_custom_gcode_per_print_z_file_to_archive( mz_zip_archiv
|
|||
}
|
||||
|
||||
// Perform conversions based on the config values available.
|
||||
//FIXME provide a version of PrusaSlicer that stored the project file (3MF).
|
||||
static void handle_legacy_project_loaded(unsigned int version_project_file, DynamicPrintConfig& config)
|
||||
static void handle_legacy_project_loaded(unsigned int version_project_file, DynamicPrintConfig& config, const boost::optional<Semver>& prusaslicer_generator_version)
|
||||
{
|
||||
if (! config.has("brim_separation")) {
|
||||
if (auto *opt_elephant_foot = config.option<ConfigOptionFloat>("elefant_foot_compensation", false); opt_elephant_foot) {
|
||||
|
@ -3108,6 +3108,23 @@ static void handle_legacy_project_loaded(unsigned int version_project_file, Dyna
|
|||
opt_brim_separation->value = opt_elephant_foot->value;
|
||||
}
|
||||
}
|
||||
|
||||
// In PrusaSlicer 2.5.0-alpha2 and 2.5.0-alpha3, we introduce several parameters for Arachne that depend
|
||||
// on nozzle size . Later we decided to make default values for those parameters computed automatically
|
||||
// until the user changes them.
|
||||
if (prusaslicer_generator_version && *prusaslicer_generator_version >= *Semver::parse("2.5.0-alpha2") && *prusaslicer_generator_version <= *Semver::parse("2.5.0-alpha3")) {
|
||||
if (auto *opt_wall_transition_length = config.option<ConfigOptionFloatOrPercent>("wall_transition_length", false);
|
||||
opt_wall_transition_length && !opt_wall_transition_length->percent && opt_wall_transition_length->value == 0.4) {
|
||||
opt_wall_transition_length->percent = true;
|
||||
opt_wall_transition_length->value = 100;
|
||||
}
|
||||
|
||||
if (auto *opt_min_feature_size = config.option<ConfigOptionFloatOrPercent>("min_feature_size", false);
|
||||
opt_min_feature_size && !opt_min_feature_size->percent && opt_min_feature_size->value == 0.1) {
|
||||
opt_min_feature_size->percent = true;
|
||||
opt_min_feature_size->value = 25;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool is_project_3mf(const std::string& filename)
|
||||
|
@ -3150,7 +3167,7 @@ bool load_3mf(const char* path, DynamicPrintConfig& config, ConfigSubstitutionCo
|
|||
_3MF_Importer importer;
|
||||
bool res = importer.load_model_from_file(path, *model, config, config_substitutions, check_version);
|
||||
importer.log_errors();
|
||||
handle_legacy_project_loaded(importer.version(), config);
|
||||
handle_legacy_project_loaded(importer.version(), config, importer.prusaslicer_generator_version());
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue