From d9bd902d2af94a962769d09833ab8a1909b4b118 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 16 Nov 2013 23:51:33 +0100 Subject: Tile: turned into a module --- models/tiles.scad | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/models/tiles.scad b/models/tiles.scad index fe886ea..f325d1d 100644 --- a/models/tiles.scad +++ b/models/tiles.scad @@ -1,12 +1,20 @@ -union() { - difference(){ - translate([0,0,0.4]) cube([50,50,4.6]); - translate([0,0,4]) linear_extrude(height=2) import("../graphics/arms.dxf"); - translate([2,38,4]) linear_extrude(height=2) scale(0.2) import("../graphics/arms.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]); +suite="arms"; +value="arms"; + +module tile(suite,value) { + union() { + difference(){ + translate([0,0,0.4]) cube([50,50,4.6]); + translate([0,0,4]) linear_extrude(height=2) + import(str("../graphics/",value,".dxf")); + translate([2,38,4]) linear_extrude(height=2) scale(0.2) 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]); + } } + +tile(suite,value); -- cgit v1.2.3