4578 |
jacho |
1 |
use <configuration/bocnice.scad> |
|
|
2 |
|
|
|
3 |
use <configuration/otvory.scad> |
|
|
4 |
use <configuration/plbase.scad> |
|
|
5 |
include <configuration/manufactury_conf.scad> |
|
|
6 |
include <configuration.scad> |
|
|
7 |
include <configuration/otvory_conf.scad> |
|
|
8 |
|
|
|
9 |
upravena_bocnice(); |
|
|
10 |
|
4586 |
jacho |
11 |
//Slouzi pro vytvoreni bocnice s vlastnimi otvory |
4578 |
jacho |
12 |
|
4586 |
jacho |
13 |
|
4578 |
jacho |
14 |
module upravena_bocnice() |
|
|
15 |
{ |
|
|
16 |
difference() { |
|
|
17 |
union() { |
|
|
18 |
bocnice(pocet_der1-1,pocet_der2-1,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice); |
|
|
19 |
|
4586 |
jacho |
20 |
translate([-((pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje)/2-tloustka_bocnice,-vzdalenost_od_okraje-tloustka_bocnice,-(vyska_bocnice/2)]) |
|
|
21 |
rotate(a=[180,0,90]) |
|
|
22 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,tloustka_bocnice); |
4578 |
jacho |
23 |
|
4586 |
jacho |
24 |
} |
|
|
25 |
|
|
|
26 |
|
4578 |
jacho |
27 |
//Vytvoreni otvorů v přední stěně |
|
|
28 |
//-------------------------------------------------------- |
4586 |
jacho |
29 |
union() { |
|
|
30 |
translate([-((pocet_der2-1)*vzdalenost_der)/2,-vzdalenost_od_okraje-tloustka_bocnice/2,-(vyska_bocnice/2)]) |
|
|
31 |
{ |
|
|
32 |
//složí k posunu otvoru v násobku děr |
|
|
33 |
posun_p1=1; |
|
|
34 |
translate([posun_p1*vzdalenost_der,0,0]) |
|
|
35 |
USBI2C01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
36 |
|
4586 |
jacho |
37 |
posun_p2=4; |
|
|
38 |
translate([posun_p2*vzdalenost_der,0,0]) |
|
|
39 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
40 |
|
4586 |
jacho |
41 |
posun_p3=20; |
|
|
42 |
translate([posun_p3*vzdalenost_der,0,0]) |
|
|
43 |
CHLADICI_OTVORY(tloustka_bocnice,vzdalenost_der,4,vyska_bocnice); |
|
|
44 |
} |
|
|
45 |
} |
4578 |
jacho |
46 |
|
|
|
47 |
|
|
|
48 |
|
|
|
49 |
//Vytvoreni zadniho celicka krabicky |
|
|
50 |
//-------------------------------------------------------- |
4586 |
jacho |
51 |
translate([((pocet_der2-1)*vzdalenost_der)/2,(pocet_der1-1)*vzdalenost_der+vzdalenost_od_okraje+tloustka_bocnice/2,-(vyska_bocnice/2)]) |
|
|
52 |
{ |
|
|
53 |
//složí k posunu otvoru v násobku děr |
|
|
54 |
posun_z1=10; |
|
|
55 |
translate([-posun_z1*vzdalenost_der,0,0]) |
|
|
56 |
rotate(a=[0,0,180]) |
|
|
57 |
USBI2C01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
58 |
|
4586 |
jacho |
59 |
posun_z2=1; |
|
|
60 |
translate([-posun_z2*vzdalenost_der,0,0]) |
|
|
61 |
rotate(a=[0,0,180]) |
|
|
62 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
63 |
|
4586 |
jacho |
64 |
posun_z3=10; |
|
|
65 |
translate([-posun_z3*vzdalenost_der,0,0]) |
|
|
66 |
rotate(a=[0,0,180]) |
|
|
67 |
MIC338(tloustka_bocnice,vzdalenost_der,vyska_bocnice); |
4578 |
jacho |
68 |
|
4586 |
jacho |
69 |
posun_z4=5; |
|
|
70 |
translate([-posun_z4*vzdalenost_der,0,0]) |
|
|
71 |
rotate(a=[0,0,180]) |
|
|
72 |
UNIPOWER02A(tloustka_bocnice,vzdalenost_der); |
|
|
73 |
|
4578 |
jacho |
74 |
|
4586 |
jacho |
75 |
} |
4578 |
jacho |
76 |
|
|
|
77 |
//Vytvoreni leveho celicka krabicky |
|
|
78 |
//-------------------------------------------------------- |
|
|
79 |
|
4586 |
jacho |
80 |
translate([-((pocet_der2-1)*vzdalenost_der)/2-vzdalenost_od_okraje-tloustka_bocnice/2,(pocet_der1-1)*vzdalenost_der,-(vyska_bocnice/2)]) |
|
|
81 |
{ |
|
|
82 |
//složí k posunu otvoru v násobku děr |
|
|
83 |
posun_l1=10; |
|
|
84 |
translate([0,-posun_l1*vzdalenost_der,0]) |
|
|
85 |
rotate(a=[0,0,-90]) |
|
|
86 |
USBI2C01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
87 |
|
4586 |
jacho |
88 |
posun_l2=10; |
|
|
89 |
translate([0,-posun_l2*vzdalenost_der,0]) rotate(a=[0,0,-90]) |
|
|
90 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
91 |
|
4586 |
jacho |
92 |
posun_l3=10; |
|
|
93 |
translate([0,-posun_l3*vzdalenost_der,0]) rotate(a=[0,0,-90]) |
|
|
94 |
MIC338(tloustka_bocnice,vzdalenost_der,vyska_bocnice); |
4578 |
jacho |
95 |
|
4586 |
jacho |
96 |
posun_l4=0; |
|
|
97 |
translate([0,-posun_l4*vzdalenost_der,0]) |
|
|
98 |
rotate(a=[0,0,-90]) |
|
|
99 |
CHLADICI_OTVORY(tloustka_bocnice,vzdalenost_der,pocet_der1-1,vyska_bocnice); |
|
|
100 |
} |
4578 |
jacho |
101 |
|
|
|
102 |
//Vytvoreni praveho celicka krabicky |
|
|
103 |
//-------------------------------------------------------- |
4586 |
jacho |
104 |
translate([+((pocet_der2-1)*vzdalenost_der)/2+vzdalenost_od_okraje+tloustka_bocnice/2,0,-(vyska_bocnice/2)]) |
|
|
105 |
{ |
|
|
106 |
//složí k posunu otvoru v násobku děr |
|
|
107 |
posun_pr1=10; |
|
|
108 |
translate([0,posun_pr1*vzdalenost_der,0]) |
|
|
109 |
rotate(a=[0,0,90]) |
|
|
110 |
UNIPOWER03A(tloustka_bocnice,vzdalenost_der); |
4580 |
jacho |
111 |
|
4586 |
jacho |
112 |
posun_pr2=10; |
|
|
113 |
translate([0,posun_pr2*vzdalenost_der,0]) |
|
|
114 |
rotate(a=[0,0,90]) |
|
|
115 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
4580 |
jacho |
116 |
|
4586 |
jacho |
117 |
posun_pr3=10; |
|
|
118 |
translate([0,posun_pr3*vzdalenost_der,0]) |
|
|
119 |
rotate(a=[0,0,90]) |
|
|
120 |
MIC338(tloustka_bocnice,vzdalenost_der,vyska_bocnice); |
4580 |
jacho |
121 |
|
4586 |
jacho |
122 |
posun_pr4=0; |
|
|
123 |
translate([0,posun_pr4*vzdalenost_der,0]) |
|
|
124 |
rotate(a=[0,0,90]) |
|
|
125 |
CHLADICI_OTVORY(tloustka_bocnice,vzdalenost_der,pocet_der1-1,vyska_bocnice); |
|
|
126 |
|
|
|
127 |
} |
4578 |
jacho |
128 |
} |
|
|
129 |
} |