FIX: [STUDIO-2349] Large model causing hot bed display issues

Change-Id: I8efbfe75bbfa50059ce9f124a8c4b308d0fddac0
This commit is contained in:
maosheng.wei 2023-04-21 17:50:50 +08:00 committed by Lane.Wei
parent 6718026dd6
commit 3d8b1408ec

View file

@ -3734,9 +3734,8 @@ std::vector<size_t> Plater::priv::load_model_objects(const ModelObjectPtrs& mode
const double max_ratio = std::max(ratio(0), ratio(1));
if (max_ratio > 10000) {
MessageDialog dlg(q, _L("Your object appears to be too large, Do you want to scale it down to fit the heat bed automatically?"), _L("Object too large"),
wxICON_QUESTION | wxYES_NO);
wxICON_QUESTION | wxYES);
int answer = dlg.ShowModal();
if (answer == wxID_YES) {
// the size of the object is too big -> this could lead to overflow when moving to clipper coordinates,
// so scale down the mesh
object->scale_mesh_after_creation(1. / max_ratio);
@ -3745,7 +3744,6 @@ std::vector<size_t> Plater::priv::load_model_objects(const ModelObjectPtrs& mode
scaled_down = true;
break;
}
}
else if (max_ratio > 10) {
MessageDialog dlg(q, _L("Your object appears to be too large, Do you want to scale it down to fit the heat bed automatically?"), _L("Object too large"),
wxICON_QUESTION | wxYES_NO);