chiark / gitweb /
Multiple extruders, not functional yet. Final GCode has wrong E values. But the idea...
[cura.git] / Cura / gui / preferencesDialog.py
1 from __future__ import absolute_import\r
2 import __init__\r
3 \r
4 import wx, os, platform, types\r
5 import ConfigParser\r
6 \r
7 from gui import configBase\r
8 from gui import validators\r
9 from gui import machineCom\r
10 \r
11 class preferencesDialog(configBase.configWindowBase):\r
12         def __init__(self, parent):\r
13                 super(preferencesDialog, self).__init__(title="Preferences")\r
14                 \r
15                 wx.EVT_CLOSE(self, self.OnClose)\r
16                 \r
17                 left, right, main = self.CreateConfigPanel(self)\r
18                 configBase.TitleRow(left, 'Machine settings')\r
19                 c = configBase.SettingRow(left, 'Steps per E', 'steps_per_e', '0', 'Amount of steps per mm filament extrusion', type = 'preference')\r
20                 validators.validFloat(c, 0.1)\r
21                 c = configBase.SettingRow(left, 'Machine width (mm)', 'machine_width', '205', 'Size of the machine in mm', type = 'preference')\r
22                 validators.validFloat(c, 10.0)\r
23                 c = configBase.SettingRow(left, 'Machine depth (mm)', 'machine_depth', '205', 'Size of the machine in mm', type = 'preference')\r
24                 validators.validFloat(c, 10.0)\r
25                 c = configBase.SettingRow(left, 'Machine height (mm)', 'machine_height', '200', 'Size of the machine in mm', type = 'preference')\r
26                 validators.validFloat(c, 10.0)\r
27                 c = configBase.SettingRow(left, 'Extruder count', 'extruder_amount', ['1', '2', '3', '4'], 'Amount of extruders in your machine.', type = 'preference')\r
28 \r
29                 configBase.TitleRow(left, 'Filament settings')\r
30                 c = configBase.SettingRow(left, 'Filament density (kg/m3)', 'filament_density', '1300', 'Weight of the filament per m3. Around 1300 for PLA. And around 1040 for ABS. This value is used to estimate the weight if the filament used for the print.', type = 'preference')\r
31                 validators.validFloat(c, 500.0, 3000.0)\r
32                 c = configBase.SettingRow(left, 'Filament cost (price/kg)', 'filament_cost_kg', '0', 'Cost of your filament per kg, to estimate the cost of the final print.', type = 'preference')\r
33                 validators.validFloat(c, 0.0)\r
34                 c = configBase.SettingRow(left, 'Filament cost (price/m)', 'filament_cost_meter', '0', 'Cost of your filament per meter, to estimate the cost of the final print.', type = 'preference')\r
35                 validators.validFloat(c, 0.0)\r
36                 \r
37                 configBase.TitleRow(left, 'Communication settings')\r
38                 c = configBase.SettingRow(left, 'Serial port', 'serial_port', ['AUTO'] + machineCom.serialList(), 'Serial port to use for communication with the printer', type = 'preference')\r
39                 c = configBase.SettingRow(left, 'Baudrate', 'serial_baud', '250000', 'Speed of the serial port communication\nNeeds to match your firmware settings\nCommon values are 250000, 115200, 57600', type = 'preference')\r
40 \r
41                 configBase.TitleRow(left, 'Slicer settings')\r
42                 #c = configBase.SettingRow(left, 'Slicer selection', 'slicer', ['Cura (Skeinforge based)', 'Slic3r'], 'Which slicer to use to slice objects. Usually the Cura engine produces the best results. But Slic3r is developing fast and is faster with slicing.', type = 'preference')\r
43                 c = configBase.SettingRow(left, 'Save profile on slice', 'save_profile', False, 'When slicing save the profile as [stl_file]_profile.ini next to the model.', type = 'preference')\r
44                 \r
45                 self.MakeModal(True)\r
46                 main.Fit()\r
47                 self.Fit()\r
48 \r
49         def OnClose(self, e):\r
50                 self.MakeModal(False)\r
51                 self.Destroy()\r