mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
FIX: [STUDIO-2349] Large model causing hot bed display issues
Change-Id: I8efbfe75bbfa50059ce9f124a8c4b308d0fddac0
This commit is contained in:
parent
6718026dd6
commit
3d8b1408ec
1 changed files with 8 additions and 10 deletions
|
@ -3734,17 +3734,15 @@ std::vector<size_t> Plater::priv::load_model_objects(const ModelObjectPtrs& mode
|
||||||
const double max_ratio = std::max(ratio(0), ratio(1));
|
const double max_ratio = std::max(ratio(0), ratio(1));
|
||||||
if (max_ratio > 10000) {
|
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"),
|
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();
|
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,
|
||||||
// the size of the object is too big -> this could lead to overflow when moving to clipper coordinates,
|
// so scale down the mesh
|
||||||
// so scale down the mesh
|
object->scale_mesh_after_creation(1. / max_ratio);
|
||||||
object->scale_mesh_after_creation(1. / max_ratio);
|
object->origin_translation = Vec3d::Zero();
|
||||||
object->origin_translation = Vec3d::Zero();
|
object->center_around_origin();
|
||||||
object->center_around_origin();
|
scaled_down = true;
|
||||||
scaled_down = true;
|
break;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (max_ratio > 10) {
|
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"),
|
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"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue