Rev Author Line No. Line
4546 jacho 1 $fn=40; // model faces resolution.
2  
4551 jacho 3 include <../configuration.scad>
4546 jacho 4  
4551 jacho 5 AWSBOX01A_D01(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der);
4546 jacho 6  
4551 jacho 7 module AWSBOX01A_D01(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der){
4546 jacho 8  
9 difference () {
10 //union () {
11 translate([radidus_hrany,radidus_hrany,0])
12 minkowski()
13 {
14 cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,tloustka_plbase]); // base plastics brick
15 cylinder(r=radidus_hrany,h=0.1);
16 }
17  
18  
19 for (i = [0:1:pocet_der1-1]) {
20 for (a = [0:1:pocet_der2-1]) {
21  
22 translate([vzdalenost_od_okraje+vzdalenost_der*i,vzdalenost_od_okraje+vzdalenost_der*a, (tloustka_plbase-prekryti_der)/2]) // center top screw
23 cylinder(((tloustka_plbase-prekryti_der)), d=prumer_sroubu, center=true);
24 }
25 }
26  
27 translate([vzdalenost_od_okraje,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw
28 cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true);
29  
30 translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw
31 cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true);
32  
33 translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw
34 cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true);
35  
36 translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw
37 cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true);
38  
39 }
40 }