Jump to content

New Cura Printer Interface


owen

Recommended Posts

  • 1 month later...
Posted · New Cura Printer Interface

Here is my attempt at a new printer interface. I just took the code from EvilGrass's version and gave it more room and added a few buttons that I find useful.

I also added heatbed control to Wayne's module and noticed in the Cura 14.05-RC4 there was a different extruder control image so added it also.

I only have a single extruder but have made up a dual extruder version but it has not been tested.

You will have to edit the script.py in the folder to change temperatures on the buttons for hotend and heatbed they are clearly marked though. It would be good if the temperature could be pulled from the current profile in Cura?

Screenshots

wzlh.png

t8cz.png

Download Links

Single Extruder - https://dl.dropboxusercontent.com/u/37098713/cura/New_UI-Single%20Extruder.zip

Dual Extruder - https://dl.dropboxusercontent.com/u/37098713/cura/New_UI-Dual%20Extruder.zip

There is also a .xcf file in the zip that has separate layers for each button group so they can be easily edited in GIMP.

And finally, is there any way to get some of the information that used to be on the old printer interface so that it can be displayed also? Like estimated time remaining, print time etc.

 

  • Link to post
    Share on other sites

    • 3 weeks later...
    Posted · New Cura Printer Interface

    This is really nice guys. It works well for me on my Win7 machine with my Makerfarm i3 Prusa 8". One thing I like about Pronterface's Interface is the ability to create custom buttons. I have a few for my autoleveling activities and it is nice to just click a button that is used often instead of putting in GCode frequently for the same thing, over and over.

    Any way to add that functionality to this nice interface you've crafted? Here are shots of my interface with the buttons. Ignore the bottom photo as it was used in another post. The top photo shows my custom buttons.

    http://nvision.s463.sureserver.com/guest/pronterfacesettings.jpg

     

  • Link to post
    Share on other sites

    • 2 weeks later...
    Posted · New Cura Printer Interface

    Thank you all of you. Great job done. I have installed these interfaces and I like them very much especially due to the fact that I am using alternatively two kinds of printers - Mendel with one extruder and Rostock with two extruders. Still I have a question, how I can define and implement a button for a certain function = Gcode instructions? I would like to implement few buttons but sorry my ignorance I do not know how. Could, please, someone help and explain? Thank you in advance.

     

  • Link to post
    Share on other sites

    Posted · New Cura Printer Interface

    Here is my attempt at a new printer interface. I just took the code from EvilGrass's version and gave it more room and added a few buttons that I find useful.

    I also added heatbed control to Wayne's module and noticed in the Cura 14.05-RC4 there was a different extruder control image so added it also.

     

    Thanks Dave!

    After some discussion with Daid about why he 'stole' the controls that I needed with my Ultimaker Original via USB, he talked about this plugin. Since Flow and Speed were still missing I've updated it, also moving the 'fan control' to the button layout as I felt it's original implementation was kinda awkward in it's style.

    Screenshots:

    Single Extruder screenshot

    Dual Extruder screenshot

     

    As for Dave's comment: I've also not got a dual extrusion machine, so the code for dual extrusion is untested. I feel that especially the extruder button is probably not functional. Feel free to test and update, please let us know here once you do.

    I've tested the single extrusion plugin and it seems to be fully functional.

    Download links:

    Single: https://www.dropbox.com/s/puwdzd6nyhhbw9t/FullUI_single.7z?dl=0

    Double: https://www.dropbox.com/s/d9jdc9vy526auje/FullUI_double.7z?dl=0

    Wishlist for Daid:

    A way to obtain info about the print via cura:

    - print temperature

    - print speed

    - print time and estimated time remaining

    - current layer/height

    Happy printing!

     

  • Link to post
    Share on other sites

    Posted · New Cura Printer Interface

    I would like to share my alternative interface based on the full UI and my personal preferences

    Capture 1Map

     

    I have pasted the complete code in the quote below

     

    I would like some feedback and I would love to see some more interfaces of other cura enthusiasts.

     

     

    #Name: Full UI - adapted

    #Info: Bigger UI with more buttons (for a single extruder)!

    #Depend: printwindow

    #Type: printwindow

     

    # Printer UI based on the Printrun interface by Kliment plus fan.

    # Increased windiw size and added more buttons for manual use

    # Printrun is GPLv3, so this file, and the used images are GPLv3

     

    setImage('image.png', 'map.png')

     

    # X-axis

     

    addColorCommand(0, 0, 255, sendGCode, "G91; G1 X100 F2000; G90")

    addColorCommand(0, 0, 240, sendGCode, "G91; G1 X10 F2000; G90")

    addColorCommand(0, 0, 220, sendGCode, "G91; G1 X1 F2000; G90")

    addColorCommand(0, 0, 200, sendGCode, "G91; G1 X0.1 F2000; G90")

    addColorCommand(0, 0, 180, sendGCode, "G91; G1 X-0.1 F2000; G90")

    addColorCommand(0, 0, 160, sendGCode, "G91; G1 X-1 F2000; G90")

    addColorCommand(0, 0, 140, sendGCode, "G91; G1 X-10 F2000; G90")

    addColorCommand(0, 0, 120, sendGCode, "G91; G1 X-100 F2000; G90")

     

    # Y-Axis

     

    addColorCommand(0, 255, 0, sendGCode, "G91; G1 Y100 F2000; G90")

    addColorCommand(0, 240, 0, sendGCode, "G91; G1 Y10 F2000; G90")

    addColorCommand(0, 220, 0, sendGCode, "G91; G1 Y1 F2000; G90")

    addColorCommand(0, 200, 0, sendGCode, "G91; G1 Y0.1 F2000; G90")

    addColorCommand(0, 180, 0, sendGCode, "G91; G1 Y-0.1 F2000; G90")

    addColorCommand(0, 160, 0, sendGCode, "G91; G1 Y-1 F2000; G90")

    addColorCommand(0, 140, 0, sendGCode, "G91; G1 Y-10 F2000; G90")

    addColorCommand(0, 120, 0, sendGCode, "G91; G1 Y-100 F2000; G90")

     

    # Z-Axis

     

    addColorCommand(255, 0, 0, sendGCode, "G91; G1 Z10 F200; G90")

    addColorCommand(220, 0, 0, sendGCode, "G91; G1 Z1 F200; G90")

    addColorCommand(200, 0, 0, sendGCode, "G91; G1 Z0.1 F200; G90")

    addColorCommand(180, 0, 0, sendGCode, "G91; G1 Z-0.1 F200; G90")

    addColorCommand(160, 0, 0, sendGCode, "G91; G1 Z-1 F200; G90")

    addColorCommand(140, 0, 0, sendGCode, "G91; G1 Z-10 F200; G90")

     

    # Home, X-,Y-,Z-Axis

     

    addColorCommand(255, 255, 0, sendGCode, "G28")

    addColorCommand(240, 255, 0, sendGCode, "G28 X0")

    addColorCommand(220, 255, 0, sendGCode, "G28 Y0")

    addColorCommand(200, 255, 0, sendGCode, "G28 Z0")

     

    # Extrude/Retract

    addColorCommand(245, 0, 0, sendGCode, "G92 E0; G1 F200 E10; G92 E0")

    addColorCommand(230, 0, 0, sendGCode, "G92 E0; G1 F200 E1; G92 E0")

    addColorCommand(210, 0, 0, sendGCode, "G92 E0; G1 F200 E0.1; G92 E0")

    addColorCommand(190, 0, 0, sendGCode, "G92 E0; G1 F200 E-0.1; G92 E0")

    addColorCommand(170, 0, 0, sendGCode, "G92 E0; G1 F200 E-1; G92 E0")

    addColorCommand(150, 0, 0, sendGCode, "G92 E0; G1 F200 E-10; G92 E0")

     

    # Terminal,Temp,Progress

     

    addTerminal(255, 0, 255)

    addTemperatureGraph(180, 0, 255)

    addProgressbar(255, 200, 200)

     

    # Buttons

     

    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)

     

    #Print stuff to terminal buttons

    #current position

    addColorCommand(74, 50, 152, sendGCode, "M114")

    #endstops

    addColorCommand(74, 80, 152, sendGCode, "M119")

    #current settings

    addColorCommand(74, 95, 152, sendGCode, "M503")

    #Stop Steppers

    addColorCommand(74, 35, 152, sendGCode, "M84")

     

    ######

    # 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 printer settings

    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 PluginPanel():

    def __init__(self, r,g, B):

     

    ## ##

    ######################################################

     

    panel = addPanel(r,g, B)

    self.tool0_210 = createButton(panel, "Set 210", sendGCode, "M104 S210")

    self.tool0_240 = createButton(panel, "Set 240", sendGCode, "M104 S240")

    self.tool0_260 = createButton(panel, "Set 260", sendGCode, "M104 S260")

    self.tool0_off = createButton(panel, "OFF", sendGCode, "M104 S0")

     

    self.heatbed_55 = createButton(panel, "Set 55", sendGCode, "M140 S55")

    self.heatbed_65 = createButton(panel, "Set 65", sendGCode, "M140 S65")

    self.heatbed_75 = createButton(panel, "Set 75", sendGCode, "M140 S75")

    self.heatbed_off = createButton(panel, "OFF", sendGCode, "M140 S0")

     

    self.fan_0 = createButton(panel, "Set 0", sendGCode, "M107")

    self.fan_50 = createButton(panel, "Set 50%", sendGCode, "M106 S127")

    self.fan_75 = createButton(panel, "Set 75%", sendGCode, "M106 S191")

    self.fan_100 = createButton(panel, "Set 100%", sendGCode, "M106 S255")

     

    self.print_def = createButton(panel, "100%", sendGCode, "M220 S100")

    self.print_setSpeed80 = createButton(panel, "80%", sendGCode, "M220 S80")

    self.print_setSpeed60 = createButton(panel, "60%", sendGCode, "M220 S60")

    self.print_setSpeed40 = createButton(panel, "40%", sendGCode, "M220 S40")

     

    self.flow_def = createButton(panel, "100%", sendGCode, "M221 S100")

    self.flow_setSpeed = createButton(panel, "80%", sendGCode, "M221 S80")

     

    ## Grid creation ##

    ######################################################

     

    sizer = wx.GridSizer(rows=10, cols=5, hgap=10, vgap=10)

    sizer.Add(wx.StaticText(panel, -1, label="Extruder"), 0, wx.TOP|wx.BOTTOM|wx.LEFT|wx.ALIGN_CENTER, 10)

    sizer.Add(self.tool0_210, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.tool0_240, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.tool0_260, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.tool0_off, 0, wx.TOP|wx.BOTTOM, 10)

     

    sizer.Add(wx.StaticText(panel, -1, label = "Heat Bed"), 0, wx.TOP|wx.BOTTOM|wx.LEFT|wx.ALIGN_CENTER, 10)

    sizer.Add(self.heatbed_55, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.heatbed_65, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.heatbed_75, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.heatbed_off, 0, wx.TOP|wx.BOTTOM, 10)

     

    sizer.Add(wx.StaticText(panel, -1, label = "Fan"), 0, wx.TOP|wx.BOTTOM|wx.LEFT|wx.ALIGN_CENTER, 10)

    sizer.Add(self.fan_0, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.fan_50, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.fan_75, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.fan_100, 0, wx.TOP|wx.BOTTOM, 10)

     

    sizer.Add(wx.StaticText(panel, -1, label = "Print Speed"), 0, wx.TOP|wx.BOTTOM|wx.LEFT|wx.ALIGN_CENTER, 10)

    sizer.Add(self.print_def, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.print_setSpeed80, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.print_setSpeed60, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.print_setSpeed40, 0, wx.TOP|wx.BOTTOM, 10)

     

    sizer.Add(wx.StaticText(panel, -1, label = "Flow"), 0, wx.TOP|wx.BOTTOM|wx.LEFT|wx.ALIGN_CENTER, 10)

    sizer.Add(self.flow_def, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add(self.flow_setSpeed, 0, wx.TOP|wx.BOTTOM, 10)

    sizer.Add((1,1), 0, 10) # Spacer

     

    panel.SetSizer(sizer)

    panel.Layout()

     

    PluginPanel(255, 123, 255)

     

     

  • Link to post
    Share on other sites

    Posted (edited) · New Cura Printer Interface

    .

    Edited by carsten-w
    • Like 1
    Link to post
    Share on other sites

    Posted (edited) · New Cura Printer Interface

    Yeah, these are really, really nice. Thank you. I am currently testing Carsten's version and it looks great.

    Now, can one of you masters implement a little button for me?

    I have tried but failed - no surprise, it was my first try.

    I would like to have a button that "safely" lifts the head after an abort and returns it to xy home  - just like citystars mentioned earlier.

    I tried to include the following command and also add a button to the panel - no luck:

    (The print window wouldn't open any more)

    self.tool2_safe = createButton(panel, „Safe“, sendGCode, "G91; G1 Z15 E-5; M104 S0; M140 S0; G28 X0 Y0; G90; M117 Aborted")

    # Sends g-code:

    ## relative positioning

    ## move z-stage down 15mm and retract 5mm

    ## switch off nozzle heater

    ## switch off bed heater

    ## home x and y

    ## absolute positioning

    ## display „Aborted“

    For me it would be fine to have it instead of "Get endstops" for instance.

    Would be really nice - but the interface as is is great!

    Thanks!

    Edited by Guest
  • Link to post
    Share on other sites

    Posted · New Cura Printer Interface

    Hey, here is my version of an printer interface... https://github.com/walthercarsten/PrinterFaceUi

    Greetings, Carsten

     

    I just used your interface on my Ultimaker Original and the x,y,z movements don't work the way they are supposed to. Could it be that the printer is receiving absolute commands? If I send a move command it will move once, but pretty unpredictable. The second time on the same command nothing happens.

    I really don't know enough about it to figure it out. Trying a different interface now.

  • Link to post
    Share on other sites

    Posted · New Cura Printer Interface

    I figgered it out.

    I was using a text editor and even though I saved as text-only it messed up the code. Downloaded a code editor and all is fine.

    Changed Carsten's code to assure that all head movement commands are relative, similar for extrude/retract, and reappropriated one button to give me my move to safety. Talk about a nice print interface ...

    Now: How to show current layer - like 43/576 - for instance in the upper right corner of the tempgraph?

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...