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

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Ha <j.ha@ultimaker.com>2016-12-28 13:30:59 +0300
committerJack Ha <j.ha@ultimaker.com>2016-12-28 13:30:59 +0300
commit9904dad07b17aacdc7175d82f98a1ac161609ba4 (patch)
treeb64a41c9de74f098e0a29897063940e3f1e1f61f /cura/LayerDataBuilder.py
parentc12e6da3ac5224ae72111ae21a1e648f321c5e2d (diff)
Added line thickness to layer view
Diffstat (limited to 'cura/LayerDataBuilder.py')
-rw-r--r--cura/LayerDataBuilder.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/cura/LayerDataBuilder.py b/cura/LayerDataBuilder.py
index e32e60efd3..7ff8a3737a 100644
--- a/cura/LayerDataBuilder.py
+++ b/cura/LayerDataBuilder.py
@@ -57,19 +57,20 @@ class LayerDataBuilder(MeshBuilder):
vertices = numpy.empty((vertex_count, 3), numpy.float32)
# normals = numpy.empty((vertex_count, 3), numpy.float32)
- # line_widths = numpy.empty((vertex_count, 3), numpy.float32) # strictly taken you need 1 less
+ line_dimensions = numpy.empty((vertex_count, 2), numpy.float32)
colors = numpy.empty((vertex_count, 4), numpy.float32)
indices = numpy.empty((index_count, 2), numpy.int32)
vertex_offset = 0
index_offset = 0
for layer, data in self._layers.items():
- ( vertex_offset, index_offset ) = data.build( vertex_offset, index_offset, vertices, colors, indices)
+ ( vertex_offset, index_offset ) = data.build( vertex_offset, index_offset, vertices, colors, line_dimensions, indices)
self._element_counts[layer] = data.elementCount
self.addVertices(vertices)
self.addColors(colors)
self.addIndices(indices.flatten())
+ self._uvs = line_dimensions
#self._normals = normals
return LayerData(vertices=self.getVertices(), normals=self.getNormals(), indices=self.getIndices(),