4731 |
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 |
dno(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje1,vzdalenost_od_okraje2,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice); |
|
|
9 |
|
|
|
10 |
//Bočnice |
|
|
11 |
//------------------------------------------------------------ |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
module dno(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje1,vzdalenost_od_okraje2,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice){ |
|
|
15 |
|
|
|
16 |
difference () { |
|
|
17 |
union() |
|
|
18 |
{ |
|
|
19 |
translate([-((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2)/2,-vzdalenost_od_okraje1,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 |
translate([-tloustka_bocnice,-tloustka_bocnice,0]) |
|
|
29 |
minkowski() |
|
|
30 |
{ |
|
|
31 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+4*tloustka_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+4*tloustka_bocnice,vyska_bocnice+tloustka_plbase]); // base plastics brick |
|
|
32 |
cylinder(r=radidus_hrany,h=0.01); |
|
|
33 |
} |
|
|
34 |
translate([-dno_vule,-dno_vule,-dno_sila_materialu]) |
|
|
35 |
|
|
|
36 |
minkowski() |
|
|
37 |
{ |
|
|
38 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+2*tloustka_bocnice+2*dno_vule,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+2*tloustka_bocnice+2*dno_vule,vyska_bocnice+tloustka_plbase+0.2]); // base plastics brick |
|
|
39 |
cylinder(r=radidus_hrany,h=0.01); |
|
|
40 |
} |
|
|
41 |
|
|
|
42 |
translate([tloustka_bocnice-radidus_hrany+dno_spodni_rantl,tloustka_bocnice-radidus_hrany+dno_spodni_rantl,-0.1]) |
|
|
43 |
|
|
|
44 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*dno_spodni_rantl,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2-2*dno_spodni_rantl,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
} |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
|
|
|
54 |
//uchyt 1 |
|
|
55 |
translate([(-(pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje2-Uchyt_radius/2-Uchyt_x+0.5,-vzdalenost_od_okraje1+vzdalenost_der/2,-vyska_bocnice/2-tloustka_plbase]) |
|
|
56 |
dno_uchyt(); |
|
|
57 |
|
|
|
58 |
//uchyt 2 |
|
|
59 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje2+tloustka_bocnice+Uchyt_radius-0.5,-vzdalenost_od_okraje1+vzdalenost_der/2,-vyska_bocnice/2-tloustka_plbase]) |
|
|
60 |
dno_uchyt(); |
|
|
61 |
|
|
|
62 |
//uchyt 3 |
|
|
63 |
translate([(-(pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje2-Uchyt_radius/2-Uchyt_x+0.5,(pocet_der1)*vzdalenost_der+vzdalenost_od_okraje1-Uchyt_y+Uchyt_radius-vzdalenost_der/2,-vyska_bocnice/2-tloustka_plbase]) |
|
|
64 |
dno_uchyt(); |
|
|
65 |
|
|
|
66 |
//uchyt 4 |
|
|
67 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje2+tloustka_bocnice+Uchyt_radius-0.5,(pocet_der1)*vzdalenost_der+vzdalenost_od_okraje1-Uchyt_y+Uchyt_radius-vzdalenost_der/2,-vyska_bocnice/2-tloustka_plbase]) |
|
|
68 |
dno_uchyt(); |
|
|
69 |
|
|
|
70 |
} |
|
|
71 |
|
|
|
72 |
//---------------------------------------------------- |
|
|
73 |
//LOGO MLAB |
|
|
74 |
/* |
|
|
75 |
translate([(5-(pocet_der2)*vzdalenost_der)/2,0,0]) |
|
|
76 |
translate ([0, -vzdalenost_od_okraje-tloustka_bocnice*1/2,0]) // |
|
|
77 |
rotate([0, 90, 270]) |
|
|
78 |
scale(v = [logo_sirka, logo_vyska, 0.3]) |
|
|
79 |
MLAB_logo_short(); |
|
|
80 |
*/ |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
//plbase odecet na kryt |
|
|
85 |
translate([0,0,vyska_bocnice/2-tloustka_plbase/2+0.05]) |
|
|
86 |
rotate(a=[0,0,0]) |
|
|
87 |
{ |
|
|
88 |
plbase_vrchni_kryt_pro_odecet(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje1,vzdalenost_od_okraje2,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice,0,tloustka_plbase+0.1); |
|
|
89 |
} |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
//odstranění vrchního přebytku |
|
|
93 |
translate([0,-20+(pocet_der2+1)*vzdalenost_der/2,vyska_bocnice/2-tloustka_plbase/2+0.05-vyska_bocnice/2+dno_vyska_ramecku]) |
|
|
94 |
cube([(pocet_der2+3)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+4*tloustka_bocnice,(pocet_der1+3)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+4*tloustka_bocnice,vyska_bocnice+tloustka_plbase], true); |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
//začištění vnitřku |
|
|
98 |
|
|
|
99 |
translate([-((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2)/2,-vzdalenost_od_okraje1,vyska_bocnice/2]) |
|
|
100 |
rotate(a=[180,0,90]) |
|
|
101 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
102 |
translate([-tloustka_bocnice,-tloustka_bocnice,0]) |
|
|
103 |
|
|
|
104 |
translate([-dno_vule,-dno_vule,-dno_sila_materialu]) |
|
|
105 |
|
|
|
106 |
minkowski() |
|
|
107 |
{ |
|
|
108 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+2*tloustka_bocnice+2*dno_vule,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+2*tloustka_bocnice+2*dno_vule,vyska_bocnice+tloustka_plbase+0.2]); // base plastics brick |
|
|
109 |
cylinder(r=radidus_hrany,h=0.01); |
|
|
110 |
} |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
//otvory na výčnělky horní |
|
|
114 |
|
|
|
115 |
translate([-((pocet_der2+3)*vzdalenost_der+vzdalenost_od_okraje2+tloustka_bocnice+Uchyt_radius-0.5)/2,-vzdalenost_od_okraje1+vzdalenost_der/2-Uchyt_radius-0.5,-vyska_bocnice/2-tloustka_plbase+tloustka_plbase+dno_sila_materialu+dno_vule_na_matky]) |
|
|
116 |
|
|
|
117 |
|
|
|
118 |
cube([((pocet_der2+3)*vzdalenost_der)+vzdalenost_od_okraje2+tloustka_bocnice+Uchyt_radius-0.5,Uchyt_y+1,tloustka_plbase+dno_sila_materialu+dno_vule_na_matky]); |
|
|
119 |
|
|
|
120 |
translate([-((pocet_der2+3)*vzdalenost_der+vzdalenost_od_okraje2+tloustka_bocnice+Uchyt_radius-0.5)/2,(pocet_der1)*vzdalenost_der+vzdalenost_od_okraje1-Uchyt_y-vzdalenost_der/2-0.5,-vyska_bocnice/2-tloustka_plbase+tloustka_plbase+dno_sila_materialu+dno_vule_na_matky]) |
|
|
121 |
|
|
|
122 |
cube([((pocet_der2+3)*vzdalenost_der)+vzdalenost_od_okraje2+tloustka_bocnice+Uchyt_radius-0.5,Uchyt_y+1,tloustka_plbase+dno_sila_materialu+dno_vule_na_matky]); |
|
|
123 |
|
|
|
124 |
} |
|
|
125 |
} |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
|
|
|
129 |
|
|
|
130 |
//uchyt(); |
|
|
131 |
|
|
|
132 |
module dno_uchyt(){ |
|
|
133 |
difference () { |
|
|
134 |
minkowski() |
|
|
135 |
{ |
|
|
136 |
cube([Uchyt_x-2*Uchyt_radius,Uchyt_y-2*Uchyt_radius,tloustka_plbase+dno_sila_materialu+dno_vule_na_matky]); // base plastics brick |
|
|
137 |
cylinder(r=Uchyt_radius,h=0.1); |
|
|
138 |
} |
|
|
139 |
|
|
|
140 |
|
|
|
141 |
|
|
|
142 |
////otvor na sroub |
|
|
143 |
translate([(Uchyt_x)/2-Uchyt_radius,(Uchyt_y)/2-Uchyt_radius,(Uchyt_vyska_mat+M3_vyska_hlavy)/2]) |
|
|
144 |
cylinder(h=Uchyt_vyska_mat+M3_vyska_hlavy+0.6, r=M3_prumer/2, center=true); |
|
|
145 |
|
|
|
146 |
translate([(Uchyt_x)/2-Uchyt_radius,(Uchyt_y)/2-Uchyt_radius,-0.01]) |
|
|
147 |
cylinder (h = M3_vyska_matky+0.01, r= (M3_sirka_matky+0.2)/2, $fn=6); |
|
|
148 |
} |
|
|
149 |
} |
|
|
150 |
|
|
|
151 |
|
4725 |
jacho |
152 |
|