new proportions
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simon Bruder 2019-03-28 18:15:35 +00:00
parent 74837993c2
commit 9202a01802
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
4 changed files with 8 additions and 7 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
__pycache__ __pycache__
node_modules node_modules
static static
namensschild.stl

View file

@ -30,8 +30,8 @@
height: el.offsetHeight height: el.offsetHeight
} }
browserSize = { browserSize = {
width: 192, width: 180,
height: 72 height: 60
} }
factor = Math.min(browserSize.height / elSize.height, browserSize.width / elSize.width) factor = Math.min(browserSize.height / elSize.height, browserSize.width / elSize.width)
el.style.transform = `scale(${factor})` el.style.transform = `scale(${factor})`

View file

@ -1,9 +1,9 @@
$fn=64; $fn=64;
//$fn=32; //$fn=32;
length = 20; length = 16.67;
width = 50; width = 50;
name_length = 15; name_length = 13.33;
name_width = 40; name_width = 40;
height = 2; height = 2;
height_plate = 1; height_plate = 1;
@ -36,5 +36,5 @@ difference() {
} }
} }
translate([width-2.5, length-2.5, 0]) linear_extrude(height_plate) circle(r=1.75); translate([width-2.5, length-2.5, 0]) linear_extrude(height_plate) circle(r=1.9);
} }

View file

@ -16,8 +16,8 @@ const name = process.argv[2];
await page.$eval('#name', (el, name) => { el.innerText = name; setSize() }, name) await page.$eval('#name', (el, name) => { el.innerText = name; setSize() }, name)
await page.pdf({ await page.pdf({
path: `static/namensschild.pdf`, path: `static/namensschild.pdf`,
width: '192px', width: '180px',
height: '72px' height: '60px'
}) })
await browser.close() await browser.close()