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-21 16:37:02 +0300
committerJack Ha <j.ha@ultimaker.com>2016-12-21 16:37:02 +0300
commit0adb1a4c1c16ca6550a8450b1c516e79f5f7b53c (patch)
treea75800c307a151cbfe4a364470953e82366fdb66 /cura/LayerDataBuilder.py
parent9e6c070ac64cd55981c998d48a9f75106e76580f (diff)
Finally got normals in
Diffstat (limited to 'cura/LayerDataBuilder.py')
-rw-r--r--cura/LayerDataBuilder.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cura/LayerDataBuilder.py b/cura/LayerDataBuilder.py
index 2215ed5f27..f2ad6b55fa 100644
--- a/cura/LayerDataBuilder.py
+++ b/cura/LayerDataBuilder.py
@@ -56,18 +56,20 @@ class LayerDataBuilder(MeshBuilder):
index_count += data.lineMeshElementCount()
vertices = numpy.empty((vertex_count, 3), numpy.float32)
+ normals = numpy.empty((vertex_count, 3), 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, indices, normals)
self._element_counts[layer] = data.elementCount
self.addVertices(vertices)
self.addColors(colors)
self.addIndices(indices.flatten())
+ self._normals = normals
return LayerData(vertices=self.getVertices(), normals=self.getNormals(), indices=self.getIndices(),
colors=self.getColors(), uvs=self.getUVCoordinates(), file_name=self.getFileName(),