Program to calculate resin or adhesive recipes.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
image
.gitignore
LICENSE.txt
README.rst
filelist.nescio.rsmith
filelist.slackbox.rsmith
pylama.ini
resin-calculator.py
resins.json

README.rst

Resin calculator

Date: 2017-12-21
tags:python, composites, bonding
Author: Roland Smith

Introduction

This repository contains the resin-calculator program. This is a Python 3 program using the Tkinter GUI toolkit to calculate the amount of components for resins or adhesives.

Screenshot of the resin-calculator GUI.

Requirements

The following software is required:

  • Python 3
  • Tkinter
  • ttk (might be included in Tkinter)

Data-file

The recipes for resins are seperated into their own file resins.json. An example is included in this repository. Such a file should be located in the users home directory or in the directory where resin-calculator is started from.

Technically resins.json is not a valid JSON file, since it contains comments at the beginning. However, all lines starting with // are removed before the rest is fed to the JSON parser.

The comment line starting with // Last modified: is special. If found, it is read and the date it contains is listed as the date of the data-file in the program's GUI. I have my editor set up to automatically update this line whenever I write the file.

The format of the file is simple. It is a dictionary linking the name of the recipe to a list of (component name, parts by weight) tuples. By convention, the first component is the resin.

Consider the example below. The “Epikote 04908” resin consists of 100 pbw “epikote EPR 04908” resin and 30 pbw “epikure EPH 04908” hardener.

{
    "Epikote 04908": [
        [
            "epikote EPR 04908",
            100
        ],
        [
            "epikure EPH 04908",
            30
        ]
    ]
}