ENH: buildvolume: add logic to support extruder_printable_height

jira: no-jira
Change-Id: I962c4aed8c536c0fd8b89ae090cd0463c5d645db
(cherry picked from commit 43773d77010492453473797e77e83e9a4630c25f)
This commit is contained in:
lane.wei
2024-11-23 12:26:54 +08:00
committed by Noisyfox
parent 5c646d4b42
commit eac07fd8e3
18 changed files with 84 additions and 46 deletions

View File

@@ -1012,6 +1012,7 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
{
Pointfs bedfs = make_counter_clockwise(full_config.opt<ConfigOptionPoints>("printable_area")->values);
std::vector<Pointfs> extruder_areas = full_config.option<ConfigOptionPointsGroups>("extruder_printable_area")->values;
std::vector<double> extruder_heights = full_config.option<ConfigOptionFloatsNullable>("extruder_printable_height")->values;
double print_height = full_config.opt_float("printable_height");
double current_width = bedfs[2].x() - bedfs[0].x();
double current_depth = bedfs[2].y() - bedfs[0].y();
@@ -1058,7 +1059,7 @@ bool CalibUtils::process_and_store_3mf(Model *model, const DynamicPrintConfig &f
int print_index;
part_plate->get_print(&print, &gcode_result, &print_index);
BuildVolume build_volume(bedfs, print_height, extruder_areas);
BuildVolume build_volume(bedfs, print_height, extruder_areas, extruder_heights);
unsigned int count = model->update_print_volume_state(build_volume);
if (count == 0) {
error_message = _L("Unable to calibrate: maybe because the set calibration value range is too large, or the step is too small");