4331 |
jacho |
1 |
use <text/Write.scad> |
|
|
2 |
use <MLAB_logo.scad> |
|
|
3 |
use <sloupek.scad> |
4568 |
jacho |
4 |
use <plbase.scad> |
4331 |
jacho |
5 |
include <manufactury_conf.scad> |
|
|
6 |
include <../configuration.scad> |
|
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
//Bočnice |
|
|
11 |
//------------------------------------------------------------ |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
module bocnice(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice){ |
|
|
15 |
|
|
|
16 |
difference () { |
|
|
17 |
union() |
|
|
18 |
{ |
|
|
19 |
translate([-((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje)/2,-vzdalenost_od_okraje,vyska_bocnice/2]) |
|
|
20 |
rotate(a=[180,0,90]) |
|
|
21 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
22 |
translate([-tloustka_bocnice,-tloustka_bocnice,0]) |
4564 |
jacho |
23 |
|
|
|
24 |
//obvod |
|
|
25 |
difference () { |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
minkowski() |
|
|
29 |
{ |
|
|
30 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,vyska_bocnice+tloustka_plbase]); // base plastics brick |
|
|
31 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
32 |
} |
|
|
33 |
translate([tloustka_bocnice,tloustka_bocnice,-0.1]) |
|
|
34 |
minkowski() |
|
|
35 |
{ |
|
|
36 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,vyska_bocnice+tloustka_plbase+0.2]); // base plastics brick |
|
|
37 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
38 |
} |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
translate([-radidus_hrany-tloustka_bocnice,-radidus_hrany-tloustka_bocnice,-0.1]) |
|
|
42 |
cube([vzdalenost_der/2+tloustka_bocnice,vzdalenost_der/2+tloustka_bocnice,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
translate([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-radidus_hrany+2*tloustka_bocnice-vzdalenost_der/2,-radidus_hrany-tloustka_bocnice,-0.1]) |
|
|
46 |
cube([vzdalenost_der/2+tloustka_bocnice,vzdalenost_der/2+tloustka_bocnice,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
47 |
|
|
|
48 |
|
|
|
49 |
translate([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-radidus_hrany+2*tloustka_bocnice-vzdalenost_der/2,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-radidus_hrany+2*tloustka_bocnice-vzdalenost_der/2,-0.1]) |
|
|
50 |
cube([vzdalenost_der/2+tloustka_bocnice,vzdalenost_der/2+tloustka_bocnice,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
51 |
|
|
|
52 |
|
|
|
53 |
translate([-radidus_hrany-tloustka_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-radidus_hrany+2*tloustka_bocnice-vzdalenost_der/2,-0.1]) |
|
|
54 |
cube([vzdalenost_der/2+tloustka_bocnice,vzdalenost_der/2+tloustka_bocnice,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
55 |
} |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
//pro vyboceni sloupku |
|
|
66 |
|
|
|
67 |
translate([-((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje)/2,-vzdalenost_od_okraje,vyska_bocnice/2]) |
|
|
68 |
rotate(a=[180,0,90]) |
|
|
69 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
70 |
translate([-2*tloustka_bocnice,-2*tloustka_bocnice,0]) |
4331 |
jacho |
71 |
difference () { |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
minkowski() |
|
|
75 |
{ |
4564 |
jacho |
76 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+4*tloustka_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+4*tloustka_bocnice,vyska_bocnice+tloustka_plbase]); // base plastics brick |
4331 |
jacho |
77 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
78 |
} |
4564 |
jacho |
79 |
translate([tloustka_bocnice,tloustka_bocnice,-0.1]) |
4331 |
jacho |
80 |
minkowski() |
|
|
81 |
{ |
4564 |
jacho |
82 |
|
|
|
83 |
|
|
|
84 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,vyska_bocnice+tloustka_plbase+0.2]); // base plastics brick |
4331 |
jacho |
85 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
86 |
} |
|
|
87 |
|
4564 |
jacho |
88 |
translate([-radidus_hrany+vzdalenost_der/2+tloustka_bocnice+1,-radidus_hrany-0.25,-0.1]) |
|
|
89 |
|
|
|
90 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje+4*tloustka_bocnice-vzdalenost_der-2*tloustka_bocnice-2,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje+4*tloustka_bocnice+0.5,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
translate([-radidus_hrany-0.25,-radidus_hrany+vzdalenost_der/2+tloustka_bocnice+1,-0.1]) |
|
|
94 |
|
|
|
95 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje+4*tloustka_bocnice+0.5,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje+4*tloustka_bocnice-vzdalenost_der-2*tloustka_bocnice-2,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
} |
|
|
101 |
|
4331 |
jacho |
102 |
//SLOUPKY |
|
|
103 |
//------------------------------------------------------------ |
|
|
104 |
//sloupek 1 |
|
|
105 |
|
4568 |
jacho |
106 |
translate([(-(pocet_der2)*vzdalenost_der)/2-tloustka_bocnice,-tloustka_bocnice,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
|
|
107 |
sloupek (); |
4331 |
jacho |
108 |
|
|
|
109 |
//sloupek 2 |
|
|
110 |
|
4568 |
jacho |
111 |
translate([((pocet_der2)*vzdalenost_der)/2+tloustka_bocnice,-tloustka_bocnice,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
4331 |
jacho |
112 |
rotate(a=[0,0,90]) |
4568 |
jacho |
113 |
sloupek (); |
4331 |
jacho |
114 |
|
|
|
115 |
//sloupek 3 |
|
|
116 |
|
4568 |
jacho |
117 |
translate([((pocet_der2)*vzdalenost_der)/2+tloustka_bocnice, (pocet_der1)*vzdalenost_der+tloustka_bocnice,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
4331 |
jacho |
118 |
rotate(a=[0,0,180]) |
4568 |
jacho |
119 |
sloupek (); |
4331 |
jacho |
120 |
|
|
|
121 |
//sloupek 4 |
|
|
122 |
|
4568 |
jacho |
123 |
translate([-((pocet_der2)*vzdalenost_der)/2-tloustka_bocnice, (pocet_der1)*vzdalenost_der+tloustka_bocnice,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
4331 |
jacho |
124 |
rotate(a=[0,0,270]) |
4568 |
jacho |
125 |
sloupek (); |
4331 |
jacho |
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
} |
|
|
132 |
|
|
|
133 |
//---------------------------------------------------- |
|
|
134 |
//LOGO MLAB |
4564 |
jacho |
135 |
/* |
|
|
136 |
translate([(5-(pocet_der2)*vzdalenost_der)/2,0,0]) |
4331 |
jacho |
137 |
translate ([0, -vzdalenost_od_okraje-tloustka_bocnice*1/2,0]) // |
|
|
138 |
rotate([0, 90, 270]) |
|
|
139 |
scale(v = [logo_sirka, logo_vyska, 0.3]) |
|
|
140 |
MLAB_logo_short(); |
4564 |
jacho |
141 |
*/ |
4568 |
jacho |
142 |
|
|
|
143 |
|
|
|
144 |
translate([-0.5,-0.5,vyska_bocnice/2-tloustka_plbase/2+0.05]) |
|
|
145 |
rotate(a=[0,0,0]) |
|
|
146 |
{ |
|
|
147 |
|
|
|
148 |
|
|
|
149 |
plbase_vrchni_kryt_pro_odecet(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice,-0.5,tloustka_plbase+0.1); |
|
|
150 |
|
4331 |
jacho |
151 |
} |
4568 |
jacho |
152 |
|
|
|
153 |
|
4331 |
jacho |
154 |
} |
4568 |
jacho |
155 |
} |
4331 |
jacho |
156 |
|
|
|
157 |
|
4564 |
jacho |
158 |
|
4331 |
jacho |
159 |
|
4568 |
jacho |
160 |
|