4725 |
jacho |
1 |
use <src/bocnice.scad> |
|
|
2 |
|
|
|
3 |
use <src/otvory.scad> |
|
|
4 |
use <src/plbase.scad> |
|
|
5 |
include <src/manufactury_conf.scad> |
|
|
6 |
include <configuration.scad> |
|
|
7 |
include <src/otvory_conf.scad> |
|
|
8 |
|
|
|
9 |
upravena_bocnice(); |
|
|
10 |
|
|
|
11 |
//Slouzi pro vytvoreni bocnice s vlastnimi otvory |
|
|
12 |
|
|
|
13 |
|
|
|
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 |
|
|
|
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); |
|
|
23 |
|
|
|
24 |
} |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
//Vytvoreni otvorů v přední stěně |
|
|
28 |
//-------------------------------------------------------- |
|
|
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); |
|
|
36 |
|
|
|
37 |
posun_p2=4; |
|
|
38 |
translate([posun_p2*vzdalenost_der,0,0]) |
|
|
39 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
|
|
40 |
|
|
|
41 |
posun_p3=20; |
|
|
42 |
translate([posun_p3*vzdalenost_der,0,0]) |
|
|
43 |
CHLADICI_OTVORY(tloustka_bocnice,vzdalenost_der,4,vyska_bocnice); |
|
|
44 |
|
|
|
45 |
posun_p4=0; |
|
|
46 |
translate([posun_p4*vzdalenost_der,0,0]) |
|
|
47 |
IR(tloustka_bocnice,vyska_bocnice); |
|
|
48 |
|
|
|
49 |
} |
|
|
50 |
} |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
//Vytvoreni zadniho celicka krabicky |
|
|
55 |
//-------------------------------------------------------- |
|
|
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); |
|
|
63 |
|
|
|
64 |
posun_z2=1; |
|
|
65 |
translate([-posun_z2*vzdalenost_der,0,0]) |
|
|
66 |
rotate(a=[0,0,180]) |
|
|
67 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
|
|
68 |
|
|
|
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); |
|
|
73 |
|
|
|
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 |
|
|
|
79 |
|
|
|
80 |
} |
|
|
81 |
|
|
|
82 |
//Vytvoreni leveho celicka krabicky |
|
|
83 |
//-------------------------------------------------------- |
|
|
84 |
|
|
|
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); |
|
|
92 |
|
|
|
93 |
posun_l2=10; |
|
|
94 |
translate([0,-posun_l2*vzdalenost_der,0]) rotate(a=[0,0,-90]) |
|
|
95 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
|
|
96 |
|
|
|
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); |
|
|
100 |
|
|
|
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 |
} |
|
|
106 |
|
|
|
107 |
//Vytvoreni praveho celicka krabicky |
|
|
108 |
//-------------------------------------------------------- |
|
|
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); |
|
|
116 |
|
|
|
117 |
posun_pr2=10; |
|
|
118 |
translate([0,posun_pr2*vzdalenost_der,0]) |
|
|
119 |
rotate(a=[0,0,90]) |
|
|
120 |
I2CDIFF01A(tloustka_bocnice,vzdalenost_der); |
|
|
121 |
|
|
|
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); |
|
|
126 |
|
|
|
127 |
posun_pr4=0; |
|
|
128 |
translate([0,posun_pr4*vzdalenost_der,0]) |
|
|
129 |
rotate(a=[0,0,90]) |
|
|
130 |
CHLADICI_OTVORY2(tloustka_bocnice,vzdalenost_der,pocet_der1-1,vyska_bocnice); |
|
|
131 |
|
|
|
132 |
} |
|
|
133 |
} |
|
|
134 |
} |
|
|
135 |
|