mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
1) Moved first_layer_heigth frrom PrintObjectConfig to PrintConfig.
Thus the first_layer_height is no more object specific. That makes a lot of sense due to the brim calculation being performed over all layers at once and due to future merging of supports of different objects at first layer. 2) Because now first_layer_height is print specific, the relative first layer height derived from the object layer height was partially disabled: First the relative first layer height is converted to an absolute value when importing config, second the side text was changed from "mm or %" to "mm". Still the UI allows entering %. Both changes may be controversial, let's wait for user feedback.
This commit is contained in:
parent
49928e131c
commit
d9ed9149ae
7 changed files with 21 additions and 15 deletions
|
@ -296,6 +296,13 @@ void Preset::normalize(DynamicPrintConfig &config)
|
|||
if (auto *gap_fill_enabled = config.option<ConfigOptionBool>("gap_fill_enabled", false); gap_fill_enabled)
|
||||
gap_fill_enabled->value = false;
|
||||
}
|
||||
if (auto *first_layer_height = config.option<ConfigOptionFloatOrPercent>("first_layer_height", false); first_layer_height && first_layer_height->percent)
|
||||
if (const auto *layer_height = config.option<ConfigOptionFloat>("layer_height", false); layer_height) {
|
||||
// Legacy conversion - first_layer_height moved from PrintObject setting to a Print setting, thus we are getting rid of the dependency
|
||||
// of first_layer_height on PrintObject specific layer_height. Covert the first layer heigth to an absolute value.
|
||||
first_layer_height->value = first_layer_height->get_abs_value(layer_height->value);
|
||||
first_layer_height->percent = false;
|
||||
}
|
||||
}
|
||||
|
||||
std::string Preset::remove_invalid_keys(DynamicPrintConfig &config, const DynamicPrintConfig &default_config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue