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