This repository has been archived on 2020-04-29. You can view files and clone it, but cannot push or open issues/pull-requests.
namensschilder/namensschild.scad.j2

39 lines
780 B
Plaintext
Raw Normal View History

2019-03-27 20:30:59 +01:00
$fn=64;
//$fn=32;
2020-04-29 17:27:06 +02:00
depth = 50/3;
2019-03-27 20:30:59 +01:00
width = 50;
2019-03-28 18:21:40 +01:00
name_width = 40;
2019-03-27 20:30:59 +01:00
height = 2;
height_plate = 1;
module name_file() {
2020-04-29 17:27:06 +02:00
translate([width/2, depth/2, 0]) {
import("{{ name }}.svg", center=true);
2019-03-27 20:30:59 +01:00
}
}
2019-03-28 18:21:40 +01:00
module box(height) {
hull() {
for(x=[0, width]) {
2020-04-29 17:27:06 +02:00
for(y=[0, depth]) {
2019-03-28 18:21:40 +01:00
translate([x, y, 0]) linear_extrude(height) circle(r=1);
2019-03-27 20:30:59 +01:00
}
}
2019-03-28 18:21:40 +01:00
}
}
2019-03-27 20:30:59 +01:00
2019-03-28 18:21:40 +01:00
difference() {
union() {
difference() {
box(height);
2020-04-29 17:27:06 +02:00
translate([1.5, 1.5, height_plate]) resize([width-1, depth-1, height-height_plate]) box(height-height_plate);
2019-03-28 18:21:40 +01:00
}
2019-03-27 20:30:59 +01:00
linear_extrude(height) {
name_file();
}
}
2020-04-29 17:27:06 +02:00
translate([width-2.5, depth-2.5, 0]) linear_extrude(height_plate) circle(r=1.9);
2019-03-27 20:30:59 +01:00
}