summaryrefslogtreecommitdiff
path: root/src/piecepack.scad
blob: ad0abf72517a3413b191a028d184e66e8f383537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module tile(suite,value) {
    union() {
        difference(){
            translate([0,0,0.4]) cube([50,50,4.6]);
            if (value == "ace") {
                translate([0,0,4]) linear_extrude(height=2) 
                    import(str("../graphics/",suite,".dxf"));
            } else if (value != "null") {
                translate([0,0,4]) linear_extrude(height=2) 
                    import(str("../graphics/",value,".dxf"));
            }
            translate([0,35,4]) linear_extrude(height=2) scale(0.3) import(str("../graphics/",suite,".dxf"));
            }
        cube([24.5,24.5,1]);
        translate([25.5,0,0]) cube([24.5,24.5,1]);
        translate([0,25.5,0]) cube([24.5,24.5,1]);
        translate([25.5,25.5,0]) cube([24.5,24.5,1]);
    }
}

module coin(suite,value) {
    difference() {
        cylinder(r=10, h=3);
        translate([0,0,-0.5]) linear_extrude(height=1.5) scale(0.4) 
            translate([-25,-25,0])
            import(str("../graphics/",suite,".dxf"),center=true);
        if (value != "null") {
            translate([0,0,2]) linear_extrude(height=1.5) scale(0.4)
                translate([-25,-25,0])
                import(str("../graphics/",value,".dxf"),center=true);
        }
        translate([0,10,3]) rotate([90,0,0]) cylinder(r=0.8, h=2);
        translate([0,10,0]) rotate([90,0,0]) cylinder(r=0.8, h=2);
    }
}