ENH: some change to support layer height edit

1 delete adaptive layer height config
2 support load and save layer heights profile with 3MF

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I109b3b791c3130b5ab2df445e8ae5cb55a78cec1
This commit is contained in:
salt.wei 2022-11-07 10:17:58 +08:00 committed by Lane.Wei
parent c1599aa138
commit 13ca93adc8
7 changed files with 26 additions and 45 deletions

View file

@ -699,8 +699,6 @@ bool PrintObject::invalidate_state_by_config_options(
steps.emplace_back(posPerimeters);
} else if (
opt_key == "layer_height"
//BBS
|| opt_key == "adaptive_layer_height"
|| opt_key == "raft_layers"
|| opt_key == "raft_contact_distance"
|| opt_key == "slice_closing_radius"
@ -1893,7 +1891,7 @@ std::vector<unsigned int> PrintObject::object_extruders() const
bool PrintObject::update_layer_height_profile(const ModelObject &model_object, const SlicingParameters &slicing_parameters, std::vector<coordf_t> &layer_height_profile)
{
bool updated = false;
//BBS:annotate these part and will do adaptive layer height below
if (layer_height_profile.empty()) {
// use the constructor because the assignement is crashing on ASAN OsX
layer_height_profile = std::vector<coordf_t>(model_object.layer_height_profile.get());
@ -1915,17 +1913,6 @@ bool PrintObject::update_layer_height_profile(const ModelObject &model_object, c
updated = true;
}
//BBS
//if (slicing_parameters.adaptive_layer_height) {
// layer_height_profile = layer_height_profile_adaptive(slicing_parameters, model_object, 0.5);
// HeightProfileSmoothingParams smoothing_params(5, true);
// layer_height_profile = smooth_height_profile(layer_height_profile, slicing_parameters, smoothing_params);
//}
//else {
// layer_height_profile = layer_height_profile_from_ranges(slicing_parameters, model_object.layer_config_ranges);
//}
//updated = true;
return updated;
}