Results 1 to 3 of 3

Thread: Metric Shellac cut ratio calculator

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Alm_63's Avatar
    Join Date
    Aug 2015
    Location
    Newcastle, nsw
    Posts
    156

    Metric Shellac cut ratio calculator

    Guy's
    Here is one for the geeks out there.
    I am going to use some Shellac as a grain filler and I wanted metric conversion for the process.
    So having some time on my hands and wanting to learn something I have created python script to calculate it.
    You will need python 2.7 to run it, it is built into the Macs and you can download it free for windows if you want.
    save the following text as shellac.py and run it from the command line as "python shellac.py"

    #######

    #shellac.py

    from tkinter import *
    import Tkinter

    window = Tk()
    window.title("Metric Shellac Cut ratio Calculator")
    #define labels
    heading = Label(window, text = "Shellac Cut ratio Calculator", justify=LEFT)
    rat_hed = Label(window, text = "Pick cut Ratio in Lbs/Gallons", justify=LEFT)
    vol_hed = Label(window, text = "Pick desired alcohol volume in mls", justify=LEFT)
    # define spinboxes

    bt = Tkinter.Spinbox(window, width=5, values=(1,1.5,2,2.5,3,4))



    # get value
    def cut_ratio_value():
    #print bt.get()
    text_box = Tkinter.Text(window, width = 6, height = 1)
    text_box.grid(row = 3, column = 1, columnspan = 1)
    text_box.insert(END, round(float(119.8) * float(bt.get()) * float(vm.get()) * float(.001),1))


    vm = Tkinter.Spinbox(window, width=5, values=(50,100,150,200,300,1000))



    # calculate the volume
    value_button = Tkinter.Button(window, text = 'Print Grams of Shellac per Litre', width = 25, command = cut_ratio_value)


    #use grid no pack needed, columns are relative to other columns
    #heading.grid(row=0, column=1, sticky = N)
    rat_hed.grid(row=1, column=0, sticky = W)
    vol_hed.grid(row=2, column=0, sticky = W)
    # widget grids
    bt.grid(column=1, row=1)
    vm.grid(column=1, row=2)
    value_button.grid(column=0, row=3)

    #
    window.mainloop()

    ### cut between the lines of ###'s

    Bruce
    Bruce

  2. #2
    Overlord of Music Andy40's Avatar
    Join Date
    Oct 2015
    Posts
    3,913
    Hi ALM, thanks for the post, haven't seen you in YEARS!
    Build #1 - ST-1 - Completed
    Build #2 - LP-1SS - Completed
    Build #3 - TLA-1R - Completed
    Build #4 - SGD-612 - Completed
    Build #5 - ES-1G - Completed
    Build #6 - STA-1HT | Completed
    Build #7 - ST1JR - Completed
    Current Build #8 - JBA-4
    Build #9 - Semi-scratch build Tele x 2 - Completed
    Current Build #10 - PRS-1H
    Current Build #11 - AGJR-1 - Completed
    Current Build #12 - ATL-1SB
    Current Build #13 - GST-1
    Current Build #14 - FBM-1

  3. #3
    Member Alm_63's Avatar
    Join Date
    Aug 2015
    Location
    Newcastle, nsw
    Posts
    156
    I keep renovating and getting distracted by other things.
    I’m working on a Jem kit atm.
    I actually used the program yesterday to make some grain filler for the neck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •