Dim3nsioneer 558
@owen: I just did as you wrote. The new 'Pronterfan' option does not appear in the preferences. Only 'basic' and 'Pronterface UI'... what am I doing wrong? Tried it with RC5...
@owen: I just did as you wrote. The new 'Pronterfan' option does not appear in the preferences. Only 'basic' and 'Pronterface UI'... what am I doing wrong? Tried it with RC5...
Nice extension...! :smile:
It's a good idea to collect print interfaces in this thread for the moment. However, on the long run, I would see a new 'Cura print dialog plugin' category in the Ultimaker Wiki where the designs could be collected... similar to the 'standard' Cura plugins.
Yes, and, I hope someone will improve the interface. I quickly threw it together. But if something better comes along I have no problem in merging it into the main Cura.
That's one of the main reasons why I setup the new printer windows like this, it's easy to hack, and easy to contribute this way.
If I may make a suggestion. How about adding "hover" and "mouse down" images as well to get some visual feedback into the interface?
@owen: I just did as you wrote. The new 'Pronterfan' option does not appear in the preferences. Only 'basic' and 'Pronterface UI'... what am I doing wrong? Tried it with RC5...
From within RC5 click on the Plugins tab
Click on Open Plugin Location
You should see the 'PronterfanUI' folder
In that you should see 3 files
image.png, map.png and script.py
both image files should be 781 X 400 pixels
Ooohhh... silly me! :wacko:
It was a typo in the name 'script.py'... I have it now. Thanks for the assistance!
Hi,
I have come up with a way to add arbitrary UI components to the printer GUI. It works with the modified UI in the original post above, or the stock printer UI. It has the potential to help modularise the GUI plugins.
The example I have allows you to set the hot end temp for 1 or 2 extruders. Below is the code, just add it to the bottom of script.py
It happens to use the same RGB values as the terminal so will appear there and you don't need to comment out the existing 'addTerminal()' as it will remain underneath this small 2 row panel - although changing the image and map png would be better longer term.
######
# these are common and could/should migrate to Cura.gui.printWindow/printWindowPlugin
# they will need to be added to the 'variables' passed to the 'execfile' in __init__
def parentFrame():
return setImage.im_self # this magic is only needed in this plugin, it's the 'self' of printWindowPlugin
def addPanel(r,g,b):
printWindowPlugin = parentFrame() # magic
x, y, w, h = printWindowPlugin._getColoredRect(r,g,b)
panel= wx.Panel(printWindowPlugin)
panel.SetPosition((x, y))
panel.SetSize((w, h))
return panel
def createButton(parent, text, command, data = None):
button = wx.Button(parent, -1, _(text))
button.command = command
button.data = data
printWindowPlugin = parentFrame()
printWindowPlugin.Bind(wx.EVT_BUTTON, lambda e: command(data), button)
return button
### Below is the custom GUI Panel to control 2 extruders
import wx
# this could live in its own module and would make assembly of different GUI plugins in a single printer GUI window easier to manage
class ExtruderTemperaturePluginPanel():
def __init__(self, r,g,b):
defaultTemp = "210"
panel = addPanel(r,g,b)
self.tool0_temp = wx.TextCtrl(panel, -1, value="0")
self.tool0_zero = createButton(panel, "Set 0", sendGCode, "G91; M104 T0 S0")
self.tool0_default = createButton(panel, "Set " + defaultTemp, sendGCode, "G91; M104 T0 S" + defaultTemp)
self.tool0_setTemp = createButton(panel, "Set:", lambda s: sendGCode("G91; M104 T0 S" + s.GetValue()), self.tool0_temp)
self.tool1_temp = wx.TextCtrl(panel, -1, value="0")
self.tool1_zero = createButton(panel, "Set 0", sendGCode, "G91; M104 T1 S0")
self.tool1_default = createButton(panel, "Set " + defaultTemp, sendGCode, "G91; M104 T1 S" + defaultTemp)
self.tool1_setTemp = createButton(panel, "Set:", lambda s: sendGCode("G91; M104 T1 S" + s.GetValue()), self.tool1_temp)
sizer = wx.GridSizer(rows=10, cols=5, hgap=10, vgap=10)
sizer.Add(wx.StaticText(panel, -1, label="Extruder 1"), 0, wx.ALL, 10)
sizer.Add(self.tool0_zero, 0, wx.ALL, 10)
sizer.Add(self.tool0_default, 0, wx.ALL, 10)
sizer.Add(self.tool0_setTemp, 0, wx.ALL, 10)
sizer.Add(self.tool0_temp, 0, wx.ALL, 10)
sizer.Add(wx.StaticText(panel, -1, label = "Extruder 2"), 0, wx.ALL, 10)
sizer.Add(self.tool1_zero, 0, wx.ALL, 10)
sizer.Add(self.tool1_default, 0, wx.ALL, 10)
sizer.Add(self.tool1_setTemp, 0, wx.ALL, 10)
sizer.Add(self.tool1_temp, 0, wx.ALL, 10)
panel.SetSizer(sizer)
panel.Layout()
###
ExtruderTemperaturePluginPanel(255, 0, 255)
Thanks for providing the plugins and the information.
This doesn't work for me.
Adding the fan to the GUI works but not the temp for the extruders.
I added the code to the bottom of script.py (in the map plugins\PronterfaceUI) and if i want to print it doesnt want to open the print window, and when i remove the new added code its working again. i'm i doing something wrong?
Also the code with the fan, on the bottom it says
addButton(0, 255, 255, 'Connect', connect)
addButton(0, 240, 255, 'Print', startPrint)
addButton(0, 220, 255, 'Pause', pausePrint)
addButton(0, 200, 255, 'Cancel', cancelPrint)
addButton(0, 180, 255, 'Error log', showErrorLog)
but i only have 3 buttons (connect ,print and cancel)
And last question:
is it possible to give more commands behind the cancelPrint ?
i would like that if i press Cancel in the UI that the printer stops printing but the temperature from the extruder and bed stays on and that the extruder goes up a little bit and then the x and y goes to 0. i tried by typing cancelPrint, sendGcode , "M107 etc....") but it seems it doesn't accept this.
Thank you
Also the code with the fan, on the bottom it says
addButton(0, 255, 255, 'Connect', connect)
addButton(0, 240, 255, 'Print', startPrint)
addButton(0, 220, 255, 'Pause', pausePrint)
addButton(0, 200, 255, 'Cancel', cancelPrint)
addButton(0, 180, 255, 'Error log', showErrorLog)
but i only have 3 buttons (connect ,print and cancel)
Hi
It looks like the Pause and Error Log buttons were left off the top layer image. My guess is they should lie between the Print and Cancel buttons and after the Cancel button. If you click there I would say that they would work.
Happy to see that there is some progress here. UNfortunately is all you doing beyond my possibilities...
What I´m missing at the mkoment is the possibility to (pre-) heat the bed and the nozzle. Currently I just can do that with my LCD panel, but in 14.01 this option was available.
Finally I would need some help getting this things together, I a real dummy in programming, not sure how putting this code pieces together. I think there will be a lot of people out there like me and for us it would be niche to have the code in one Piece and a short instruction where to put these...
But how comes that only the Cancel button is showed?
When i change print with cancel and vice versa the cancel button is then next the print button.
So the color codes are working.
Do you know why it doesn't show the buttons (visually)?
But how comes that only the Cancel button is showed?
When i change print with cancel and vice versa the cancel button is then next the print button.
So the color codes are working.
Do you know why it doesn't show the buttons (visually)?
Not sure, I think they were just forgotten to be put there?
Those buttons only show if they are available, else they are hidden. (Pull out the USB cable after a connect is done, and the error log will show up. The pause had some issues, so is always disabled at the moment)
Thank you for your reply !
I have changed the interface.
Added a on/off button for headbed and extruder.
The headbed temp = 55 and extruder = 205.
If you want to change these values you need to go to script and change S55 & S205 to the desired themp.
Copy the files in the zip to PronterfanUI and replace everything..
https://mega.co.nz/#!CcQmUTbI!9Q9KMSzQySp2MubyuLSxebio7wjDv4Z2t9v6MuYmkKk
The only problem i have is that the headbed doesn't work and don't know why...
Maybe any of you guys have an idea?
addColorCommand(120, 77, 27, sendGCode, "M140 S55")
Using this but doesn't work.
And when i change the line from the extruder to M140 S55 it works...
This plugin is exactly what i´m looking for!
Unfortunately I´ve tried the Pronterfan UI in my Cura 14.03 RC6 and the interface simply does not appear. When I click on "Print" nothing happens...
Yes, I´ve copied the right files in the right folder and the preferences menu shows the option "Pronterface fan".
Any idea?
Well i did change the file but it was possible you downloaded the first one.
There's an error in it.
Go to the script.py and its at the heatbed its going to say "M140" S55) and it needs to become "M140 S55")
Or just download it again. Changed the code in it
Well i did change the file but it was possible you downloaded the first one.
There's an error in it.
Go to the script.py and its at the heatbed its going to say "M140" S55) and it needs to become "M140 S55")
Or just download it again. Changed the code in it
Is this file still good? getting a download error.....
Hi, I noticed today that when copy-pasting Wayne's code, the indentation of the lines seem to be lost, which screws up the python code. When I corrected that, it works just fine. However, I found it a bit impractical that the console and the temperature panel were in the same space (as sometimes console messages would print over the temperature buttons), so I did some small modifications to the design to make some room.
I uploaded the result, to be found https://app.box.com/s/75skiqucz6az8ldine4a. Just put the files in the PronterfanUI folder, overwriting everything. This version contains fan control (by owen), temperature control (by Wayne), and on/off buttons for the heatbed and extruder (by Citystars).
I hope this will be useful to some people.
EvilGrass,
I´ve already tested the files in Cura 14.03 and everything works fine! That´s all I need to print, many thanks again!
Oops, forgot to put in Citystars' code... too many script.py files running around on my hard drive
I updated the archive; download link is: https://app.box.com/s/75skiqucz6az8ldine4a
Now it should work... I don't have a heatbed or a second extruder, so I can't test everything though.
Hello again, excuse my double post, but: I thought "what the hell, let's add extrusion/retraction", so I did.
You can download this new version here. As before, just extract the archive in the pronterfanUI folder, overwriting everything. This version supports fan control, temperature control, hotbed/extruder on/off and extrusion/retraction control for the first extruder. If anyone feels like adding the same functionality for the second extruder, feel free (I don't have one myself).
I'll keep the old version in my earlier post, in case there are any bugs with the new version.
I think what is needed after this version is a bit of redesign, so it looks a bit less cluttered and has a uniform style.
Recommended Posts
owen 19
Yep, that would be better
Link to post
Share on other sites