1 from __future__ import absolute_import
5 from Cura.util import profile
7 class simpleModePanel(wx.Panel):
8 "Main user interface window for Quickprint mode"
9 def __init__(self, parent):
10 super(simpleModePanel, self).__init__(parent)
12 #toolsMenu = wx.Menu()
13 #i = toolsMenu.Append(-1, 'Switch to Normal mode...')
14 #self.Bind(wx.EVT_MENU, self.OnNormalSwitch, i)
15 #self.menubar.Insert(1, toolsMenu, 'Normal mode')
17 printTypePanel = wx.Panel(self)
18 self.printTypeNormal = wx.RadioButton(printTypePanel, -1, 'Normal quality print', style=wx.RB_GROUP)
19 self.printTypeLow = wx.RadioButton(printTypePanel, -1, 'Fast low quality print')
20 self.printTypeHigh = wx.RadioButton(printTypePanel, -1, 'High quality print')
21 self.printTypeJoris = wx.RadioButton(printTypePanel, -1, 'Thin walled cup or vase')
23 printMaterialPanel = wx.Panel(self)
24 self.printMaterialPLA = wx.RadioButton(printMaterialPanel, -1, 'PLA', style=wx.RB_GROUP)
25 self.printMaterialABS = wx.RadioButton(printMaterialPanel, -1, 'ABS')
26 self.printMaterialDiameter = wx.TextCtrl(printMaterialPanel, -1, profile.getProfileSetting('filament_diameter'))
28 self.printSupport = wx.CheckBox(self, -1, 'Print support structure')
30 sizer = wx.GridBagSizer()
33 sb = wx.StaticBox(printTypePanel, label="Select a print type:")
34 boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)
35 boxsizer.Add(self.printTypeNormal)
36 boxsizer.Add(self.printTypeLow)
37 boxsizer.Add(self.printTypeHigh)
38 boxsizer.Add(self.printTypeJoris)
39 printTypePanel.SetSizer(wx.BoxSizer(wx.VERTICAL))
40 printTypePanel.GetSizer().Add(boxsizer, flag=wx.EXPAND)
41 sizer.Add(printTypePanel, (0,0), flag=wx.EXPAND)
43 sb = wx.StaticBox(printMaterialPanel, label="Material:")
44 boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)
45 boxsizer.Add(self.printMaterialPLA)
46 boxsizer.Add(self.printMaterialABS)
47 boxsizer.Add(wx.StaticText(printMaterialPanel, -1, 'Diameter:'))
48 boxsizer.Add(self.printMaterialDiameter)
49 printMaterialPanel.SetSizer(wx.BoxSizer(wx.VERTICAL))
50 printMaterialPanel.GetSizer().Add(boxsizer, flag=wx.EXPAND)
51 sizer.Add(printMaterialPanel, (1,0), flag=wx.EXPAND)
53 sb = wx.StaticBox(self, label="Other:")
54 boxsizer = wx.StaticBoxSizer(sb, wx.VERTICAL)
55 boxsizer.Add(self.printSupport)
56 sizer.Add(boxsizer, (2,0), flag=wx.EXPAND)
58 self.printTypeNormal.SetValue(True)
59 self.printMaterialPLA.SetValue(True)
62 put = profile.putProfileSetting
63 get = profile.getProfileSetting
65 put('layer_height', '0.2')
66 put('wall_thickness', '0.8')
67 put('solid_layer_thickness', '0.6')
68 put('fill_density', '20')
69 put('skirt_line_count', '1')
70 put('skirt_gap', '6.0')
71 put('print_speed', '50')
72 put('print_temperature', '220')
73 put('support', 'None')
74 put('retraction_enable', 'False')
75 put('retraction_min_travel', '5.0')
76 put('retraction_speed', '40.0')
77 put('retraction_amount', '4.5')
78 put('retraction_extra', '0.0')
79 put('travel_speed', '150')
80 put('max_z_speed', '3.0')
81 put('bottom_layer_speed', '25')
82 put('cool_min_layer_time', '10')
83 put('fan_enabled', 'True')
85 put('fan_speed', '100')
86 #put('model_scale', '1.0')
87 #put('flip_x', 'False')
88 #put('flip_y', 'False')
89 #put('flip_z', 'False')
90 #put('model_rotate_base', '0')
91 #put('model_multiply_x', '1')
92 #put('model_multiply_y', '1')
93 put('extra_base_wall_thickness', '0.0')
94 put('sequence', 'Loops > Perimeter > Infill')
95 put('force_first_layer_sequence', 'True')
96 put('infill_type', 'Line')
97 put('solid_top', 'True')
98 put('fill_overlap', '15')
99 put('support_rate', '50')
100 put('support_distance', '0.5')
101 put('joris', 'False')
102 put('cool_min_feedrate', '5')
103 put('bridge_speed', '100')
104 put('raft_margin', '5')
105 put('raft_base_material_amount', '100')
106 put('raft_interface_material_amount', '100')
107 put('bottom_thickness', '0.0')
109 if self.printSupport.GetValue():
110 put('support', 'Exterior Only')
112 nozzle_size = float(get('nozzle_size'))
113 if self.printTypeNormal.GetValue():
114 put('wall_thickness', nozzle_size * 2.0)
115 put('layer_height', '0.2')
116 put('fill_density', '20')
117 elif self.printTypeLow.GetValue():
118 put('wall_thickness', nozzle_size * 1.4)
119 put('layer_height', '0.25')
120 put('fill_density', '10')
121 put('print_speed', '80')
122 put('cool_min_layer_time', '3')
123 put('bottom_layer_speed', '40')
124 elif self.printTypeHigh.GetValue():
125 put('wall_thickness', nozzle_size * 2.0)
126 put('layer_height', '0.1')
127 put('fill_density', '30')
128 put('bottom_layer_speed', '15')
129 put('bottom_thickness', '0.2')
130 elif self.printTypeJoris.GetValue():
131 put('wall_thickness', nozzle_size * 1.5)
132 put('layer_height', '0.3')
133 put('solid_layer_thickness', '0.9')
134 put('fill_density', '0')
136 put('extra_base_wall_thickness', '15.0')
137 put('sequence', 'Infill > Loops > Perimeter')
138 put('force_first_layer_sequence', 'False')
139 put('solid_top', 'False')
140 put('support', 'None')
141 put('cool_min_layer_time', '3')
143 put('filament_diameter', self.printMaterialDiameter.GetValue())
144 if self.printMaterialPLA.GetValue():
145 put('filament_density', '1.00')
146 put('enable_raft', 'False')
147 put('skirt_line_count', '1')
148 if self.printMaterialABS.GetValue():
149 put('filament_density', '0.85')
150 put('enable_raft', 'True')
151 put('skirt_line_count', '0')
152 put('fan_layer', '1')
153 put('bottom_thickness', '0.0')
154 put('print_temperature', '260')
155 put('plugin_config', '')
157 def updateProfileToControls(self):