This commit is contained in:
parent
74837993c2
commit
9202a01802
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
__pycache__
|
__pycache__
|
||||||
node_modules
|
node_modules
|
||||||
static
|
static
|
||||||
|
namensschild.stl
|
||||||
|
|
|
@ -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})`
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
4
print.js
4
print.js
|
@ -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()
|
||||||
|
|
Reference in a new issue