chiark / gitweb /
Move the validators from gui to util, they do not have gui specific code.
[cura.git] / Cura / gui / expertConfig.py
1 from __future__ import absolute_import
2 import __init__
3
4 import wx, os, platform, types
5 import ConfigParser
6
7 from gui import configBase
8 from gui import preview3d
9 from gui import sliceProgessPanel
10 from gui import alterationPanel
11 from util import validators
12
13 class expertConfigWindow(configBase.configWindowBase):
14         "Expert configuration window"
15         def __init__(self):
16                 super(expertConfigWindow, self).__init__(title='Expert config')
17
18                 wx.EVT_CLOSE(self, self.OnClose)
19
20                 left, right, main = self.CreateConfigPanel(self)
21                 
22                 configBase.TitleRow(left, "Accuracy")
23                 c = configBase.SettingRow(left, "Extra Wall thickness for bottom/top (mm)", 'extra_base_wall_thickness', '0.0', 'Additional wall thickness of the bottom and top layers.')
24                 validators.validFloat(c, 0.0)
25                 
26                 configBase.TitleRow(left, "Cool")
27                 c = configBase.SettingRow(left, "Minimum feedrate (mm/s)", 'cool_min_feedrate', '5', 'The minimal layer time can cause the print to slow down so much it starts to ooze. The minimal feedrate protects against this. Even if a print gets slown down it will never be slower then this minimal feedrate.')
28                 validators.validFloat(c, 0.0)
29                 c = configBase.SettingRow(left, "Fan on layer number", 'fan_layer', '0', '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.')
30                 validators.validInt(c, 0)
31                 c = configBase.SettingRow(left, "Fan speed min (%)", 'fan_speed', '100', 'When the fan is turned on, it is enabled at this speed setting. If cool slows down the layer, the fan is adjusted between the min and max speed. Minimal fan speed is used if the layer is not slowed down due to cooling.')
32                 validators.validInt(c, 0, 100)
33                 c = configBase.SettingRow(left, "Fan speed max (%)", 'fan_speed_max', '100', 'When the fan is turned on, it is enabled at this speed setting. If cool slows down the layer, the fan is adjusted between the min and max speed. Maximal fan speed is used if the layer is slowed down due to cooling by more then 200%.')
34                 validators.validInt(c, 0, 100)
35
36                 configBase.TitleRow(left, "Raft (if enabled)")
37                 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.')
38                 validators.validFloat(c, 0.0)
39                 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.')
40                 validators.validFloat(c, 0.0)
41                 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.')
42                 validators.validFloat(c, 0.0)
43
44                 configBase.TitleRow(left, "Support")
45                 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.')
46                 validators.validFloat(c, 0.0)
47                 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.')
48                 validators.validFloat(c, 0.0)
49
50                 configBase.TitleRow(right, "Infill")
51                 c = configBase.SettingRow(right, "Infill pattern", 'infill_type', ['Line', 'Grid Circular', 'Grid Hexagonal', 'Grid Rectangular'], 'Pattern of the none-solid infill. Line is default, but grids can provide a strong print.')
52                 c = configBase.SettingRow(right, "Solid infill top", 'solid_top', True, 'Create a solid top surface, if set to false the top is filled with the fill percentage. Useful for cups/vases.')
53                 c = configBase.SettingRow(right, "Infill overlap (%)", 'fill_overlap', '15', '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.')
54                 validators.validFloat(c, 0.0)
55
56                 configBase.TitleRow(right, "Bridge")
57                 c = configBase.SettingRow(right, "Bridge speed (%)", 'bridge_speed', '100', 'Speed at which layers with bridges are printed, compared to normal printing speed.')
58                 validators.validFloat(c, 0.0)
59                 
60                 configBase.TitleRow(right, "Sequence")
61                 c = configBase.SettingRow(right, "Print order sequence", 'sequence', ['Loops > Perimeter > Infill', 'Loops > Infill > Perimeter', 'Infill > Loops > Perimeter', 'Infill > Perimeter > Loops', 'Perimeter > Infill > Loops', 'Perimeter > Loops > Infill'], 'Sequence of printing. The perimeter is the outer print edge, the loops are the insides of the walls, and the infill is the insides.');
62                 c = configBase.SettingRow(right, "Force first layer sequence", 'force_first_layer_sequence', True, 'This setting forces the order of the first layer to be \'Perimeter > Loops > Infill\'')
63
64                 configBase.TitleRow(right, "Joris")
65                 c = configBase.SettingRow(right, "Joris the outer edge", 'joris', False, '[Joris] is a code name for smoothing out the Z move of the outer edge. This will create a steady Z increase over the whole print. It is intended to be used with a single walled wall thickness to make cups/vases.')
66
67                 configBase.TitleRow(right, "Retraction")
68                 c = configBase.SettingRow(right, "Retract on jumps only", 'retract_on_jumps_only', True, '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.')
69
70                 configBase.TitleRow(right, "Dwindle")
71                 c = configBase.SettingRow(right, "Enable dwindle", 'enable_dwindle', False, 'Dwindle is used to slow down near the end of a printed line, and reducing the amount of filament printed near the end. This to release the preasure on the printer head.')
72                 c = configBase.SettingRow(right, "Pent up volume (mm3)", 'dwindle_pent_up_volume', '0.4', 'Amount of plastic inside the nozzle under pressure. This normally comes out as ooze after printing.')
73                 validators.validFloat(c, 0.0001)
74                 c = configBase.SettingRow(right, "Slow down volume (mm3)", 'dwindle_slowdown_volume', '5.0', 'Amount of printing volume that is used to slow down to release the pressure.')
75                 validators.validFloat(c, 0.0001)
76
77                 main.Fit()
78                 self.Fit()
79
80         def OnClose(self, e):
81                 self.Destroy()