From 4f20574a91fa8785bcc143f9ab4de4dee744ec2e Mon Sep 17 00:00:00 2001 From: Matthieu Dubuget Date: Sun, 18 Nov 2018 14:13:12 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20biblioth=C3=A8que?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bibli-tetris.scad | 112 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 bibli-tetris.scad diff --git a/bibli-tetris.scad b/bibli-tetris.scad new file mode 100644 index 0000000..2ccbd9c --- /dev/null +++ b/bibli-tetris.scad @@ -0,0 +1,112 @@ + ep = 20; + prof = 200; + lb = 330; + hb = 240; + l = 1150; + + module planche (longueur, horizontale = true){ + color([0.878,0.694,0.133]) + translate([horizontale?0:ep,0,0]) + rotate([0,horizontale?0:-90,0]) + cube([longueur,prof, ep]); + } + + + module boite(largeur, hauteur){ + planche(largeur); + translate([0,0,hauteur-ep]) planche(largeur); + #translate([0,0,ep]) planche(hauteur - 2 * ep,false); + #translate([largeur-ep,0,ep]) planche(hauteur-2*ep,false); + echo("2 × ", largeur, " mm"); + echo("2 × ", hauteur - 2 * ep, "mm"); + } + + module l (largeur,h,w){ + h2 = (2*h-3*ep)/2; + planche(largeur); + translate ([w-ep,0,h-ep/2]) planche(largeur-w+ep); + translate ([0,0,2*h-ep]) planche(w); + translate([0,0,ep]) planche(2*(h-ep),false); + translate([largeur-ep,0,ep]) planche(h2,false); + translate([w-ep,0,h+ep/2]) planche(h2,false); + } + + + + boite(lb,hb); + translate([l-lb,0,0]) boite(lb, hb); + translate([0,0,hb]) boite(l,hb); + translate([0,0,hb*2]){ + boite(lb,hb); + translate([l-lb,0,0]) boite(lb, hb); + }; + translate ([0,0,hb*3]) boite(l,hb); + translate([0,0,hb*4]){ + boite(hb,lb); + translate([l-hb,0,0]) boite(hb, lb); + }; + + translate ([0,0,hb*4+lb]) boite(l,hb); + + color([1,0,0]) { + translate([1150,0,0]) planche(1930, false); + translate([1150-920,0,1930]) planche(920+ep); + translate([1150-920,0,1530]) planche(400,false); + translate ([0,0,1530]) planche(1150-920); + }; + + + +*rotate([90,0,0]) +translate ([1500,0,0]) +{ + cube([1328,457,ep]); + color([0,0,0]) translate([0,-60,30])text("1348 × 457",50); + + translate([0,500,0]){ + cube([2499,537,ep]); + color([0,0,0]) translate([0,-60,30])text("2499 × 537",50); + } + translate([0,1100,0]){ + cube([1166,1222,ep]); + color([0,0,0]) translate([0,-60,30])text("1166 × 1222",50); + } + translate([1500,0,0]){ + cube([345,203,ep]); + color([0,0,0]) translate([0,-60,30])text("345 × 203",50); + } + *translate([1900,0,0]) cube([894,251,ep]); + translate([1500,1100,0]){ + cube([800,203,ep]); + color([0,0,0]) translate([0,-60,30])text("800 × 203",50); + } + + translate([0,0,1]) + color([0,0,1]){ + for (i = [0:5]){ + translate([0,1100 + i * (prof + 3), 0]) planche(1150); + }; // 6 × 1150 + + for (j=[0:1]){ + for (i=[0:5]){ + translate ([i * (330 + 3),500 + j * (prof + 3) ,0]) + planche(330); + }; + for (i=[0:1]){ + translate([i * (200 + 3) + 6 * (330 + 3), 500 + j * (prof + 3),0]) planche(200); + }; + }; // 12 × 330 ET 4 × 200 + + for (j=[0:1]){ + for (i = [0:5]){ + translate([i * (200 + 3),j * (prof + 3),0]) planche(200); + }; + }; // 12 × 200 + translate([1500,0,0]) planche(200); + translate([1500,1100,0]) planche(200); + + + translate([0,-200,0]) + text("total : 6 × 1150 + 12 × 330 + 18 × 200",50); + }; +};