4571 |
jacho |
1 |
use <text/Write.scad> |
|
|
2 |
use <MLAB_logo.scad> |
|
|
3 |
use <sloupek.scad> |
|
|
4 |
use <plbase.scad> |
|
|
5 |
include <manufactury_conf.scad> |
|
|
6 |
include <../configuration.scad> |
|
|
7 |
|
|
|
8 |
bocnice(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice); |
|
|
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]) |
|
|
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]) |
|
|
71 |
difference () { |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
minkowski() |
|
|
75 |
{ |
|
|
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 |
|
|
77 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
78 |
} |
|
|
79 |
translate([tloustka_bocnice,tloustka_bocnice,-0.1]) |
|
|
80 |
minkowski() |
|
|
81 |
{ |
|
|
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 |
|
|
85 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
86 |
} |
|
|
87 |
|
|
|
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 |
|
|
|
102 |
//SLOUPKY |
|
|
103 |
//------------------------------------------------------------ |
|
|
104 |
//sloupek 1 |
|
|
105 |
|
|
|
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 (); |
|
|
108 |
|
|
|
109 |
//sloupek 2 |
|
|
110 |
|
|
|
111 |
translate([((pocet_der2)*vzdalenost_der)/2+tloustka_bocnice,-tloustka_bocnice,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
|
|
112 |
rotate(a=[0,0,90]) |
|
|
113 |
sloupek (); |
|
|
114 |
|
|
|
115 |
//sloupek 3 |
|
|
116 |
|
|
|
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]) |
|
|
118 |
rotate(a=[0,0,180]) |
|
|
119 |
sloupek (); |
|
|
120 |
|
|
|
121 |
//sloupek 4 |
|
|
122 |
|
|
|
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]) |
|
|
124 |
rotate(a=[0,0,270]) |
|
|
125 |
sloupek (); |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
|
|
|
131 |
} |
|
|
132 |
|
|
|
133 |
//---------------------------------------------------- |
|
|
134 |
//LOGO MLAB |
|
|
135 |
/* |
|
|
136 |
translate([(5-(pocet_der2)*vzdalenost_der)/2,0,0]) |
|
|
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(); |
|
|
141 |
*/ |
|
|
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 |
|
|
|
151 |
} |
|
|
152 |
|
|
|
153 |
|
|
|
154 |
} |
|
|
155 |
} |
|
|
156 |
|
|
|
157 |
|
|
|
158 |
|
|
|
159 |
|
4568 |
jacho |
160 |
|