chiark / gitweb /
Add support angle setting.
authordaid <daid303@gmail.com>
Mon, 13 Jan 2014 07:09:52 +0000 (08:09 +0100)
committerdaid <daid303@gmail.com>
Mon, 13 Jan 2014 07:09:52 +0000 (08:09 +0100)
Cura/gui/sceneView.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index e3ea9e95d1c7b8e8bd0b97c706c4b348f86d1040..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():
index aaffb193716e52e3e1de780bab1930307d096e60..6a265e1d9ccb507c94e6bc46c9e99897c2b8d70d 100644 (file)
@@ -207,6 +207,7 @@ setting('cool_head_lift',          False, bool,  'expert',   _('Cool')).setLabel
 setting('solid_top', True, bool, 'expert', _('Infill')).setLabel(_("Solid infill top"), _("Create a solid top surface, if set to false the top is filled with the fill percentage. Useful for cups/vases."))
 setting('solid_bottom', True, bool, 'expert', _('Infill')).setLabel(_("Solid infill bottom"), _("Create a solid bottom surface, if set to false the bottom is filled with the fill percentage. Useful for buildings."))
 setting('fill_overlap', 15, int, 'expert', _('Infill')).setRange(0,100).setLabel(_("Infill overlap (%)"), _("Amount of overlap between the infill and the walls. There is a slight overlap with the walls and the infill so the walls connect firmly to the infill."))
+setting('support_angle', 60, float, 'expert', _('Support')).setRange(0,90).setLabel(_("Overhang angle for support (deg)"), _("The minimal angle that overhangs need to have to get support. With 0deg being horizontal and 90deg being vertical."))
 setting('support_fill_rate', 15, int, 'expert', _('Support')).setRange(0,100).setLabel(_("Fill amount (%)"), _("Amount of infill structure in the support material, less material gives weaker support which is easier to remove. 15% seems to be a good average."))
 setting('support_xy_distance', 0.7, float, 'expert', _('Support')).setRange(0,10).setLabel(_("Distance X/Y (mm)"), _("Distance of the support material from the print, in the X/Y directions.\n0.7mm gives a nice distance from the print so the support does not stick to the print."))
 setting('support_z_distance', 0.15, float, 'expert', _('Support')).setRange(0,10).setLabel(_("Distance Z (mm)"), _("Distance from the top/bottom of the support to the print. A small gap here makes it easier to remove the support but makes the print a bit uglier.\n0.15mm gives a good seperation of the support material."))
index 5fe61887351a09fd818b4491e7a50c9f0261eb37..e968009cda6d170815e9a1ba3204d4fb4c2c093a 100644 (file)
@@ -280,7 +280,7 @@ class Slicer(object):
                        'moveSpeed': int(profile.getProfileSettingFloat('travel_speed')),
                        'fanSpeedMin': int(profile.getProfileSettingFloat('fan_speed')) if profile.getProfileSetting('fan_enabled') == 'True' else 0,
                        'fanSpeedMax': int(profile.getProfileSettingFloat('fan_speed_max')) if profile.getProfileSetting('fan_enabled') == 'True' else 0,
-                       'supportAngle': int(-1) if profile.getProfileSetting('support') == 'None' else int(60),
+                       'supportAngle': int(-1) if profile.getProfileSetting('support') == 'None' else int(profile.getProfileSettingFloat('support_angle')),
                        'supportEverywhere': int(1) if profile.getProfileSetting('support') == 'Everywhere' else int(0),
                        'supportLineDistance': int(100 * profile.calculateEdgeWidth() * 1000 / profile.getProfileSettingFloat('support_fill_rate')) if profile.getProfileSettingFloat('support_fill_rate') > 0 else -1,
                        'supportXYDistance': int(1000 * profile.getProfileSettingFloat('support_xy_distance')),