chiark / gitweb /
Add support angle setting.
[cura.git] / Cura / gui / sceneView.py
index 0b9349331f0982375170c17d9dfd07abaa2672ea..ebf28566e3d8c15d0a354e6b544b475effdfc9cd 100644 (file)
@@ -1135,7 +1135,7 @@ void main(void)
 
                        if self.viewMode == 'overhang':
                                self._objectOverhangShader.bind()
-                               self._objectOverhangShader.setUniform('cosAngle', math.cos(math.radians(90 - 60)))
+                               self._objectOverhangShader.setUniform('cosAngle', math.cos(math.radians(90 - profile.getProfileSettingFloat('support_angle'))))
                        else:
                                self._objectShader.bind()
                        for obj in self._scene.objects():
@@ -1427,12 +1427,17 @@ void main(void)
 
                polys = profile.getMachineSizePolygons()
                height = profile.getMachineSettingFloat('machine_height')
+               circular = profile.getMachineSetting('machine_shape') == 'Circular'
                glBegin(GL_QUADS)
                for n in xrange(0, len(polys[0])):
-                       if n % 2 == 0:
-                               glColor4ub(5, 171, 231, 96)
+                       if not circular:
+                               if n % 2 == 0:
+                                       glColor4ub(5, 171, 231, 96)
+                               else:
+                                       glColor4ub(5, 171, 231, 64)
                        else:
-                               glColor4ub(5, 171, 231, 64)
+                               glColor4ub(5, 171, 231, 96)
+
                        glVertex3f(polys[0][n][0], polys[0][n][1], height)
                        glVertex3f(polys[0][n][0], polys[0][n][1], 0)
                        glVertex3f(polys[0][n-1][0], polys[0][n-1][1], 0)