From b0e80dc873fc5f78595b1a72b42cbae82b3821b7 Mon Sep 17 00:00:00 2001 From: daid Date: Mon, 13 Jan 2014 08:09:52 +0100 Subject: [PATCH] Add support angle setting. --- Cura/gui/sceneView.py | 2 +- Cura/util/profile.py | 1 + Cura/util/sliceEngine.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cura/gui/sceneView.py b/Cura/gui/sceneView.py index e3ea9e95..ebf28566 100644 --- a/Cura/gui/sceneView.py +++ b/Cura/gui/sceneView.py @@ -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(): diff --git a/Cura/util/profile.py b/Cura/util/profile.py index aaffb193..6a265e1d 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -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.")) diff --git a/Cura/util/sliceEngine.py b/Cura/util/sliceEngine.py index 5fe61887..e968009c 100644 --- a/Cura/util/sliceEngine.py +++ b/Cura/util/sliceEngine.py @@ -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')), -- 2.30.2