Fix reading relative_correction parameter

Drop compatibility with profiles created on legacy Slic3r PE 1.42-beta1 to 1.42-beta2

fixes #7013
This commit is contained in:
tamasmeszaros 2021-09-29 10:11:29 +02:00
parent 4e63f873da
commit 5c1e6d2298

View File

@ -1047,15 +1047,15 @@ Vec3d SLAPrint::relative_correction() const
Vec3d corr(1., 1., 1.); Vec3d corr(1., 1., 1.);
if(printer_config().relative_correction.values.size() >= 2) { if(printer_config().relative_correction.values.size() >= 2) {
corr(X) = printer_config().relative_correction.values[0]; corr.x() = printer_config().relative_correction.values[0];
corr(Y) = printer_config().relative_correction.values[0]; corr.y() = corr.x();
corr(Z) = printer_config().relative_correction.values.back(); corr.z() = printer_config().relative_correction.values[1];
} }
if(material_config().material_correction.values.size() >= 2) { if(material_config().material_correction.values.size() >= 2) {
corr(X) *= material_config().material_correction.values[0]; corr.x() *= material_config().material_correction.values[0];
corr(Y) *= material_config().material_correction.values[0]; corr.y() = corr.x();
corr(Z) *= material_config().material_correction.values.back(); corr.z() *= material_config().material_correction.values[1];
} }
return corr; return corr;