This commit is contained in:
Kyle
2020-04-08 15:42:42 -07:00
parent c8d467f0d3
commit 933278c5f9
2 changed files with 5 additions and 5 deletions

View File

@@ -22,8 +22,8 @@
<input id='inputPPI' type='number' min='1' step='1' max='1200' value='72'>
Material thickness:
<input id='inputMaterialThickness' type='number' min='0.01' step='0.01' max='2' value='0.25'>
Number of rows:
<input id='inputRowCount' type='number' step='1' min='1' max='5' value='1'>
<!-- Number of rows:
<input id='inputRowCount' type='number' step='1' min='1' max='5' value='1'> --> <!-- WIP -->
Row length (interior):
<input id='inputRowLength' type='number' step='0.25' min='1' max='60' value='12'>
Card width (sleeved):
@@ -42,12 +42,12 @@
</div>
<div class="layer darkLayer slideFromLeft">
<div class="paragraph indent">
Generate cool boxes!
Currently this box generator only supports odd numbers of tabs and single-row boxes with sliding lids. Hopefully in the future I'll add more options!
</div>
</div>
<div class="layer slideFromRight">
<div class="paragraph indent">
So fun!
Before laser cutting, you'll have to adjust the stroke width and color, as well as scale SVG correctly. Note down the PPI (default is 72) when you download the SVGs. In case you forget which PPI you used, the margins on the SVG files are one inch.
</div>
</div>
</div>

View File

@@ -14,7 +14,7 @@ function generateSVGs() {
var ppi = parseInt(document.getElementById('inputPPI').value)
var padding = ppi
var materialThickness = parseFloat(document.getElementById('inputMaterialThickness').value) * ppi
var rowCount = parseInt(document.getElementById('inputRowCount').value)
var rowCount = 1//parseInt(document.getElementById('inputRowCount').value)
var rowLength = parseFloat(document.getElementById('inputRowLength').value) * ppi
var cardWidth = parseFloat(document.getElementById('inputCardWidth').value + document.getElementById('inputWiggleRoom').value) * ppi
var cardHeight = parseFloat(document.getElementById('inputCardHeight').value + document.getElementById('inputWiggleRoom').value) * ppi