mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-16 23:21:50 +08:00
Fixed autoscale of objects after loading
This commit is contained in:
parent
a81f78045b
commit
b961711f28
@ -737,7 +737,7 @@ sub load_model_objects {
|
|||||||
{
|
{
|
||||||
# if the object is too large (more than 5 times the bed), scale it down
|
# if the object is too large (more than 5 times the bed), scale it down
|
||||||
my $size = $o->bounding_box->size;
|
my $size = $o->bounding_box->size;
|
||||||
my $ratio = max(@$size[X,Y]) / unscale(max(@$bed_size[X,Y]));
|
my $ratio = max($size->x / unscale($bed_size->x), $size->y / unscale($bed_size->y));
|
||||||
if ($ratio > 5) {
|
if ($ratio > 5) {
|
||||||
$_->set_scaling_factor(1/$ratio) for @{$o->instances};
|
$_->set_scaling_factor(1/$ratio) for @{$o->instances};
|
||||||
$scaled_down = 1;
|
$scaled_down = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user