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 |
bocnice(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 bocnice(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 |
minkowski() |
|
|
28 |
{ |
|
|
29 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+2*tloustka_bocnice,vyska_bocnice+tloustka_plbase]); // base plastics brick |
|
|
30 |
cylinder(r=radidus_hrany,h=0.01); |
|
|
31 |
} |
|
|
32 |
|
|
|
33 |
translate([tloustka_bocnice-radidus_hrany,tloustka_bocnice-radidus_hrany,-0.1]) |
|
|
34 |
|
|
|
35 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje1,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2,vyska_bocnice+tloustka_plbase+0.2]); |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
|
39 |
} |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
//SLOUPKY |
|
|
44 |
//------------------------------------------------------------ |
|
|
45 |
//sloupek 1 |
|
|
46 |
|
|
|
47 |
translate([(-(pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje2+prumer_matice/2,-vzdalenost_od_okraje1+prumer_matice/2,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
|
|
48 |
sloupek (); |
|
|
49 |
|
|
|
50 |
//sloupek 2 |
|
|
51 |
|
|
|
52 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje2-prumer_matice/2,-vzdalenost_od_okraje1+prumer_matice/2,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
|
|
53 |
rotate(a=[0,0,90]) |
|
|
54 |
sloupek (); |
|
|
55 |
|
|
|
56 |
//sloupek 3 |
|
|
57 |
|
|
|
58 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje2-prumer_matice/2, (pocet_der1)*vzdalenost_der+vzdalenost_od_okraje1-prumer_matice/2,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
|
|
59 |
rotate(a=[0,0,180]) |
|
|
60 |
sloupek (); |
|
|
61 |
|
|
|
62 |
//sloupek 4 |
|
|
63 |
|
|
|
64 |
translate([-((pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje2+prumer_matice/2, (pocet_der1)*vzdalenost_der+vzdalenost_od_okraje1-prumer_matice/2,vyska_bocnice/2-(vyska_matice+2*tloustka_bocnice+0.1)-tloustka_plbase]) |
|
|
65 |
rotate(a=[0,0,270]) |
|
|
66 |
sloupek (); |
|
|
67 |
|
|
|
68 |
//uchyt 1 |
|
|
69 |
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]) |
|
|
70 |
uchyt(); |
|
|
71 |
|
|
|
72 |
//uchyt 2 |
|
|
73 |
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]) |
|
|
74 |
uchyt(); |
|
|
75 |
|
|
|
76 |
//uchyt 3 |
|
|
77 |
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]) |
|
|
78 |
uchyt(); |
|
|
79 |
|
|
|
80 |
//uchyt 4 |
|
|
81 |
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]) |
|
|
82 |
uchyt(); |
|
|
83 |
|
|
|
84 |
} |
|
|
85 |
|
|
|
86 |
//---------------------------------------------------- |
|
|
87 |
//LOGO MLAB |
|
|
88 |
/* |
|
|
89 |
translate([(5-(pocet_der2)*vzdalenost_der)/2,0,0]) |
|
|
90 |
translate ([0, -vzdalenost_od_okraje-tloustka_bocnice*1/2,0]) // |
|
|
91 |
rotate([0, 90, 270]) |
|
|
92 |
scale(v = [logo_sirka, logo_vyska, 0.3]) |
|
|
93 |
MLAB_logo_short(); |
|
|
94 |
*/ |
|
|
95 |
|
|
|
96 |
|
|
|
97 |
|
|
|
98 |
//plbase odecet na kryt |
|
|
99 |
translate([0,0,vyska_bocnice/2-tloustka_plbase/2+0.05]) |
|
|
100 |
rotate(a=[0,0,0]) |
|
|
101 |
{ |
|
|
102 |
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); |
|
|
103 |
} |
|
|
104 |
|
|
|
105 |
|
|
|
106 |
} |
|
|
107 |
} |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
|
|
|
112 |
//uchyt(); |
|
|
113 |
|
|
|
114 |
module uchyt(){ |
|
|
115 |
difference () { |
|
|
116 |
minkowski() |
|
|
117 |
{ |
|
|
118 |
cube([Uchyt_x-2*Uchyt_radius,Uchyt_y-2*Uchyt_radius,Uchyt_vyska_mat+M3_vyska_hlavy]); // base plastics brick |
|
|
119 |
cylinder(r=Uchyt_radius,h=0.1); |
|
|
120 |
} |
|
|
121 |
|
|
|
122 |
//otvor na hlavu |
|
|
123 |
translate([(Uchyt_x)/2-Uchyt_radius,(Uchyt_y)/2-Uchyt_radius,Uchyt_vyska_mat+M3_vyska_hlavy/2]) |
|
|
124 |
cylinder(h=M3_vyska_hlavy+0.6, r=M3_prumer_hlavy/2, center=true); |
|
|
125 |
|
|
|
126 |
////otvor na sroub |
|
|
127 |
translate([(Uchyt_x)/2-Uchyt_radius,(Uchyt_y)/2-Uchyt_radius,(Uchyt_vyska_mat+M3_vyska_hlavy)/2]) |
|
|
128 |
cylinder(h=Uchyt_vyska_mat+M3_vyska_hlavy+0.6, r=M3_prumer/2, center=true); |
|
|
129 |
|
|
|
130 |
|
|
|
131 |
} |
|
|
132 |
} |
|
|
133 |
|
|
|
134 |
|
4726 |
jacho |
135 |
|