L = 93; H = 23; P = 62; X_lcd = 8; Y_lcd = 21; L_lcd = 43; P_lcd = 15; X_bouton = 66; Y_bouton = 27; R_bouton = 8; h_plot = 3; d_plot = 2; e = 3; jeu = 1; module plots() { translate([65+e, 8+e, 0]) cylinder(e+h_plot, d_plot, d_plot); translate([65+e, 57+e, 0]) cylinder(e+h_plot, d_plot, d_plot); translate([14+e, 21+e, 0]) cylinder(e+h_plot, d_plot, d_plot); translate([14+e, 50+e, 0]) cylinder(e+h_plot, d_plot, d_plot); } module parois() { cube([L+2*e, P+2*e, e]); cube([e, P+2*e, H+2*e]); translate([L+e, 0, 0]) cube([e, P+2*e, H+2*e]); cube([L+2*e, e, H+2*e]); translate([0, P+e, 0]) cube([L+2*e, e, H+2*e]); } module alim() { translate([L, P+e-15, e+5]) cube([3*e, 10, 10]); } module usb() { } module sortie() { translate([L+e-13, P+e-23, -e]) cylinder(3*e, 4, 4); } module boitier() { difference() { parois(); alim(); usb(); sortie(); } plots(); } module taquets(j) { // Les deux embouts horizontaux translate([-j, P/2+e, -2*e+j]) cube([2*e, e+j, e+j]); translate([L-e+3*j, P/2+e, -2*e+j]) cube([2*e, e+j, e+j]); // Les deux jointures verticales translate([e, P/2+e, -2*e]) cube([e, e, 3*e]); translate([L-e, P/2+e, -2*e]) cube([e, e, 3*e]); } module couvercle(ep, j) { difference() { cube([L+e+j, P+e+j, ep]); translate([X_lcd+e/2, Y_lcd+e/2, -e]) cube([L_lcd, P_lcd, 3*e]); translate([X_bouton+e/2, Y_bouton+e/2, -e]) cylinder(3*e, R_bouton, R_bouton); } taquets(j); } translate([e/2, e/2, H+e]) couvercle(e, 0); /* difference() { boitier(); translate([(e-jeu)/2, (e-jeu)/2, H+e/2]) couvercle(2*e, jeu); } */