chiark / gitweb /
Added witbox_platform.stl to view it when you choose a witbox machine
authorpaclema <paclema@gmail.com>
Tue, 5 Aug 2014 09:25:50 +0000 (11:25 +0200)
committerpaclema <paclema@gmail.com>
Tue, 5 Aug 2014 09:25:50 +0000 (11:25 +0200)
Cura/gui/sceneView.py
resources/meshes/Witbox_platform.stl [new file with mode: 0644]

index 2913e4b5e3a19e0e20b9c1fee41b0993039d4a94..d2a2b0969ae89f4cff6f3da037ce961a62380b98 100644 (file)
@@ -1290,6 +1290,20 @@ class SceneView(openglGui.glGuiPanel):
                                glDisable(GL_TEXTURE_2D)
                                glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
                                glPopMatrix()
+                               
+               elif machine.startswith('Witbox'):
+                       if machine not in self._platformMesh:
+                               meshes = meshLoader.loadMeshes(resources.getPathForMesh(machine + '_platform.stl'))
+                               if len(meshes) > 0:
+                                       self._platformMesh[machine] = meshes[0]
+                               else:
+                                       self._platformMesh[machine] = None
+                               if machine == 'Witbox':
+                                       self._platformMesh[machine]._drawOffset = numpy.array([0,-37,145], numpy.float32)
+                       glColor4f(1,1,1,0.5)
+                       self._objectShader.bind()
+                       self._renderObject(self._platformMesh[machine], False, False)
+                       self._objectShader.unbind()
                else:
                        glColor4f(0,0,0,1)
                        glLineWidth(3)
diff --git a/resources/meshes/Witbox_platform.stl b/resources/meshes/Witbox_platform.stl
new file mode 100644 (file)
index 0000000..7d83c0f
Binary files /dev/null and b/resources/meshes/Witbox_platform.stl differ