Line 18... |
Line 18... |
18 |
prumer_hlavy=6; |
18 |
prumer_hlavy=6; |
19 |
*/ |
19 |
*/ |
20 |
|
20 |
|
21 |
//PLBASE ZAKLADNI |
21 |
//PLBASE ZAKLADNI |
22 |
//------------------------------------------------------------ |
22 |
//------------------------------------------------------------ |
23 |
module plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,tloustka_bocnice){ |
23 |
module plbase(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje1,vzdalenost_od_okraje2,prumer_sroubu,tloustka_plbase,prekryti_der,tloustka_bocnice){ |
24 |
|
24 |
|
25 |
difference () { |
25 |
difference () { |
26 |
//union () { |
26 |
//union () { |
27 |
translate([radidus_hrany,radidus_hrany,0]) |
27 |
translate([radidus_hrany,radidus_hrany,0]) |
28 |
minkowski() |
28 |
minkowski() |
29 |
{ |
29 |
{ |
30 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,tloustka_plbase]); // base plastics brick |
30 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+2*tloustka_bocnice,tloustka_plbase]); // base plastics brick |
31 |
cylinder(r=radidus_hrany,h=0.1); |
31 |
cylinder(r=radidus_hrany,h=0.1); |
32 |
} |
32 |
} |
33 |
|
33 |
|
34 |
|
34 |
|
35 |
for (i = [0:1:pocet_der1-1]) { |
35 |
for (i = [0:1:pocet_der1-1]) { |
36 |
for (a = [0:1:pocet_der2-1]) { |
36 |
for (a = [0:1:pocet_der2-1]) { |
37 |
|
37 |
|
38 |
translate([vzdalenost_od_okraje+vzdalenost_der*i+tloustka_bocnice,vzdalenost_od_okraje+vzdalenost_der*a+tloustka_bocnice, (tloustka_plbase-prekryti_der)/2]) // center top screw |
38 |
translate([vzdalenost_od_okraje1+vzdalenost_der*i+tloustka_bocnice,vzdalenost_od_okraje2+vzdalenost_der*a+tloustka_bocnice, (tloustka_plbase-prekryti_der)/2]) // center top screw |
39 |
cylinder(((tloustka_plbase-prekryti_der)), d=prumer_sroubu, center=true); |
39 |
cylinder(((tloustka_plbase-prekryti_der)), d=prumer_sroubu, center=true); |
40 |
} |
40 |
} |
41 |
} |
41 |
} |
42 |
|
42 |
|
43 |
|
43 |
|
Line 159... |
Line 159... |
159 |
} |
159 |
} |
160 |
|
160 |
|
161 |
|
161 |
|
162 |
//PLBASE ZAKLADNI - bez der s napisem produktu |
162 |
//PLBASE ZAKLADNI - bez der s napisem produktu |
163 |
//------------------------------------------------------------ |
163 |
//------------------------------------------------------------ |
164 |
module plbase_bez_der_napis(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,tloustka_plbase,prekryti_der,box_jmeno,tloustka_bocnice){ |
164 |
module plbase_bez_der_napis(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje1,vzdalenost_od_okraje2,prumer_sroubu,tloustka_plbase,prekryti_der,box_jmeno,tloustka_bocnice){ |
165 |
|
165 |
|
166 |
|
166 |
|
167 |
|
167 |
|
168 |
difference () { |
168 |
difference () { |
169 |
//union () { |
169 |
//union () { |
170 |
translate([radidus_hrany,radidus_hrany,0]) |
170 |
translate([radidus_hrany,radidus_hrany,0]) |
171 |
minkowski() |
171 |
minkowski() |
172 |
{ |
172 |
{ |
173 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice,tloustka_plbase]); // base plastics brick |
173 |
cube([(pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+2*tloustka_bocnice,(pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+2*tloustka_bocnice,tloustka_plbase]); // base plastics brick |
174 |
cylinder(r=radidus_hrany,h=0.1); |
174 |
cylinder(r=radidus_hrany,h=0.1); |
175 |
} |
175 |
} |
176 |
translate([radidus_hrany,radidus_hrany,0]) |
176 |
translate([radidus_hrany,radidus_hrany,0]) |
177 |
translate([ ((pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2+tloustka_bocnice, ((pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany)/2+tloustka_bocnice, tloustka_plbase/2+1]) |
177 |
translate([ ((pocet_der1-1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany)/2+tloustka_bocnice, ((pocet_der2-1)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany)/2+tloustka_bocnice, tloustka_plbase/2+1]) |
178 |
rotate([0,0,0]) |
178 |
rotate([0,0,0]) |
179 |
write(box_jmeno,h=10,t=tloustka_plbase-1, space= 1.1, font = "Letters.dxf",center=true); |
179 |
write(box_jmeno,h=10,t=tloustka_plbase-1, space= 1.1, font = "Letters.dxf",center=true); |
180 |
|
180 |
|
181 |
|
181 |
|
182 |
translate([vzdalenost_od_okraje+tloustka_bocnice,vzdalenost_od_okraje+tloustka_bocnice, (tloustka_plbase/2)]) // center top screw |
182 |
translate([vzdalenost_od_okraje1+tloustka_bocnice,vzdalenost_od_okraje2+tloustka_bocnice, (tloustka_plbase/2)]) // center top screw |
183 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
183 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
184 |
|
184 |
|
185 |
translate([vzdalenost_od_okraje+tloustka_bocnice+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+tloustka_bocnice, (tloustka_plbase/2)]) // center top screw |
185 |
translate([vzdalenost_od_okraje1+tloustka_bocnice+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje2+tloustka_bocnice, (tloustka_plbase/2)]) // center top screw |
186 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
186 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
187 |
|
187 |
|
188 |
translate([vzdalenost_od_okraje+tloustka_bocnice+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje+tloustka_bocnice+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
188 |
translate([vzdalenost_od_okraje1+tloustka_bocnice+(pocet_der1-1)*vzdalenost_der,vzdalenost_od_okraje2+tloustka_bocnice+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
189 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
189 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
190 |
|
190 |
|
191 |
translate([vzdalenost_od_okraje+tloustka_bocnice,vzdalenost_od_okraje+tloustka_bocnice+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
191 |
translate([vzdalenost_od_okraje1+tloustka_bocnice,vzdalenost_od_okraje2+tloustka_bocnice+(pocet_der2-1)*vzdalenost_der, (tloustka_plbase/2)]) // center top screw |
192 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
192 |
cylinder(((tloustka_plbase+0.3)), d=prumer_sroubu, center=true); |
193 |
|
193 |
|
194 |
|
194 |
|
195 |
|
195 |
|
196 |
|
196 |
|
Line 350... |
Line 350... |
350 |
|
350 |
|
351 |
|
351 |
|
352 |
} |
352 |
} |
353 |
} |
353 |
} |
354 |
|
354 |
|
355 |
plbase_vrchni_kryt_pro_odecet(pocet_der1-1,pocet_der2-1,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice,-0.2,tloustka_plbase); |
355 |
plbase_vrchni_kryt_pro_odecet(pocet_der1-1,pocet_der2-1,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje1,vzdalenost_od_okraje2,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice,-0.2,tloustka_plbase); |
356 |
|
356 |
|
357 |
//PLbase vrchní - pro odecet |
357 |
//PLbase vrchní - pro odecet |
358 |
//------------------------------------------------------------ |
358 |
//------------------------------------------------------------ |
359 |
|
359 |
|
360 |
|
360 |
|
361 |
module plbase_vrchni_kryt_pro_odecet(pocet_der1,pocet_der2,radidus_hrany,vzdalenost_der,vzdalenost_od_okraje,prumer_sroubu,vyska_bocnice,prekryti_der,tloustka_bocnice,plbase_tolerance_horni,tloustka_plbase){ |
361 |
module 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,plbase_tolerance_horni,tloustka_plbase){ |
362 |
|
362 |
|
363 |
|
363 |
|
364 |
|
364 |
|
365 |
|
365 |
|
366 |
|
366 |
|
Line 369... |
Line 369... |
369 |
{ |
369 |
{ |
370 |
difference() |
370 |
difference() |
371 |
{ |
371 |
{ |
372 |
//pro vyboceni sloupku |
372 |
//pro vyboceni sloupku |
373 |
|
373 |
|
374 |
translate([-((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje)/2,-vzdalenost_od_okraje,tloustka_plbase/2]) |
374 |
translate([-((pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2)/2,-vzdalenost_od_okraje1,tloustka_plbase/2]) |
375 |
rotate(a=[180,0,90]) |
375 |
rotate(a=[180,0,90]) |
376 |
translate([radidus_hrany,radidus_hrany,0]) |
376 |
translate([radidus_hrany,radidus_hrany,0]) |
377 |
translate([-2*tloustka_bocnice,-2*tloustka_bocnice,0]) |
377 |
translate([-2*tloustka_bocnice,-2*tloustka_bocnice,0]) |
378 |
|
378 |
|
379 |
translate([tloustka_bocnice+hrana_bocnice+plbase_tolerance_horni,tloustka_bocnice+hrana_bocnice+plbase_tolerance_horni,0]) |
379 |
translate([tloustka_bocnice+hrana_bocnice+plbase_tolerance_horni,tloustka_bocnice+hrana_bocnice+plbase_tolerance_horni,0]) |
380 |
minkowski() |
380 |
minkowski() |
381 |
{ |
381 |
{ |
382 |
|
382 |
|
383 |
|
383 |
|
384 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice-2*plbase_tolerance_horni-2*hrana_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice-2*plbase_tolerance_horni-2*hrana_bocnice,tloustka_plbase]); // base plastics brick |
384 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje1-2*radidus_hrany+2*tloustka_bocnice-2*plbase_tolerance_horni-2*hrana_bocnice,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje2-2*radidus_hrany+2*tloustka_bocnice-2*plbase_tolerance_horni-2*hrana_bocnice,tloustka_plbase]); // base plastics brick |
385 |
cylinder(r=radidus_hrany,h=0.1); |
385 |
cylinder(r=radidus_hrany,h=0.1); |
386 |
} |
386 |
} |
387 |
|
387 |
|
388 |
|
388 |
|
389 |
|
389 |
|
Line 394... |
Line 394... |
394 |
//SLOUPKY |
394 |
//SLOUPKY |
395 |
//------------------------------------------------------------ |
395 |
//------------------------------------------------------------ |
396 |
//sloupek 1 |
396 |
//sloupek 1 |
397 |
|
397 |
|
398 |
|
398 |
|
399 |
translate([(-(pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje+prumer_matice/2,-vzdalenost_od_okraje+prumer_matice/2,-tloustka_plbase/2-0.2]) |
399 |
translate([(-(pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje2+prumer_matice/2,-vzdalenost_od_okraje1+prumer_matice/2,-tloustka_plbase/2-0.2]) |
400 |
|
400 |
|
401 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
401 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
402 |
|
402 |
|
403 |
//sloupek 2 |
403 |
//sloupek 2 |
404 |
|
404 |
|
405 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje-prumer_matice/2,-vzdalenost_od_okraje+prumer_matice/2,-tloustka_plbase/2-0.2]) |
405 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje2-prumer_matice/2,-vzdalenost_od_okraje1+prumer_matice/2,-tloustka_plbase/2-0.2]) |
406 |
rotate(a=[0,0,90]) |
406 |
rotate(a=[0,0,90]) |
407 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
407 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
408 |
|
408 |
|
409 |
//sloupek 3 |
409 |
//sloupek 3 |
410 |
|
410 |
|
411 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje-prumer_matice/2, (pocet_der1)*vzdalenost_der+vzdalenost_od_okraje-prumer_matice/2,-tloustka_plbase/2-0.2]) |
411 |
translate([((pocet_der2)*vzdalenost_der)/2+vzdalenost_od_okraje2-prumer_matice/2, (pocet_der1)*vzdalenost_der+vzdalenost_od_okraje1-prumer_matice/2,-tloustka_plbase/2-0.2]) |
412 |
rotate(a=[0,0,180]) |
412 |
rotate(a=[0,0,180]) |
413 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
413 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
414 |
|
414 |
|
415 |
//sloupek 4 |
415 |
//sloupek 4 |
416 |
|
416 |
|
417 |
translate([-((pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje+prumer_matice/2, (pocet_der1)*vzdalenost_der+vzdalenost_od_okraje-prumer_matice/2,-tloustka_plbase/2-0.2]) |
417 |
translate([-((pocet_der2)*vzdalenost_der)/2-vzdalenost_od_okraje2+prumer_matice/2, (pocet_der1)*vzdalenost_der+vzdalenost_od_okraje1-prumer_matice/2,-tloustka_plbase/2-0.2]) |
418 |
rotate(a=[0,0,270]) |
418 |
rotate(a=[0,0,270]) |
419 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
419 |
cylinder(r=prumer_sroubu/2,h=6*tloustka_plbase); |
420 |
|
420 |
|
421 |
//nápis |
421 |
//nápis |
422 |
|
422 |
|
423 |
translate([0,0,0]) |
423 |
translate([0,0,0]) |
424 |
translate([ 0, ((pocet_der1-1)*vzdalenost_der+vzdalenost_od_okraje+2*tloustka_bocnice)/2, tloustka_plbase/2-(tloustka_plbase-1)/2+0.01]) |
424 |
translate([ 0, ((pocet_der1-1)*vzdalenost_der+vzdalenost_od_okraje1+2*tloustka_bocnice)/2, tloustka_plbase/2-(tloustka_plbase-1)/2+0.01]) |
425 |
rotate([0,0,0]) |
425 |
rotate([0,0,0]) |
426 |
write(box_jmeno,h=10,t=tloustka_plbase-1, space= 1.1, font = "Letters.dxf",center=true); |
426 |
write(box_jmeno,h=10,t=tloustka_plbase-1, space= 1.1, font = "Letters.dxf",center=true); |
427 |
|
427 |
|
428 |
|
428 |
|
429 |
|
429 |
|