openscad/mtg_token.scad

52 lines
1 KiB
OpenSCAD
Raw Permalink Normal View History

2023-04-18 18:24:14 +00:00
$fn = 50;
mode = "cat"; // ["cat", "dog"]
base_y = 1;
emboss_y = 1;
module cat() {
2023-04-25 23:30:32 +00:00
translate([17.5,10,base_y]) {
2023-04-18 18:24:14 +00:00
linear_extrude(emboss_y)
text("Cat", font="Beleren", halign="center");
}
2023-04-25 23:30:32 +00:00
translate([17.5,2,base_y]) {
2023-04-18 18:24:14 +00:00
linear_extrude(emboss_y)
text("2/2", font="Beleren", size=5, halign="center");
}
2023-04-25 23:30:32 +00:00
translate([1.5,37,base_y])
2023-04-18 18:24:14 +00:00
linear_extrude(emboss_y)
scale(.08)
import("mtg_token/Cat_silhouette.svg");
}
module dog() {
2023-04-25 23:30:32 +00:00
translate([17.5,10,base_y]) {
2023-04-18 18:24:14 +00:00
linear_extrude(emboss_y)
text("Dog", font="Beleren", halign="center");
}
2023-04-25 23:30:32 +00:00
translate([17.5,2,base_y]) {
2023-04-18 18:24:14 +00:00
linear_extrude(emboss_y)
text("3/1", font="Beleren", size=5, halign="center");
}
2023-04-25 23:30:32 +00:00
translate([3.5,41,base_y])
2023-04-18 18:24:14 +00:00
linear_extrude(emboss_y)
scale(.07)
import("mtg_token/Dog_silhouette.svg");
}
hull() {
2023-04-25 23:30:32 +00:00
cube([35, 30, base_y]);
2023-04-18 18:24:14 +00:00
translate([10,40,0])
cylinder(r=10, h=base_y);
2023-04-25 23:30:32 +00:00
translate([25,40,0])
2023-04-18 18:24:14 +00:00
cylinder(r=10, h=base_y);
}
color("white") {
if (mode == "cat") {
cat();
} else {
dog();
}
}