From ce9251b5a6cb486d3b5620f91f0c5fd8d20f7fb7 Mon Sep 17 00:00:00 2001 From: Victor Larchenko Date: Thu, 10 Nov 2016 16:56:45 +0600 Subject: [PATCH] T466: Fixed show only top layers bug --- plugins/GCodeReader/GCodeReader.py | 2 +- plugins/LayerView/LayerPass.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/GCodeReader/GCodeReader.py b/plugins/GCodeReader/GCodeReader.py index cf7d16c5a4..72e97465f4 100644 --- a/plugins/GCodeReader/GCodeReader.py +++ b/plugins/GCodeReader/GCodeReader.py @@ -99,7 +99,7 @@ class GCodeReader(MeshReader): count = len(path) line_types = numpy.empty((count - 1, 1), numpy.int32) line_types[:, 0] = 1 - line_widths = numpy.empty((count - 1, 1), numpy.int32) + line_widths = numpy.empty((count - 1, 1), numpy.float32) line_widths[:, 0] = 0.5 points = numpy.empty((count, 3), numpy.float32) i = 0 diff --git a/plugins/LayerView/LayerPass.py b/plugins/LayerView/LayerPass.py index a8a2b7ba7e..9e610b68d2 100644 --- a/plugins/LayerView/LayerPass.py +++ b/plugins/LayerView/LayerPass.py @@ -55,7 +55,7 @@ class LayerPass(RenderPass): continue # Render all layers below a certain number as line mesh instead of vertices. - if self._layerview._current_layer_num - self._layerview._solid_layers > -1 and (not self._layerview._only_show_top_layers or hasattr(node, "gcode")): + if self._layerview._current_layer_num - self._layerview._solid_layers > -1 and not self._layerview._only_show_top_layers: start = 0 end = 0 element_counts = layer_data.getElementCounts()