Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2018-09-10 14:15:12 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-09-10 14:15:12 +0300
commitbe508b003a5348aaf3c79a7eeb14b3b90f197b41 (patch)
treeffccec4e3a320771fa8aa0ba66bcc7ace1f56bba /lib/Slic3r/GUI
parent62894d3f7b841436c1fb849336b4e0dd15726fad (diff)
Fixed #1211
Diffstat (limited to 'lib/Slic3r/GUI')
-rw-r--r--lib/Slic3r/GUI/Plater.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Slic3r/GUI/Plater.pm b/lib/Slic3r/GUI/Plater.pm
index ee2689d16..e2c95859f 100644
--- a/lib/Slic3r/GUI/Plater.pm
+++ b/lib/Slic3r/GUI/Plater.pm
@@ -767,6 +767,15 @@ sub load_files {
$model->convert_multipart_object(scalar(@$nozzle_dmrs)) if $dialog->ShowModal() == wxID_YES;
}
+ # objects imported from 3mf require a call to center_around_origin to have gizmos working properly and this call
+ # need to be done after looks_like_multipart_object detection
+ if ($input_file =~ /.3[mM][fF]$/)
+ {
+ foreach my $model_object (@{$model->objects}) {
+ $model_object->center_around_origin; # also aligns object to Z = 0
+ }
+ }
+
if ($one_by_one) {
push @obj_idx, $self->load_model_objects(@{$model->objects});
} else {