4320 |
jacho |
1 |
use <text/Write.scad> |
4241 |
jacho |
2 |
/* |
|
|
3 |
pocet_der1=5; |
|
|
4 |
pocet_der2=3; |
|
|
5 |
radidus_hrany=5; |
|
|
6 |
vzdalenost_der=10.16; |
|
|
7 |
vzdalenost_od_okraje=8.8; |
|
|
8 |
prumer_sroubu=3.3; |
|
|
9 |
|
|
|
10 |
tloustka_plbase=2; |
|
|
11 |
prekryti_der=0.3; |
|
|
12 |
|
|
|
13 |
vyska_nozicky=5; |
|
|
14 |
|
|
|
15 |
vyska_hlavy = 3.5; |
|
|
16 |
prumer_hlavy=6; |
|
|
17 |
*/ |
|
|
18 |
|
|
|
19 |
//PLBASE ZAKLADNI |
|
|
20 |
//------------------------------------------------------------ |
|
|
21 |
module plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der){ |
|
|
22 |
|
|
|
23 |
difference () { |
|
|
24 |
//union () { |
|
|
25 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
26 |
minkowski() |
|
|
27 |
{ |
|
|
28 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,tloustka_plbase]); // base plastics brick |
|
|
29 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
30 |
} |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
for (i = [0:1:pocet_der1-1]) { |
|
|
34 |
for (a = [0:1:pocet_der2-1]) { |
|
|
35 |
|
|
|
36 |
translate([vzdalenost_od_okraje+vzdalenost_der*i,vzdalenost_od_okraje+vzdalenost_der*a, (tloustka_plbase-prekryti_der)/2]) // center top screw |
|
|
37 |
cylinder(((tloustka_plbase-prekryti_der)), d=prumer_sroubu, center=true); |
|
|
38 |
} |
|
|
39 |
} |
|
|
40 |
|
|
|
41 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
|
|
42 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
43 |
|
|
|
44 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
|
|
45 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
46 |
|
|
|
47 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
|
|
48 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
49 |
|
|
|
50 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
|
|
51 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
52 |
|
|
|
53 |
} |
|
|
54 |
} |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
|
|
|
58 |
//MODEL NOZICKY PRO PLBASE |
|
|
59 |
//----------------------------------------------------------- |
|
|
60 |
//průmer nozicky je roven vzdalenost_der |
|
|
61 |
module nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy) |
|
|
62 |
{ |
|
|
63 |
difference () { |
|
|
64 |
translate([0,0,-vyska_nozicky/2]) |
|
|
65 |
cylinder((vyska_nozicky), d=vzdalenost_der, center=true); |
|
|
66 |
translate([0,0,-(vyska_nozicky-vyska_hlavy/2)]) |
|
|
67 |
cylinder((vyska_hlavy), d=prumer_hlavy, center=true); |
|
|
68 |
translate([0,0,-vyska_nozicky/2]) |
|
|
69 |
cylinder((vyska_nozicky), d=prumer_sroubu, center=true); |
|
|
70 |
} |
|
|
71 |
} |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
//PLBASE S NOZICKAMA |
|
|
76 |
//----------------------------------------------------------- |
|
|
77 |
module plbase_s_nozickama(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,vyska_nozicky,vyska_hlavy,prumer_hlavy){ |
|
|
78 |
|
|
|
79 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
|
|
80 |
|
|
|
81 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, (tloustka_plbase)]) // center top screw |
|
|
82 |
rotate(a=[180,0,0]) |
|
|
83 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
84 |
|
|
|
85 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, tloustka_plbase]) // center top screw |
|
|
86 |
rotate(a=[180,0,0]) |
|
|
87 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
88 |
|
|
|
89 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
90 |
rotate(a=[180,0,0]) |
|
|
91 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
92 |
|
|
|
93 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
94 |
rotate(a=[180,0,0]) |
|
|
95 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
} |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
//PLBASE SE ZAPUSTENIM SROUBU |
|
|
103 |
//------------------------------------------------------ |
|
|
104 |
module plbase_zapustene_srouby(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_hlavy,prekryti_der,prumer_hlavy){ |
|
|
105 |
difference () { |
|
|
106 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,(vyska_hlavy+1.5),prekryti_der); |
|
|
107 |
|
|
|
108 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
109 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
110 |
|
|
|
111 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
112 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
113 |
|
|
|
114 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
115 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
116 |
|
|
|
117 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, 1.5+(vyska_hlavy/2)]) // center top screw |
|
|
118 |
cylinder(((vyska_hlavy+0.5)), d=prumer_hlavy, center=true); |
|
|
119 |
|
|
|
120 |
} |
|
|
121 |
} |
4301 |
jacho |
122 |
|
|
|
123 |
|
|
|
124 |
//PLBASE S NOZICKAMA polovicni pro tisk |
|
|
125 |
//----------------------------------------------------------- |
|
|
126 |
module plbase_s_nozickama_polovicni(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,vyska_nozicky,vyska_hlavy,prumer_hlavy){ |
|
|
127 |
|
|
|
128 |
difference() |
|
|
129 |
{ |
|
|
130 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
translate([-1,-1, -1]) |
|
|
134 |
|
|
|
135 |
cube([(pocet_der1+1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,1+((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2,tloustka_plbase+15]); |
|
|
136 |
} |
|
|
137 |
|
|
|
138 |
|
|
|
139 |
|
|
|
140 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
141 |
rotate(a=[180,0,0]) |
|
|
142 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
143 |
|
|
|
144 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase)]) // center top screw |
|
|
145 |
rotate(a=[180,0,0]) |
|
|
146 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
|
|
147 |
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
|
|
|
151 |
} |
|
|
152 |
|
|
|
153 |
//PLBASE polovicni pro tisk |
|
|
154 |
//----------------------------------------------------------- |
|
|
155 |
module plbase_polovicni(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,vyska_nozicky,vyska_hlavy,prumer_hlavy){ |
|
|
156 |
|
|
|
157 |
difference() |
|
|
158 |
{ |
|
|
159 |
plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der); |
|
|
160 |
|
|
|
161 |
|
|
|
162 |
translate([-1,-1, -1]) |
|
|
163 |
|
|
|
164 |
cube([(pocet_der1+1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,1+((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2,tloustka_plbase+15]); |
|
|
165 |
} |
|
|
166 |
|
|
|
167 |
|
|
|
168 |
} |
4320 |
jacho |
169 |
//PLBASE ZAKLADNI - bez der s napisem produktu |
|
|
170 |
//------------------------------------------------------------ |
|
|
171 |
module plbase_bez_der_napis(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,box_jmeno){ |
4301 |
jacho |
172 |
|
|
|
173 |
|
4320 |
jacho |
174 |
|
|
|
175 |
difference () { |
|
|
176 |
//union () { |
|
|
177 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
178 |
minkowski() |
|
|
179 |
{ |
|
|
180 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany,tloustka_plbase]); // base plastics brick |
|
|
181 |
cylinder(r=radidus_hrany,h=0.1); |
|
|
182 |
} |
|
|
183 |
translate([radidus_hrany,radidus_hrany,0]) |
|
|
184 |
translate([ ((pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2, ((pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2, tloustka_plbase/2+1]) |
|
|
185 |
rotate([0,0,0]) |
|
|
186 |
write(box_jmeno,h=10,t=tloustka_plbase-1, space= 1.1, font = "Letters.dxf",center=true); |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
|
|
190 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
191 |
|
|
|
192 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje, (tloustka_plbase/2)]) // center top screw |
|
|
193 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
194 |
|
|
|
195 |
translate([vzdalenost_od_okraje+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
|
|
196 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
197 |
|
|
|
198 |
translate([vzdalenost_od_okraje,vzdalenost_od_okraje+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
|
|
199 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
|
|
200 |
|
|
|
201 |
} |
|
|
202 |
} |
|
|
203 |
|
4241 |
jacho |
204 |
/* |
|
|
205 |
plbase_zapustene_srouby(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_hlavy,prekryti_der,prumer_hlavy); |
|
|
206 |
|
|
|
207 |
nozicka (vzdalenost_der,vyska_nozicky,prumer_sroubu,vyska_hlavy,prumer_hlavy); |
4301 |
jacho |
208 |
|
4241 |
jacho |
209 |
|