Fix for possible clash with old correction vectors in config

This commit is contained in:
tamasmeszaros 2019-04-29 17:07:55 +02:00
parent 8098c09589
commit a7d57de6f3

View File

@ -1664,16 +1664,16 @@ Vec3d SLAPrint::relative_correction() const
{
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(Y) = printer_config().relative_correction.values[0];
corr(Z) = printer_config().relative_correction.values[1];
}
corr(Z) = printer_config().relative_correction.values.back();
}
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(Y) *= material_config().material_correction.values[0];
corr(Z) *= material_config().material_correction.values[1];
corr(Z) *= material_config().material_correction.values.back();
}
return corr;