Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaid <daid303@gmail.com>2013-10-06 18:37:27 +0400
committerdaid <daid303@gmail.com>2013-10-06 18:37:27 +0400
commita7daeec1ff1a38ca45b759aeafbab5b4c6547ef1 (patch)
treebfc305a25bb599f54f048c14fea0cc26bff0fb2d
parent64069aa53b3dc4d45f620e26ad8db4331f14cd8b (diff)
Add default machine profiles for other machines then Ultimakers.
-rw-r--r--Cura/gui/aboutWindow.py6
-rw-r--r--Cura/gui/configWizard.py90
-rw-r--r--Cura/gui/preferencesDialog.py5
-rw-r--r--Cura/resources/machine_profiles/MakerBotReplicator.ini58
-rw-r--r--Cura/resources/machine_profiles/Mendel.ini18
-rw-r--r--Cura/resources/machine_profiles/PrintrBot.ini19
-rw-r--r--Cura/resources/machine_profiles/PrintrBotLC+.ini19
-rw-r--r--Cura/resources/machine_profiles/Prusa Mendel i3.ini18
-rw-r--r--Cura/resources/meshes/Attribution.txt1
-rw-r--r--Cura/util/profile.py17
-rw-r--r--Cura/util/resources.py5
-rw-r--r--build_app.py2
12 files changed, 229 insertions, 29 deletions
diff --git a/Cura/gui/aboutWindow.py b/Cura/gui/aboutWindow.py
index 1e4bed726c..703f008608 100644
--- a/Cura/gui/aboutWindow.py
+++ b/Cura/gui/aboutWindow.py
@@ -42,6 +42,12 @@ class aboutWindow(wx.Dialog):
self.addComponent('EjectMedia', 'Utility to safe-remove SD cards', 'Freeware', 'http://www.uwe-sieber.de/english.html')
self.addComponent('Pymclevel', 'Python library for reading Minecraft levels.', 'ISC', 'https://github.com/mcedit/pymclevel')
+ #Translations done by:
+ #Dutch: Charlotte Jansen
+ #German: Gregor Luetolf
+ #Polish: Piotr Paczynski
+ #French: Jeremie Francois
+ #Spanish: Jose Gemez
self.Fit()
def addComponent(self, name, description, license, url):
diff --git a/Cura/gui/configWizard.py b/Cura/gui/configWizard.py
index 2884d6925c..c26c846016 100644
--- a/Cura/gui/configWizard.py
+++ b/Cura/gui/configWizard.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
__copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
+import os
import webbrowser
import threading
import time
@@ -14,7 +15,7 @@ from Cura.gui import printWindow
from Cura.util import machineCom
from Cura.util import profile
from Cura.util import gcodeGenerator
-from Cura.util.resources import getPathForImage
+from Cura.util import resources
class InfoBox(wx.Panel):
@@ -25,14 +26,14 @@ class InfoBox(wx.Panel):
self.sizer = wx.GridBagSizer(5, 5)
self.SetSizer(self.sizer)
- self.attentionBitmap = wx.Bitmap(getPathForImage('attention.png'))
- self.errorBitmap = wx.Bitmap(getPathForImage('error.png'))
- self.readyBitmap = wx.Bitmap(getPathForImage('ready.png'))
+ self.attentionBitmap = wx.Bitmap(resources.getPathForImage('attention.png'))
+ self.errorBitmap = wx.Bitmap(resources.getPathForImage('error.png'))
+ self.readyBitmap = wx.Bitmap(resources.getPathForImage('ready.png'))
self.busyBitmap = [
- wx.Bitmap(getPathForImage('busy-0.png')),
- wx.Bitmap(getPathForImage('busy-1.png')),
- wx.Bitmap(getPathForImage('busy-2.png')),
- wx.Bitmap(getPathForImage('busy-3.png'))
+ wx.Bitmap(resources.getPathForImage('busy-0.png')),
+ wx.Bitmap(resources.getPathForImage('busy-1.png')),
+ wx.Bitmap(resources.getPathForImage('busy-2.png')),
+ wx.Bitmap(resources.getPathForImage('busy-3.png'))
]
self.bitmap = wx.StaticBitmap(self, -1, wx.EmptyBitmapRGBA(24, 24, red=255, green=255, blue=255, alpha=1))
@@ -232,11 +233,47 @@ class FirstInfoPage(InfoPage):
#self.AddText('* Do your first print')
-class RepRapInfoPage(InfoPage):
+class OtherMachineSelectPage(InfoPage):
def __init__(self, parent):
- super(RepRapInfoPage, self).__init__(parent, "RepRap information")
- self.AddText(
- _("RepRap machines are vastly different, and there is no\ndefault configuration in Cura for any of them."))
+ super(OtherMachineSelectPage, self).__init__(parent, "Other machine information")
+ self.AddText(_("The following pre-defined machine profiles are available"))
+ self.AddText(_("Note that these profiles are not guaranteed to give good results,\nor work at all. Extra tweaks might be required."))
+ self.options = []
+ machines = resources.getDefaultMachineProfiles()
+ machines.sort()
+ for filename in machines:
+ name = os.path.splitext(os.path.basename(filename))[0]
+ item = self.AddRadioButton(name)
+ item.filename = filename
+ item.Bind(wx.EVT_RADIOBUTTON, self.OnProfileSelect)
+ self.options.append(item)
+ self.AddSeperator()
+ item = self.AddRadioButton('Custom...')
+ item.SetValue(True)
+ item.Bind(wx.EVT_RADIOBUTTON, self.OnOtherSelect)
+
+ def OnProfileSelect(self, e):
+ wx.wizard.WizardPageSimple.Chain(self, self.GetParent().otherMachineInfoPage)
+
+ def OnOtherSelect(self, e):
+ wx.wizard.WizardPageSimple.Chain(self, self.GetParent().customRepRapInfoPage)
+
+ def StoreData(self):
+ for option in self.options:
+ if option.GetValue():
+ profile.loadProfile(option.filename)
+ profile.loadMachineSettings(option.filename)
+
+class OtherMachineInfoPage(InfoPage):
+ def __init__(self, parent):
+ super(OtherMachineInfoPage, self).__init__(parent, "Cura Ready!")
+ self.AddText(_("Cura is now ready to be used!"))
+
+class CustomRepRapInfoPage(InfoPage):
+ def __init__(self, parent):
+ super(CustomRepRapInfoPage, self).__init__(parent, "Custom RepRap information")
+ self.AddText(_("RepRap machines can be vastly different, so here you can set your own settings."))
+ self.AddText(_("Be sure to review the default profile before running it on your machine."))
self.AddText(_("If you like a default profile for your machine added,\nthen make an issue on github."))
self.AddSeperator()
self.AddText(_("You will have to manually install Marlin or Sprinter firmware."))
@@ -275,7 +312,7 @@ class MachineSelectPage(InfoPage):
self.Ultimaker2Radio.Bind(wx.EVT_RADIOBUTTON, self.OnUltimaker2Select)
self.UltimakerRadio = self.AddRadioButton("Ultimaker")
self.UltimakerRadio.Bind(wx.EVT_RADIOBUTTON, self.OnUltimakerSelect)
- self.OtherRadio = self.AddRadioButton(_("Other (Ex: RepRap)"))
+ self.OtherRadio = self.AddRadioButton(_("Other (Ex: RepRap, MakerBot)"))
self.OtherRadio.Bind(wx.EVT_RADIOBUTTON, self.OnOtherSelect)
self.AddSeperator()
self.AddText(_("The collection of anonymous usage information helps with the continued improvement of Cura."))
@@ -291,7 +328,7 @@ class MachineSelectPage(InfoPage):
wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimakerSelectParts)
def OnOtherSelect(self, e):
- wx.wizard.WizardPageSimple.Chain(self, self.GetParent().repRapInfoPage)
+ wx.wizard.WizardPageSimple.Chain(self, self.GetParent().otherMachineSelectPage)
def AllowNext(self):
wx.wizard.WizardPageSimple.Chain(self, self.GetParent().ultimaker2ReadyPage)
@@ -404,16 +441,16 @@ class UltimakerCheckupPage(InfoPage):
def __init__(self, parent):
super(UltimakerCheckupPage, self).__init__(parent, "Ultimaker Checkup")
- self.checkBitmap = wx.Bitmap(getPathForImage('checkmark.png'))
- self.crossBitmap = wx.Bitmap(getPathForImage('cross.png'))
- self.unknownBitmap = wx.Bitmap(getPathForImage('question.png'))
- self.endStopNoneBitmap = wx.Bitmap(getPathForImage('endstop_none.png'))
- self.endStopXMinBitmap = wx.Bitmap(getPathForImage('endstop_xmin.png'))
- self.endStopXMaxBitmap = wx.Bitmap(getPathForImage('endstop_xmax.png'))
- self.endStopYMinBitmap = wx.Bitmap(getPathForImage('endstop_ymin.png'))
- self.endStopYMaxBitmap = wx.Bitmap(getPathForImage('endstop_ymax.png'))
- self.endStopZMinBitmap = wx.Bitmap(getPathForImage('endstop_zmin.png'))
- self.endStopZMaxBitmap = wx.Bitmap(getPathForImage('endstop_zmax.png'))
+ self.checkBitmap = wx.Bitmap(resources.getPathForImage('checkmark.png'))
+ self.crossBitmap = wx.Bitmap(resources.getPathForImage('cross.png'))
+ self.unknownBitmap = wx.Bitmap(resources.getPathForImage('question.png'))
+ self.endStopNoneBitmap = wx.Bitmap(resources.getPathForImage('endstop_none.png'))
+ self.endStopXMinBitmap = wx.Bitmap(resources.getPathForImage('endstop_xmin.png'))
+ self.endStopXMaxBitmap = wx.Bitmap(resources.getPathForImage('endstop_xmax.png'))
+ self.endStopYMinBitmap = wx.Bitmap(resources.getPathForImage('endstop_ymin.png'))
+ self.endStopYMaxBitmap = wx.Bitmap(resources.getPathForImage('endstop_ymax.png'))
+ self.endStopZMinBitmap = wx.Bitmap(resources.getPathForImage('endstop_zmin.png'))
+ self.endStopZMaxBitmap = wx.Bitmap(resources.getPathForImage('endstop_zmax.png'))
self.AddText(
_("It is a good idea to do a few sanity checks now on your Ultimaker.\nYou can skip these if you know your machine is functional."))
@@ -783,7 +820,9 @@ class configWizard(wx.wizard.Wizard):
self.ultimakerCalibrateStepsPerEPage = UltimakerCalibrateStepsPerEPage(self)
self.bedLevelPage = bedLevelWizardMain(self)
self.headOffsetCalibration = headOffsetCalibrationPage(self)
- self.repRapInfoPage = RepRapInfoPage(self)
+ self.otherMachineSelectPage = OtherMachineSelectPage(self)
+ self.customRepRapInfoPage = CustomRepRapInfoPage(self)
+ self.otherMachineInfoPage = OtherMachineInfoPage(self)
self.ultimaker2ReadyPage = Ultimaker2ReadyPage(self)
@@ -794,6 +833,7 @@ class configWizard(wx.wizard.Wizard):
wx.wizard.WizardPageSimple.Chain(self.ultimakerFirmwareUpgradePage, self.ultimakerCheckupPage)
wx.wizard.WizardPageSimple.Chain(self.ultimakerCheckupPage, self.bedLevelPage)
#wx.wizard.WizardPageSimple.Chain(self.ultimakerCalibrationPage, self.ultimakerCalibrateStepsPerEPage)
+ wx.wizard.WizardPageSimple.Chain(self.otherMachineSelectPage, self.customRepRapInfoPage)
self.FitToPage(self.firstInfoPage)
self.GetPageAreaSizer().Add(self.firstInfoPage)
diff --git a/Cura/gui/preferencesDialog.py b/Cura/gui/preferencesDialog.py
index 8dc0199d0a..fe012cffa3 100644
--- a/Cura/gui/preferencesDialog.py
+++ b/Cura/gui/preferencesDialog.py
@@ -27,8 +27,9 @@ class preferencesDialog(wx.Dialog):
for i in xrange(1, extruderCount):
configBase.SettingRow(left, 'model_colour%d' % (i+1), wx.Colour)
- configBase.TitleRow(left, _("Language"))
- configBase.SettingRow(left, 'language', map(lambda n: n[1], resources.getLanguageOptions()))
+ if len(resources.getLanguageOptions()) > 1:
+ configBase.TitleRow(left, _("Language"))
+ configBase.SettingRow(left, 'language', map(lambda n: n[1], resources.getLanguageOptions()))
configBase.TitleRow(right, _("Filament settings"))
configBase.SettingRow(right, 'filament_physical_density')
diff --git a/Cura/resources/machine_profiles/MakerBotReplicator.ini b/Cura/resources/machine_profiles/MakerBotReplicator.ini
new file mode 100644
index 0000000000..793011c9f3
--- /dev/null
+++ b/Cura/resources/machine_profiles/MakerBotReplicator.ini
@@ -0,0 +1,58 @@
+[machine]
+machine_name = MakerBot Replicator
+machine_type = MakerBot
+machine_width = 225
+machine_depth = 145
+machine_height = 150
+machine_center_is_zero = False
+has_heated_bed = True
+gcode_flavor = MakerBot
+extruder_amount = 1
+
+[profile]
+filament_diameter = 1.75
+nozzle_size = 0.4
+layer_height = 0.15
+fill_density = 10
+print_speed = 50
+print_temperature = 220
+travel_speed = 150
+
+[alterations]
+start.gcode = ; -- START GCODE --
+ M136 (enable build)
+ M73 P0
+ G162 X Y F2000(home XY axes maximum)
+ G161 Z F900(home Z axis minimum)
+ G92 X0 Y0 Z-5 A0 B0 (set Z to -5)
+ G1 Z0.0 F{max_z_speed}(move Z to '0')
+ G161 Z F100(home Z axis minimum)
+ M132 X Y Z A B (Recall stored home offsets for XYZAB axis)
+ G92 X152 Y72 Z0 A0 B0
+ G1 X-141 Y-74 Z40 F{travel_speed} (move to waiting position)
+ G130 X20 Y20 A20 B20 (Lower stepper Vrefs while heating)
+ M135 T0
+ M104 S220 T0
+ M133 T0
+ G130 X127 Y127 A127 B127 (Set Stepper motor Vref to defaults)
+ ; Sliced {filename} at: {day} {date} {time}
+ ; Basic settings: Layer height: {layer_height} Walls: {wall_thickness} Fill: {fill_density}
+ ; Print time: {print_time}
+ ; Filament used: {filament_amount}m {filament_weight}g
+ ; Filament cost: {filament_cost}
+ M73 P0;
+ ; -- end of START GCODE --
+
+end.gcode = ; -- END GCODE --
+ M127 T0; fan off
+ M127 T0 (Fan Off)
+ M18 A B(Turn off A and B Steppers)
+ G1 Z155 F900
+ G162 X Y F2000
+ M18 X Y Z(Turn off steppers after a build)
+ M104 S0 T0
+ M70 P5 (We <3 Making Things!)
+ M72 P1 ( Play Ta-Da song )
+ M73 P100
+ M137 (build end notification)
+ ; -- end of END GCODE --
diff --git a/Cura/resources/machine_profiles/Mendel.ini b/Cura/resources/machine_profiles/Mendel.ini
new file mode 100644
index 0000000000..1309055eaf
--- /dev/null
+++ b/Cura/resources/machine_profiles/Mendel.ini
@@ -0,0 +1,18 @@
+[machine]
+machine_name = Mendel
+machine_type = RepRap
+machine_width = 200
+machine_depth = 200
+machine_height = 140
+machine_center_is_zero = False
+has_heated_bed = True
+gcode_flavor = RepRap (Marlin/Sprinter)
+extruder_amount = 1
+
+[profile]
+filament_diameter = 2.85
+nozzle_size = 0.5
+layer_height = 0.2
+print_speed = 50
+print_temperature = 240
+travel_speed = 150
diff --git a/Cura/resources/machine_profiles/PrintrBot.ini b/Cura/resources/machine_profiles/PrintrBot.ini
new file mode 100644
index 0000000000..63cad09aa5
--- /dev/null
+++ b/Cura/resources/machine_profiles/PrintrBot.ini
@@ -0,0 +1,19 @@
+[machine]
+machine_name = PrintrBot
+machine_type = RepRap
+machine_width = 150
+machine_depth = 150
+machine_height = 150
+machine_center_is_zero = False
+has_heated_bed = True
+gcode_flavor = RepRap (Marlin/Sprinter)
+extruder_amount = 1
+
+[profile]
+filament_diameter = 2.85
+nozzle_size = 0.5
+layer_height = 0.2
+fill_density = 10
+print_speed = 30
+print_temperature = 240
+travel_speed = 150
diff --git a/Cura/resources/machine_profiles/PrintrBotLC+.ini b/Cura/resources/machine_profiles/PrintrBotLC+.ini
new file mode 100644
index 0000000000..cbd6d02f78
--- /dev/null
+++ b/Cura/resources/machine_profiles/PrintrBotLC+.ini
@@ -0,0 +1,19 @@
+[machine]
+machine_name = PrintrBot LC+
+machine_type = RepRap
+machine_width = 200
+machine_depth = 200
+machine_height = 200
+machine_center_is_zero = False
+has_heated_bed = True
+gcode_flavor = RepRap (Marlin/Sprinter)
+extruder_amount = 1
+
+[profile]
+filament_diameter = 2.85
+nozzle_size = 0.5
+layer_height = 0.2
+fill_density = 10
+print_speed = 30
+print_temperature = 240
+travel_speed = 150
diff --git a/Cura/resources/machine_profiles/Prusa Mendel i3.ini b/Cura/resources/machine_profiles/Prusa Mendel i3.ini
new file mode 100644
index 0000000000..a364681faf
--- /dev/null
+++ b/Cura/resources/machine_profiles/Prusa Mendel i3.ini
@@ -0,0 +1,18 @@
+[machine]
+machine_name = Prusa Mendel i3
+machine_type = RepRap
+machine_width = 198
+machine_depth = 185
+machine_height = 200
+machine_center_is_zero = False
+has_heated_bed = True
+gcode_flavor = RepRap (Marlin/Sprinter)
+extruder_amount = 1
+
+[profile]
+filament_diameter = 2.85
+nozzle_size = 0.5
+layer_height = 0.2
+print_speed = 50
+print_temperature = 240
+travel_speed = 150
diff --git a/Cura/resources/meshes/Attribution.txt b/Cura/resources/meshes/Attribution.txt
index de41baf478..9630787da3 100644
--- a/Cura/resources/meshes/Attribution.txt
+++ b/Cura/resources/meshes/Attribution.txt
@@ -1,2 +1,3 @@
* ultimaker_platform.stl: 3D platform from the Ultimaker. Derivative from Ultimaker lasercut drawings. CC BY-NC 3.0 license (http://creativecommons.org/licenses/by-nc/3.0/)
http://www.thingiverse.com/thing:13571
+* ultimaker2_platform.stl: 3D platform from the Ultimaker2, released by Ultimaker for Cura. CC BY-NC 3.0 license (http://creativecommons.org/licenses/by-nc/3.0/)
diff --git a/Cura/util/profile.py b/Cura/util/profile.py
index 66758c1cff..878fe0ba34 100644
--- a/Cura/util/profile.py
+++ b/Cura/util/profile.py
@@ -366,7 +366,7 @@ setting('machine_height', '200', float, 'machine', 'hidden').setLabel(_("Maximum
setting('machine_center_is_zero', 'False', bool, 'machine', 'hidden')
setting('ultimaker_extruder_upgrade', 'False', bool, 'machine', 'hidden')
setting('has_heated_bed', 'False', bool, 'machine', 'hidden').setLabel(_("Heated bed"), _("If you have an heated bed, this enabled heated bed settings (requires restart)"))
-setting('gcode_flavor', 'RepRap (Marlin/Sprinter)', ['RepRap (Marlin/Sprinter)', 'UltiGCode'], 'machine', 'hidden').setLabel(_("GCode Flavor"), _("Flavor of generated GCode.\nRepRap is normal 5D GCode which works on Marlin/Sprinter based firmwares.\nUltiGCode is a variation of the RepRap GCode which puts more settings in the machine instead of the slicer."))
+setting('gcode_flavor', 'RepRap (Marlin/Sprinter)', ['RepRap (Marlin/Sprinter)', 'UltiGCode', 'MakerBot'], 'machine', 'hidden').setLabel(_("GCode Flavor"), _("Flavor of generated GCode.\nRepRap is normal 5D GCode which works on Marlin/Sprinter based firmwares.\nUltiGCode is a variation of the RepRap GCode which puts more settings in the machine instead of the slicer.\nMakerBot GCode has a few changes in the way GCode is generated, but still requires MakerWare to generate to X3G."))
setting('extruder_amount', '1', ['1','2','3','4'], 'machine', 'hidden').setLabel(_("Extruder count"), _("Amount of extruders in your machine."))
setting('extruder_offset_x1', '-21.6', float, 'machine', 'hidden').setLabel(_("Offset X"), _("The offset of your secondary extruder compared to the primary."))
setting('extruder_offset_y1', '0.0', float, 'machine', 'hidden').setLabel(_("Offset Y"), _("The offset of your secondary extruder compared to the primary."))
@@ -654,6 +654,21 @@ def loadPreferences(filename):
setActiveMachine(int(getPreferenceFloat('active_machine')))
+def loadMachineSettings(filename):
+ global settingsList
+ #Read a configuration file as global config
+ profileParser = ConfigParser.ConfigParser()
+ try:
+ profileParser.read(filename)
+ except ConfigParser.ParsingError:
+ return
+
+ for set in settingsList:
+ if set.isMachineSetting():
+ if profileParser.has_option('machine', set.getName()):
+ set.setValue(unicode(profileParser.get('machine', set.getName()), 'utf-8', 'replace'))
+ checkAndUpdateMachineName()
+
def savePreferences(filename):
global settingsList
#Save the current profile to an ini file
diff --git a/Cura/util/resources.py b/Cura/util/resources.py
index 8d744c1ff1..d1f38358ea 100644
--- a/Cura/util/resources.py
+++ b/Cura/util/resources.py
@@ -3,6 +3,7 @@ __copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AG
import os
import sys
+import glob
#Cura/util classes should not depend on wx...
import wx
@@ -44,6 +45,10 @@ def getPathForMesh(name):
def getPathForFirmware(name):
return getPathForResource(resourceBasePath, 'firmware', name)
+def getDefaultMachineProfiles():
+ path = os.path.normpath(os.path.join(resourceBasePath, 'machine_profiles', '*.ini'))
+ return glob.glob(path)
+
def setupLocalization(selectedLanguage = None):
try:
if sys.platform.startswith('darwin'):
diff --git a/build_app.py b/build_app.py
index 6371c4feea..22707a0f22 100644
--- a/build_app.py
+++ b/build_app.py
@@ -6,7 +6,7 @@ if sys.platform.startswith('darwin'):
from setuptools import setup
APP = ['Cura/cura.py']
- DATA_FILES = ['Cura/LICENSE', 'Cura/resources/images', 'Cura/resources/meshes', 'Cura/resources/example', 'Cura/resources/firmware', 'Cura/resources/locale']
+ DATA_FILES = ['Cura/LICENSE', 'Cura/resources/images', 'Cura/resources/meshes', 'Cura/resources/example', 'Cura/resources/firmware', 'Cura/resources/locale', 'Cura/resources/machine_profiles']
PLIST = {
u'CFBundleName': u'Cura',
u'CFBundleShortVersionString': u'13.06.5',