chiark / gitweb /
Add support margin setting to SF and Cura.
authordaid <daid303@gmail.com>
Mon, 23 Apr 2012 13:03:35 +0000 (15:03 +0200)
committerdaid <daid303@gmail.com>
Mon, 23 Apr 2012 13:03:35 +0000 (15:03 +0200)
Cura/cura_sf/fabmetheus_utilities/settings.py
Cura/cura_sf/skeinforge_application/skeinforge_plugins/craft_plugins/raft.py
Cura/gui/expertConfig.py

index 4f53c63a62f94025b447ceaf108e319e7f126c41..bbc9ff397f57b036984c7ad220c1cc03e4ec3426 100644 (file)
@@ -237,6 +237,7 @@ def getProfileInformation():
                        'Support_Gap_over_Perimeter_Extrusion_Width_ratio': calcSupportDistanceRatio,
                        'Support_Material_Choice_': storedSetting('support'),
                        'Support_Minimum_Angle_degrees': DEFSET,
+                       'Support_Margin_mm': storedSettingFloat('support_margin'),
                },'skirt': {
                        'Skirt_line_count': storedSetting("skirt_line_count"),
                        'Convex': "True",
index 38f552c3430f4ba43b9ba03702f24e7c28ff7ef4..8de6c3d38d3020142daec8263838ee20af3c9740 100644 (file)
@@ -400,6 +400,8 @@ class RaftRepository:
                self.supportChoiceExteriorOnly = settings.MenuRadio().getFromMenuButtonDisplay(self.supportMaterialChoice, 'Exterior Only', self, False)
                self.supportMinimumAngle = settings.FloatSpin().getFromValue(40.0, 'Support Minimum Angle (degrees):', self, 80.0, 60.0)
                self.executeTitle = 'Raft'
+               self.supportMargin = settings.FloatSpin().getFromValue(
+                       1.0, 'Support Margin (mm):', self, 5.0, 3.0)
 
        def execute(self):
                'Raft button has been clicked.'
@@ -596,6 +598,7 @@ class RaftSkein:
                self.cornerMinimumComplex = self.cornerMinimum.dropAxis()
                originalExtent = self.cornerMaximumComplex - self.cornerMinimumComplex
                self.raftOutsetRadius = self.repository.raftMargin.value + self.repository.raftAdditionalMarginOverLengthPercent.value * 0.01 * max(originalExtent.real, originalExtent.imag)
+               self.supportOutsetRadius = self.repository.supportMargin.value
                self.setBoundaryLayers()
                outsetSeparateLoops = intercircle.getInsetSeparateLoopsFromLoops(self.boundaryLayers[0].loops, -self.raftOutsetRadius, 0.8)
                self.interfaceIntersectionsTable = {}
@@ -1035,7 +1038,7 @@ class RaftSkein:
                        euclidean.joinXIntersectionsTables(aboveXIntersectionsTable, xIntersectionsTable)
                for supportLayerIndex in xrange(len(self.supportLayers)):
                        supportLayer = self.supportLayers[supportLayerIndex]
-                       self.extendXIntersections(supportLayer.supportLoops, self.raftOutsetRadius, supportLayer.xIntersectionsTable)
+                       self.extendXIntersections(supportLayer.supportLoops, self.supportOutsetRadius, supportLayer.xIntersectionsTable)
                for supportLayer in self.supportLayers:
                        euclidean.subtractXIntersectionsTable(supportLayer.xIntersectionsTable, supportLayer.fillXIntersectionsTable)
                self.addSegmentTablesToSupportLayers()
index 2e03548891dd011d660a7223cd7398f973f0f5b0..8c2f9cf4cdb911e456d68a5fdfd5ecc941b8a8ba 100644 (file)
@@ -32,17 +32,19 @@ class expertConfigWindow(configBase.configWindowBase):
                validators.validInt(c, 0, 100)
 
                configBase.TitleRow(left, "Raft (if enabled)")
-               c = configBase.SettingRow(left, "Raft extra margin (mm)", 'raft_margin', '3.0', 'If the raft is enabled, this is the extra raft area around the object which is also rafted. Increasing this margin will create a stronger raft.')
+               c = configBase.SettingRow(left, "Extra margin (mm)", 'raft_margin', '3.0', 'If the raft is enabled, this is the extra raft area around the object which is also rafted. Increasing this margin will create a stronger raft.')
                validators.validFloat(c, 0.0)
-               c = configBase.SettingRow(left, "Raft base material amount (%)", 'raft_base_material_amount', '100', 'The base layer is the first layer put down as a raft. This layer has thick strong lines and is put firmly on the bed to prevent warping. This setting adjust the amount of material used for the base layer.')
+               c = configBase.SettingRow(left, "Base material amount (%)", 'raft_base_material_amount', '100', 'The base layer is the first layer put down as a raft. This layer has thick strong lines and is put firmly on the bed to prevent warping. This setting adjust the amount of material used for the base layer.')
                validators.validFloat(c, 0.0)
-               c = configBase.SettingRow(left, "Raft interface material amount (%)", 'raft_interface_material_amount', '100', 'The interface layer is a weak thin layer between the base layer and the printed object. It is designed to has little material to make it easy to break the base off the printed object. This setting adjusts the amount of material used for the interface layer.')
+               c = configBase.SettingRow(left, "Interface material amount (%)", 'raft_interface_material_amount', '100', 'The interface layer is a weak thin layer between the base layer and the printed object. It is designed to has little material to make it easy to break the base off the printed object. This setting adjusts the amount of material used for the interface layer.')
                validators.validFloat(c, 0.0)
 
                configBase.TitleRow(left, "Support")
-               c = configBase.SettingRow(left, "Support material amount (%)", 'support_rate', '100', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.')
+               c = configBase.SettingRow(left, "Material amount (%)", 'support_rate', '100', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.')
                validators.validFloat(c, 0.0)
-               c = configBase.SettingRow(left, "Support distance from object (mm)", 'support_distance', '0.5', 'Distance between the support structure and the object.')
+               c = configBase.SettingRow(left, "Distance from object (mm)", 'support_distance', '0.5', 'Distance between the support structure and the object. Empty gap in which no support structure is printed.')
+               validators.validFloat(c, 0.0)
+               c = configBase.SettingRow(left, "Extra margin (mm)", 'support_margin', '3.0', 'Extra margin which is used to extend the support lines outwards. A margin of 0 generates support structure only directly underneath the model.')
                validators.validFloat(c, 0.0)
 
                configBase.TitleRow(right, "Infill")