From 6246f7e917ee31db61ac9ace8a0590ea17401f5d Mon Sep 17 00:00:00 2001 From: daid303 Date: Tue, 23 Apr 2013 11:23:51 +0200 Subject: [PATCH] Add configurable head size. --- Cura/gui/configWizard.py | 10 ++++++++++ Cura/gui/preferencesDialog.py | 15 +++++++++++---- Cura/util/profile.py | 13 ++++++------- 3 files changed, 27 insertions(+), 11 deletions(-) diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py index c7055515..f1a2b2ea 100644 --- a/Cura/gui/configWizard.py +++ b/Cura/gui/configWizard.py @@ -251,6 +251,11 @@ class RepRapInfoPage(InfoPage): profile.putProfileSetting('wall_thickness', float(profile.getProfileSettingFloat('nozzle_size')) * 2) profile.putPreference('has_heated_bed', str(self.heatedBed.GetValue())) profile.putPreference('machine_center_is_zero', str(self.HomeAtCenter.GetValue())) + profile.putPreference('extruder_head_size_min_x', '0') + profile.putPreference('extruder_head_size_min_y', '0') + profile.putPreference('extruder_head_size_max_x', '0') + profile.putPreference('extruder_head_size_max_y', '0') + profile.putPreference('extruder_head_size_height', '0') class MachineSelectPage(InfoPage): @@ -284,6 +289,11 @@ class MachineSelectPage(InfoPage): profile.putPreference('machine_type', 'ultimaker') profile.putPreference('machine_center_is_zero', 'False') profile.putProfileSetting('nozzle_size', '0.4') + profile.putPreference('extruder_head_size_min_x', '75.0') + profile.putPreference('extruder_head_size_min_y', '18.0') + profile.putPreference('extruder_head_size_max_x', '18.0') + profile.putPreference('extruder_head_size_max_y', '35.0') + profile.putPreference('extruder_head_size_height', '60.0') else: profile.putPreference('machine_width', '80') profile.putPreference('machine_depth', '80') diff --git a/Cura/gui/preferencesDialog.py b/Cura/gui/preferencesDialog.py index e2940e4c..602f32df 100644 --- a/Cura/gui/preferencesDialog.py +++ b/Cura/gui/preferencesDialog.py @@ -26,16 +26,23 @@ class preferencesDialog(wx.Dialog): configBase.SettingRow(left, 'machine_height') configBase.SettingRow(left, 'extruder_amount') configBase.SettingRow(left, 'has_heated_bed') - + + configBase.TitleRow(left, 'Printer head size') + configBase.SettingRow(left, 'extruder_head_size_min_x') + configBase.SettingRow(left, 'extruder_head_size_min_y') + configBase.SettingRow(left, 'extruder_head_size_max_x') + configBase.SettingRow(left, 'extruder_head_size_max_y') + configBase.SettingRow(left, 'extruder_head_size_height') + for i in xrange(1, self.oldExtruderAmount): configBase.TitleRow(left, 'Extruder %d' % (i+1)) configBase.SettingRow(left, 'extruder_offset_x%d' % (i)) configBase.SettingRow(left, 'extruder_offset_y%d' % (i)) - configBase.TitleRow(left, 'Colours') - configBase.SettingRow(left, 'model_colour', wx.Colour) + configBase.TitleRow(right, 'Colours') + configBase.SettingRow(right, 'model_colour', wx.Colour) for i in xrange(1, self.oldExtruderAmount): - configBase.SettingRow(left, 'model_colour%d' % (i+1), wx.Colour) + configBase.SettingRow(right, 'model_colour%d' % (i+1), wx.Colour) configBase.TitleRow(right, 'Filament settings') configBase.SettingRow(right, 'filament_physical_density') diff --git a/Cura/util/profile.py b/Cura/util/profile.py index e3f06619..a10e49e7 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -254,7 +254,7 @@ setting('extruder_offset_y2', '0.0', float, 'preference', 'hidden').setLabel('Of setting('extruder_offset_x3', '0.0', float, 'preference', 'hidden').setLabel('Offset X', 'The offset of your secondary extruder compared to the primary.') setting('extruder_offset_y3', '0.0', float, 'preference', 'hidden').setLabel('Offset Y', 'The offset of your secondary extruder compared to the primary.') setting('filament_physical_density', '1300', float, 'preference', 'hidden').setRange(500.0, 3000.0).setLabel('Density (kg/m3)', '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.') -setting('steps_per_e', '0', float, 'preference', 'hidden').setRange(0).setLabel('E-Steps per 1mm filament', 'Amount of steps per mm filament extrusion') +setting('steps_per_e', '0', float, 'preference', 'hidden').setLabel('E-Steps per 1mm filament', 'Amount of steps per mm filament extrusion') setting('serial_port', 'AUTO', str, 'preference', 'hidden').setLabel('Serial port', 'Serial port to use for communication with the printer') setting('serial_port_auto', '', str, 'preference', 'hidden') setting('serial_baud', 'AUTO', str, 'preference', 'hidden').setLabel('Baudrate', 'Speed of the serial port communication\nNeeds to match your firmware settings\nCommon values are 250000, 115200, 57600') @@ -266,12 +266,11 @@ setting('sdpath', '', str, 'preference', 'hidden').setLabel('SD card drive', 'Lo setting('check_for_updates', 'True', bool, 'preference', 'hidden').setLabel('Check for updates', 'Check for newer versions of Cura on startup') setting('submit_slice_information', 'False', bool, 'preference', 'hidden').setLabel('Send usage statistics', 'Submit anonymous usage information to improve next versions of Cura') -setting('planner_always_autoplace', 'True', bool, 'preference', 'hidden') -setting('extruder_head_size_min_x', '75.0', float, 'preference', 'hidden') -setting('extruder_head_size_min_y', '18.0', float, 'preference', 'hidden') -setting('extruder_head_size_max_x', '18.0', float, 'preference', 'hidden') -setting('extruder_head_size_max_y', '35.0', float, 'preference', 'hidden') -setting('extruder_head_size_height', '60.0', float, 'preference', 'hidden') +setting('extruder_head_size_min_x', '0.0', float, 'preference', 'hidden').setLabel('Head size towards X min (mm)', 'The head size when printing multiple objects, measured from the tip of the nozzle towards the outer part of the head. 75mm for an Ultimaker if the fan is on the left side.') +setting('extruder_head_size_min_y', '0.0', float, 'preference', 'hidden').setLabel('Head size towards Y min (mm)', 'The head size when printing multiple objects, measured from the tip of the nozzle towards the outer part of the head. 18mm for an Ultimaker if the fan is on the left side.') +setting('extruder_head_size_max_x', '0.0', float, 'preference', 'hidden').setLabel('Head size towards X max (mm)', 'The head size when printing multiple objects, measured from the tip of the nozzle towards the outer part of the head. 18mm for an Ultimaker if the fan is on the left side.') +setting('extruder_head_size_max_y', '0.0', float, 'preference', 'hidden').setLabel('Head size towards Y max (mm)', 'The head size when printing multiple objects, measured from the tip of the nozzle towards the outer part of the head. 35mm for an Ultimaker if the fan is on the left side.') +setting('extruder_head_size_height', '0.0', float, 'preference', 'hidden').setLabel('Printer gantry height (mm)', 'The height of the gantry holding up the printer head. If an object is higher then this then you cannot print multiple objects one for one. XXmm for an Ultimaker.') setting('model_colour', '#7AB645', str, 'preference', 'hidden').setLabel('Model colour') setting('model_colour2', '#CB3030', str, 'preference', 'hidden').setLabel('Model colour (2)') -- 2.30.2