4592 |
jacho |
1 |
use <src/bocnice.scad> |
4578 |
jacho |
2 |
|
4592 |
jacho |
3 |
use <src/otvory.scad> |
|
|
4 |
use <src/plbase.scad> |
|
|
5 |
include <src/manufactury_conf.scad> |
4578 |
jacho |
6 |
include <configuration.scad> |
4592 |
jacho |
7 |
include <src/otvory_conf.scad> |
4578 |
jacho |
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); |
4592 |
jacho |
44 |
|
|
|
45 |
posun_p4=0; |
|
|
46 |
translate([posun_p4*vzdalenost_der,0,0]) |
|
|
47 |
IR(tloustka_bocnice,vyska_bocnice); |
|
|
48 |
|
4586 |
jacho |
49 |
} |
4592 |
jacho |
50 |
} |
4578 |
jacho |
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
//Vytvoreni zadniho celicka krabicky |
|
|
55 |
//-------------------------------------------------------- |
4586 |
jacho |
56 |
translate([((pocet_der2-1)*vzdalenost_der)/2,(pocet_der1-1)*vzdalenost_der+vzdalenost_od_okraje+tloustka_bocnice/2,-(vyska_bocnice/2)]) |
|
|
57 |
{ |
|
|
58 |
//složí k posunu otvoru v násobku děr |
|
|
59 |
posun_z1=10; |
|
|
60 |
translate([-posun_z1*vzdalenost_der,0,0]) |
|
|
61 |
rotate(a=[0,0,180]) |
|
|
62 |
USBI2C01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
63 |
|
4586 |
jacho |
64 |
posun_z2=1; |
|
|
65 |
translate([-posun_z2*vzdalenost_der,0,0]) |
|
|
66 |
rotate(a=[0,0,180]) |
|
|
67 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
68 |
|
4586 |
jacho |
69 |
posun_z3=10; |
|
|
70 |
translate([-posun_z3*vzdalenost_der,0,0]) |
|
|
71 |
rotate(a=[0,0,180]) |
|
|
72 |
MIC338(tloustka_bocnice,vzdalenost_der,vyska_bocnice); |
4578 |
jacho |
73 |
|
4586 |
jacho |
74 |
posun_z4=5; |
|
|
75 |
translate([-posun_z4*vzdalenost_der,0,0]) |
|
|
76 |
rotate(a=[0,0,180]) |
|
|
77 |
UNIPOWER02A(tloustka_bocnice,vzdalenost_der); |
|
|
78 |
|
4578 |
jacho |
79 |
|
4586 |
jacho |
80 |
} |
4578 |
jacho |
81 |
|
|
|
82 |
//Vytvoreni leveho celicka krabicky |
|
|
83 |
//-------------------------------------------------------- |
|
|
84 |
|
4586 |
jacho |
85 |
translate([-((pocet_der2-1)*vzdalenost_der)/2-vzdalenost_od_okraje-tloustka_bocnice/2,(pocet_der1-1)*vzdalenost_der,-(vyska_bocnice/2)]) |
|
|
86 |
{ |
|
|
87 |
//složí k posunu otvoru v násobku děr |
|
|
88 |
posun_l1=10; |
|
|
89 |
translate([0,-posun_l1*vzdalenost_der,0]) |
|
|
90 |
rotate(a=[0,0,-90]) |
|
|
91 |
USBI2C01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
92 |
|
4586 |
jacho |
93 |
posun_l2=10; |
|
|
94 |
translate([0,-posun_l2*vzdalenost_der,0]) rotate(a=[0,0,-90]) |
|
|
95 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
4578 |
jacho |
96 |
|
4586 |
jacho |
97 |
posun_l3=10; |
|
|
98 |
translate([0,-posun_l3*vzdalenost_der,0]) rotate(a=[0,0,-90]) |
|
|
99 |
MIC338(tloustka_bocnice,vzdalenost_der,vyska_bocnice); |
4578 |
jacho |
100 |
|
4586 |
jacho |
101 |
posun_l4=0; |
|
|
102 |
translate([0,-posun_l4*vzdalenost_der,0]) |
|
|
103 |
rotate(a=[0,0,-90]) |
|
|
104 |
CHLADICI_OTVORY(tloustka_bocnice,vzdalenost_der,pocet_der1-1,vyska_bocnice); |
|
|
105 |
} |
4578 |
jacho |
106 |
|
|
|
107 |
//Vytvoreni praveho celicka krabicky |
|
|
108 |
//-------------------------------------------------------- |
4586 |
jacho |
109 |
translate([+((pocet_der2-1)*vzdalenost_der)/2+vzdalenost_od_okraje+tloustka_bocnice/2,0,-(vyska_bocnice/2)]) |
|
|
110 |
{ |
|
|
111 |
//složí k posunu otvoru v násobku děr |
|
|
112 |
posun_pr1=10; |
|
|
113 |
translate([0,posun_pr1*vzdalenost_der,0]) |
|
|
114 |
rotate(a=[0,0,90]) |
|
|
115 |
UNIPOWER03A(tloustka_bocnice,vzdalenost_der); |
4580 |
jacho |
116 |
|
4586 |
jacho |
117 |
posun_pr2=10; |
|
|
118 |
translate([0,posun_pr2*vzdalenost_der,0]) |
|
|
119 |
rotate(a=[0,0,90]) |
|
|
120 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
4580 |
jacho |
121 |
|
4586 |
jacho |
122 |
posun_pr3=10; |
|
|
123 |
translate([0,posun_pr3*vzdalenost_der,0]) |
|
|
124 |
rotate(a=[0,0,90]) |
|
|
125 |
MIC338(tloustka_bocnice,vzdalenost_der,vyska_bocnice); |
4580 |
jacho |
126 |
|
4586 |
jacho |
127 |
posun_pr4=0; |
|
|
128 |
translate([0,posun_pr4*vzdalenost_der,0]) |
|
|
129 |
rotate(a=[0,0,90]) |
4636 |
jacho |
130 |
CHLADICI_OTVORY2(tloustka_bocnice,vzdalenost_der,pocet_der1-1,vyska_bocnice); |
4586 |
jacho |
131 |
|
|
|
132 |
} |
4578 |
jacho |
133 |
} |
4636 |
jacho |
134 |
} |
|
|
135 |
|