pa calib: batch mode for pa pattern (#7199)

* pa calib: batch mode option
This commit is contained in:
Dima Buzdyk 2025-03-07 17:26:54 +06:00 committed by GitHub
parent 538db07127
commit ecc16bfabf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 299 additions and 106 deletions

View file

@ -647,7 +647,8 @@ void CalibUtils::calib_pa_pattern(const CalibInfo &calib_info, Model& model)
full_config.apply(printer_config);
Vec3d plate_origin(0, 0, 0);
CalibPressureAdvancePattern pa_pattern(calib_info.params, full_config, true, model, plate_origin);
auto *object = model.objects[0];
CalibPressureAdvancePattern pa_pattern(calib_info.params, full_config, true, *object, plate_origin);
Pointfs bedfs = full_config.opt<ConfigOptionPoints>("printable_area")->values;
double current_width = bedfs[2].x() - bedfs[0].x();
@ -656,7 +657,7 @@ void CalibUtils::calib_pa_pattern(const CalibInfo &calib_info, Model& model)
Vec3d offset = Vec3d(current_width / 2, current_depth / 2, 0) - half_pattern_size;
pa_pattern.set_start_offset(offset);
pa_pattern.generate_custom_gcodes(full_config, true, model, plate_origin);
model.plates_custom_gcodes[0] = pa_pattern.generate_custom_gcodes(full_config, true, *object, plate_origin);
model.calib_pa_pattern = std::make_unique<CalibPressureAdvancePattern>(pa_pattern);
}