chiark / gitweb /
Make the expert settings dialog modal so we can slice again after it closes.
authordaid303 <daid303@gmail.com>
Fri, 19 Apr 2013 19:52:30 +0000 (21:52 +0200)
committerdaid303 <daid303@gmail.com>
Fri, 19 Apr 2013 19:52:30 +0000 (21:52 +0200)
Cura/gui/expertConfig.py
Cura/gui/mainWindow.py
Cura/util/profile.py
Cura/util/sliceEngine.py

index 903dbdff5575754c020e4be2419887555eafc15d..5e9aa4f9736fd98656db70134ca2aeb6c8a3470f 100644 (file)
@@ -5,7 +5,7 @@ import wx
 from Cura.gui import configBase
 from Cura.util import profile
 
-class expertConfigWindow(wx.Frame):
+class expertConfigWindow(wx.Dialog):
        "Expert configuration window"
        def _addSettingsToPanels(self, category, left, right):
                count = len(profile.getSubCategoriesFor(category)) + len(profile.getSettingsForCategory(category))
@@ -29,6 +29,10 @@ class expertConfigWindow(wx.Frame):
 
                left, right, main = self.panel.CreateConfigPanel(self)
                self._addSettingsToPanels('expert', left, right)
+
+               self.okButton = wx.Button(right, -1, 'Ok')
+               right.GetSizer().Add(self.okButton, (right.GetSizer().GetRows(), 0))
+               self.Bind(wx.EVT_BUTTON, lambda e: self.Close(), self.okButton)
                
                main.Fit()
                self.Fit()
index e862950014b0bf592eee3f89f6b02f6c48cb9a64..7b47a9cf9bc07b24df08fecfef900a3991b2aaba 100644 (file)
@@ -386,7 +386,8 @@ class mainWindow(wx.Frame):
        def OnExpertOpen(self, e):
                ecw = expertConfig.expertConfigWindow()
                ecw.Centre()
-               ecw.Show(True)
+               ecw.ShowModal()
+               self.scene.sceneUpdated()
 
        def OnMinecraftImport(self, e):
                mi = minecraftImport.minecraftImportWindow(self)
index fc460393f92368da9bdbcc4a69e30abb4f69f4c1..5f50cf589e8bc4ae09d15caa03bd6ae7ff82577c 100644 (file)
@@ -143,6 +143,7 @@ setting('travel_speed',            150.0, float, 'advanced', 'Speed').setRange(0
 setting('bottom_layer_speed',         20, float, 'advanced', 'Speed').setRange(0.1).setLabel('Bottom layer speed (mm/s)', 'Print speed for the bottom layer, you want to print the first layer slower so it sticks better to the printer bed.')
 setting('cool_min_layer_time',         5, float, 'advanced', 'Cool').setRange(0).setLabel('Minimal layer time (sec)', 'Minimum time spend in a layer, gives the layer time to cool down before the next layer is put on top. If the layer will be placed down too fast the printer will slow down to make sure it has spend at least this amount of seconds printing this layer.')
 #setting('fan_enabled',              True, bool,  'advanced', 'Cool').setLabel('Enable cooling fan', 'Enable the cooling fan during the print. The extra cooling from the cooling fan is essensial during faster prints.')
+
 #setting('max_z_speed',               3.0, float, 'expert',   'Speed').setRange(0.1).setLabel('Max Z speed (mm/s)', 'Speed at which Z moves are done. When you Z axis is properly lubricated you can increase this for less Z blob.')
 #setting('retract_on_jumps_only',    True, bool,  'expert',   'Retraction').setLabel('Retract on jumps only', 'Only retract when we are making a move that is over a hole in the model, else retract on every move. This effects print quality in different ways.')
 setting('fan_layer',                   1, int,   'expert',   'Cool').setRange(0).setLabel('Fan on layer number', 'The layer at which the fan is turned on. The first layer is layer 0. The first layer can stick better if you turn on the fan on, on the 2nd layer.')
@@ -154,7 +155,8 @@ setting('cool_head_lift',           True, bool,  'expert',   'Cool').setLabel('C
 #setting('sequence', 'Loops > Perimeter > Infill', ['Loops > Perimeter > Infill', 'Loops > Infill > Perimeter', 'Infill > Loops > Perimeter', 'Infill > Perimeter > Loops', 'Perimeter > Infill > Loops', 'Perimeter > Loops > Infill'], 'expert', 'Sequence')
 #setting('force_first_layer_sequence', True, bool, 'expert', 'Sequence').setLabel('Force first layer sequence', 'This setting forces the order of the first layer to be \'Perimeter > Loops > Infill\'')
 #setting('infill_type', 'Line', ['Line', 'Grid Circular', 'Grid Hexagonal', 'Grid Rectangular'], 'expert', 'Infill').setLabel('Infill pattern', 'Pattern of the none-solid infill. Line is default, but grids can provide a strong print.')
-#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_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_rate', 50, int, 'expert', 'Support').setRange(0,100).setLabel('Material amount (%)', 'Amount of material used for support, less material gives a weaker support structure which is easier to remove.')
 #setting('support_distance',  0.5, float, 'expert', 'Support').setRange(0).setLabel('Distance from object (mm)', 'Distance between the support structure and the object. Empty gap in which no support structure is printed.')
index 01b89a80c463a79fc3fb5d126ba6677cccd0e98b..6be78773e4fe13f395e7c13367e094b6eae18084 100644 (file)
@@ -157,8 +157,8 @@ class Slicer(object):
                        'filamentDiameter': int(profile.getProfileSettingFloat('filament_diameter') * 1000),
                        'extrusionWidth': int(profile.calculateEdgeWidth() * 1000),
                        'insetCount': int(profile.calculateLineCount()),
-                       'downSkinCount': int(profile.calculateSolidLayerCount()),
-                       'upSkinCount': int(profile.calculateSolidLayerCount()),
+                       'downSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_bottom') == 'True' else 0,
+                       'upSkinCount': int(profile.calculateSolidLayerCount()) if profile.getProfileSetting('solid_top') == 'True' else 0,
                        'sparseInfillLineDistance': int(100 * profile.calculateEdgeWidth() * 1000 / profile.getProfileSettingFloat('fill_density')) if profile.getProfileSettingFloat('fill_density') > 0 else 9999999999,
                        'skirtDistance': int(profile.getProfileSettingFloat('skirt_gap') * 1000),
                        'skirtLineCount': int(profile.getProfileSettingFloat('skirt_line_count')),