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:
authorArjen Hiemstra <ahiemstra@heimr.nl>2015-11-13 13:31:29 +0300
committerArjen Hiemstra <ahiemstra@heimr.nl>2015-11-13 13:31:29 +0300
commit751f58fb02c67ccaefd420de21857921fb38d051 (patch)
treee052ce7da4672318f94cd3141cf12fcb2d15eec1 /cura/LayerData.py
parentb72497095927471b32282dcc37e6edaf1395a3df (diff)
parentb7471d6b1d209c8abe2c4920e5d86d8a542758b4 (diff)
Merge branch '15.10'
* 15.10: (39 commits) Remove unused import in StartSliceJob conforming to code style fix typo's.. Adjust initial view to be slightly from the side uses a different method to check whether a machine name excists Sets the languageComboBox to the default language Remove per-group settings for now Make sure to send all settings when an object overrides the profile Properly emit writeStarted in RemovableDriveOutputDevice Add xy_offset setting to list of settings that trigger a disallowed area update Properly trigger a reslice when the active instance is changed Wizardpages without hack Only hides the window when there are no more pages Only add layer data node after all processing Also account for "xy_offset" setting for the disallowed areas JSON: workaround for stutter in spiralize vase: set travel speed to printing speed Adds a color for the error-messages Shows an error message when a user tries to add a printer with a name that already excists. JSON: support bottom stair step height defaults changed so that the bottom distance to the model isn't violated too much Try to use Protobuf CPP implementation if it is available ...
Diffstat (limited to 'cura/LayerData.py')
-rw-r--r--cura/LayerData.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/cura/LayerData.py b/cura/LayerData.py
index eb8f5553ad..1cf13a1798 100644
--- a/cura/LayerData.py
+++ b/cura/LayerData.py
@@ -63,6 +63,7 @@ class LayerData(MeshData):
offset = data.build(offset, vertices, colors, indices)
self._element_counts[layer] = data.elementCount
+ self.clear()
self.addVertices(vertices)
self.addColors(colors)
self.addIndices(indices.flatten())
@@ -200,18 +201,14 @@ class Polygon():
def build(self, offset, vertices, colors, indices):
self._begin = offset
+ self._end = self._begin + len(self._data) - 1
color = self.getColor()
color.setValues(color.r * 0.5, color.g * 0.5, color.b * 0.5, color.a)
+ color = numpy.array([color.r, color.g, color.b, color.a], numpy.float32)
- for i in range(len(self._data)):
- vertices[offset + i, :] = self._data[i, :]
- colors[offset + i, 0] = color.r
- colors[offset + i, 1] = color.g
- colors[offset + i, 2] = color.b
- colors[offset + i, 3] = color.a
-
- self._end = self._begin + len(self._data) - 1
+ vertices[self._begin:self._end + 1, :] = self._data[:, :]
+ colors[self._begin:self._end + 1, :] = color
for i in range(self._begin, self._end):
indices[i, 0] = i