commit ae1f9b901c62fa8aa650780d03ee6b36fd6bbb4c Author: Taylor Courage Date: Wed Jul 3 01:41:02 2024 -0400 Initial commit of coil splitter 2.0 diff --git a/README.md b/README.md new file mode 100644 index 0000000..08305b4 --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +# Coil Split Calculator + +## Introduction + +This web app is designed to calculate the counter value(s) required to divide coils into two or more 'splits.' + +## How it works + +The operator of the machine simply chooses their machine/cast size from the drop-down box, enters the size of the finished product, and the target finished rack weight. Upon clicking the "Calculate" button or pressing the return key on the keyboard, the operator will be shown three possible values that their counter could be using, whether it is feet, inches, or rotations of the bullblock. \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..a6fe16f --- /dev/null +++ b/index.html @@ -0,0 +1,71 @@ + + + + + + + + Split Calculator + + +
+
+

Taylor Courage's

+

Split Calculator

+

Enter cast and finish size to get counter value

+
+
+ + +
+ + +
+ + + +
+
+   +
+
+
+ + + + + + + + + + + + +
FeetInchesRotations
000
+ +   +
+
+ + + diff --git a/splitter.css b/splitter.css new file mode 100644 index 0000000..db32154 --- /dev/null +++ b/splitter.css @@ -0,0 +1,36 @@ +.content { + position: relative; + border: 1px solid black; + padding-left: 17px; + padding-right: 17px; + max-width: 400px; + min-height: 400px; + margin: auto; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +} + +.footer { + position: relative; + bottom: 15px; + width: 100%; + font-size: 75%; + margin: auto; + font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; +} + +label { + margin: auto; +} + +table,td { + border: 1px solid black; + border-collapse: collapse; + text-align: center; + font-weight: bold; +} + +#vanity { + font-family: serif; + font-style: oblique; + font-size: 0.8em; +} \ No newline at end of file diff --git a/splitter.js b/splitter.js new file mode 100644 index 0000000..6457055 --- /dev/null +++ b/splitter.js @@ -0,0 +1,26 @@ +function doSplit() { + // Get values from page + var dia = document.getElementById("finish").value; + var block = document.getElementById("block").value; + var rack = document.getElementById("rack").value; + + + // Format our numbers to prevent maximum user stupidity + if (dia > 100) { + dia = dia / 1000; + } + + // These are a few baseline calculations + var lbsPerFoot = (((dia * dia * 0.7854) * 12) * 0.2833); + var ftPerRev = (3.1415 * (block / 12)); + + // Actual final values + var feet = Math.round(rack / lbsPerFoot); + var inches = feet * 12; + var revs = Math.round(feet / ftPerRev); + + // Set values on page + document.getElementById("feet").textContent = feet; + document.getElementById("inch").textContent = inches; + document.getElementById("revs").textContent = revs; +} \ No newline at end of file