39 lines
780 B
Django/Jinja
39 lines
780 B
Django/Jinja
$fn=64;
|
|
//$fn=32;
|
|
|
|
depth = 50/3;
|
|
width = 50;
|
|
name_width = 40;
|
|
height = 2;
|
|
height_plate = 1;
|
|
|
|
module name_file() {
|
|
translate([width/2, depth/2, 0]) {
|
|
import("{{ name }}.svg", center=true);
|
|
}
|
|
}
|
|
|
|
module box(height) {
|
|
hull() {
|
|
for(x=[0, width]) {
|
|
for(y=[0, depth]) {
|
|
translate([x, y, 0]) linear_extrude(height) circle(r=1);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
difference() {
|
|
union() {
|
|
difference() {
|
|
box(height);
|
|
translate([1.5, 1.5, height_plate]) resize([width-1, depth-1, height-height_plate]) box(height-height_plate);
|
|
}
|
|
linear_extrude(height) {
|
|
name_file();
|
|
}
|
|
}
|
|
|
|
translate([width-2.5, depth-2.5, 0]) linear_extrude(height_plate) circle(r=1.9);
|
|
}
|