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

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2018-06-05 15:09:36 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-06-05 15:09:36 +0300
commita8254e005317bbd9c6b95cd211adf5a6dd1fb4bd (patch)
treea98bf0cc6fe1b6935cb4be8880dd0063a61d9a03 /lib
parentf262ec9094ee47d793d24bfc099bc79bd5181838 (diff)
Generation of preview paths moved to c++
Diffstat (limited to 'lib')
-rw-r--r--lib/Slic3r/GUI/3DScene.pm62
-rw-r--r--lib/Slic3r/GUI/Plater/3DPreview.pm14
2 files changed, 32 insertions, 44 deletions
diff --git a/lib/Slic3r/GUI/3DScene.pm b/lib/Slic3r/GUI/3DScene.pm
index 1476e8c22..a55c4ab16 100644
--- a/lib/Slic3r/GUI/3DScene.pm
+++ b/lib/Slic3r/GUI/3DScene.pm
@@ -2199,56 +2199,36 @@ sub load_object {
return @{$volume_indices};
}
-# Create 3D thick extrusion lines for a skirt and brim.
-# Adds a new Slic3r::GUI::3DScene::Volume to $self->volumes.
-sub load_print_toolpaths {
- my ($self, $print, $colors) = @_;
-
#==============================================================================================================================
- my $useVBOs = Slic3r::GUI::_3DScene::use_VBOs();
- $self->SetCurrent($self->GetContext) if $useVBOs;
- Slic3r::GUI::_3DScene::_load_print_toolpaths($print, $self->volumes, $colors, $useVBOs)
- if ($print->step_done(STEP_SKIRT) && $print->step_done(STEP_BRIM));
-
+## Create 3D thick extrusion lines for a skirt and brim.
+## Adds a new Slic3r::GUI::3DScene::Volume to $self->volumes.
+#sub load_print_toolpaths {
+# my ($self, $print, $colors) = @_;
+#
# $self->SetCurrent($self->GetContext) if $self->UseVBOs;
# Slic3r::GUI::_3DScene::_load_print_toolpaths($print, $self->volumes, $colors, $self->UseVBOs)
# if ($print->step_done(STEP_SKIRT) && $print->step_done(STEP_BRIM));
-#==============================================================================================================================
-}
-
-# Create 3D thick extrusion lines for object forming extrusions.
-# Adds a new Slic3r::GUI::3DScene::Volume to $self->volumes,
-# one for perimeters, one for infill and one for supports.
-sub load_print_object_toolpaths {
- my ($self, $object, $colors) = @_;
-
-#==============================================================================================================================
- my $useVBOs = Slic3r::GUI::_3DScene::use_VBOs();
- $self->SetCurrent($self->GetContext) if $useVBOs;
- Slic3r::GUI::_3DScene::_load_print_object_toolpaths($object, $self->volumes, $colors, $useVBOs);
-
+#}
+#
+## Create 3D thick extrusion lines for object forming extrusions.
+## Adds a new Slic3r::GUI::3DScene::Volume to $self->volumes,
+## one for perimeters, one for infill and one for supports.
+#sub load_print_object_toolpaths {
+# my ($self, $object, $colors) = @_;
+#
# $self->SetCurrent($self->GetContext) if $self->UseVBOs;
# Slic3r::GUI::_3DScene::_load_print_object_toolpaths($object, $self->volumes, $colors, $self->UseVBOs);
-#==============================================================================================================================
-}
-
-# Create 3D thick extrusion lines for wipe tower extrusions.
-sub load_wipe_tower_toolpaths {
- my ($self, $print, $colors) = @_;
-
-#==============================================================================================================================
- my $useVBOs = Slic3r::GUI::_3DScene::use_VBOs();
- $self->SetCurrent($self->GetContext) if $useVBOs;
- Slic3r::GUI::_3DScene::_load_wipe_tower_toolpaths($print, $self->volumes, $colors, $useVBOs)
- if ($print->step_done(STEP_WIPE_TOWER));
-
+#}
+#
+## Create 3D thick extrusion lines for wipe tower extrusions.
+#sub load_wipe_tower_toolpaths {
+# my ($self, $print, $colors) = @_;
+#
# $self->SetCurrent($self->GetContext) if $self->UseVBOs;
# Slic3r::GUI::_3DScene::_load_wipe_tower_toolpaths($print, $self->volumes, $colors, $self->UseVBOs)
# if ($print->step_done(STEP_WIPE_TOWER));
-#==============================================================================================================================
-}
-
-#==============================================================================================================================
+#}
+#
#sub load_gcode_preview {
# my ($self, $print, $gcode_preview_data, $colors) = @_;
#
diff --git a/lib/Slic3r/GUI/Plater/3DPreview.pm b/lib/Slic3r/GUI/Plater/3DPreview.pm
index 9ea5069b4..7b713b46f 100644
--- a/lib/Slic3r/GUI/Plater/3DPreview.pm
+++ b/lib/Slic3r/GUI/Plater/3DPreview.pm
@@ -376,10 +376,18 @@ sub load_print {
if ($self->gcode_preview_data->empty) {
# load skirt and brim
- $self->canvas->load_print_toolpaths($self->print, \@colors);
- $self->canvas->load_wipe_tower_toolpaths($self->print, \@colors);
+#==============================================================================================================================
+ Slic3r::GUI::_3DScene::set_print($self->canvas, $self->print);
+ Slic3r::GUI::_3DScene::load_print_toolpaths($self->canvas);
+ Slic3r::GUI::_3DScene::load_wipe_tower_toolpaths($self->canvas, \@colors);
+# $self->canvas->load_print_toolpaths($self->print, \@colors);
+# $self->canvas->load_wipe_tower_toolpaths($self->print, \@colors);
+#==============================================================================================================================
foreach my $object (@{$self->print->objects}) {
- $self->canvas->load_print_object_toolpaths($object, \@colors);
+#==============================================================================================================================
+ Slic3r::GUI::_3DScene::load_print_object_toolpaths($self->canvas, $object, \@colors);
+# $self->canvas->load_print_object_toolpaths($object, \@colors);
+#==============================================================================================================================
# Show the objects in very transparent color.
#my @volume_ids = $self->canvas->load_object($object->model_object);
#$self->canvas->volumes->[$_]->color->[3] = 0.2 for @volume_ids;