1 |
$fn=40; // model faces resolution. |
1 |
$fn=40; // model faces resolution. |
2 |
|
2 |
|
3 |
pocet_der1=5; |
- |
|
4 |
pocet_der2=6; |
- |
|
5 |
radidus_hrany=5; |
- |
|
6 |
vzdalenost_der=10.16; |
- |
|
7 |
vzdalenost_od_okraje=vzdalenost_der/2; |
3 |
include <../configuration.scad> |
8 |
prumer_sroubu=3.4; |
- |
|
9 |
tloustka_plbase=2; |
- |
|
10 |
prekryti_der=-2; |
- |
|
11 |
|
4 |
|
12 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
5 |
AWSBOX01A_D01(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
13 |
|
6 |
|
14 |
module plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der){ |
7 |
module AWSBOX01A_D01(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der){ |
15 |
|
8 |
|
16 |
difference () { |
9 |
difference () { |
17 |
//union () { |
10 |
//union () { |
18 |
translate([radidus_hrany,radidus_hrany,0]) |
11 |
translate([radidus_hrany,radidus_hrany,0]) |
19 |
minkowski() |
12 |
minkowski() |
20 |
{ |
13 |
{ |
21 |
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 |
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 |
22 |
cylinder(r=radidus_hrany,h=0.1); |
15 |
cylinder(r=radidus_hrany,h=0.1); |
23 |
} |
16 |
} |
24 |
|
17 |
|
25 |
|
18 |
|
26 |
for (i = [0:1:pocet_der1-1]) { |
19 |
for (i = [0:1:pocet_der1-1]) { |
27 |
for (a = [0:1:pocet_der2-1]) { |
20 |
for (a = [0:1:pocet_der2-1]) { |
28 |
|
21 |
|
29 |
translate([vzdalenost_od_okraje+vzdalenost_der*i,vzdalenost_od_okraje+vzdalenost_der*a, (tloustka_plbase-prekryti_der)/2]) // center top screw |
22 |
translate([vzdalenost_od_okraje+vzdalenost_der*i,vzdalenost_od_okraje+vzdalenost_der*a, (tloustka_plbase-prekryti_der)/2]) // center top screw |
30 |
cylinder(((tloustka_plbase-prekryti_der)), d=prumer_sroubu, center=true); |
23 |
cylinder(((tloustka_plbase-prekryti_der)), d=prumer_sroubu, center=true); |
31 |
} |
24 |
} |
32 |
} |
25 |
} |
33 |
|
26 |
|
34 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
27 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
35 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
28 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
36 |
|
29 |
|
37 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
30 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
38 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
31 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
39 |
|
32 |
|
40 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
33 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
41 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
34 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
42 |
|
35 |
|
43 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
36 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
44 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
37 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
45 |
|
38 |
|
46 |
} |
39 |
} |
47 |
} |
40 |
} |