Line 1... |
Line 1... |
1 |
include <manufactury_conf.scad> |
1 |
include <manufactury_conf.scad> |
2 |
include <../configuration.scad> |
2 |
include <../configuration.scad> |
3 |
use <MLAB_logo.scad> |
3 |
use <MLAB_logo.scad> |
4 |
|
4 |
|
5 |
sloupek (vyska_bocnice,vzdalenost_der,vzdalenost_od_okraje,vzdalenost_od_diry,radidus_hrany,prumer_sroubu,prumer_matice,vyska_matice,posuv_dorazu,matice_sila_materialu, |
- |
|
6 |
logo_vyska,logo_sirka); |
5 |
sloupek (); |
7 |
|
6 |
|
8 |
|
7 |
|
9 |
//Funkce pro generovani sloupku |
8 |
//Funkce pro generovani sloupku |
10 |
module sloupek( |
9 |
module sloupek() { |
11 |
vyska, |
- |
|
12 |
vzdalenost_der, |
- |
|
13 |
vzdalenost_od_okraje, |
- |
|
14 |
vzdalenost_od_diry, |
- |
|
15 |
radidus_hrany, |
- |
|
16 |
prumer_sroubu, |
- |
|
17 |
prumer_matice, |
- |
|
18 |
vyska_matice, |
- |
|
19 |
posuv_dorazu, |
- |
|
20 |
matice_sila_materialu,logo_vyska,logo_sirka) { |
- |
|
21 |
difference () { |
- |
|
22 |
union(){ |
- |
|
23 |
difference () { |
- |
|
24 |
union () { |
- |
|
25 |
color("green") |
- |
|
26 |
translate([-(vzdalenost_od_okraje-radidus_hrany),-(vzdalenost_od_okraje-radidus_hrany),0]) // center top screw |
- |
|
27 |
cylinder(vyska, d=(2*radidus_hrany), center=true); |
- |
|
28 |
|
- |
|
29 |
color("cyan") |
- |
|
30 |
translate([vzdalenost_der/4, vzdalenost_der/4, -vyska/2]) |
- |
|
31 |
linear_extrude(height = vyska) |
- |
|
32 |
square([vzdalenost_der/2, vzdalenost_der/2], center = true); |
- |
|
33 |
|
- |
|
34 |
color("gray") |
- |
|
35 |
translate([-vzdalenost_od_okraje/2, vzdalenost_der/4, -vyska/2]) |
- |
|
36 |
linear_extrude(height = vyska) |
- |
|
37 |
square([(vzdalenost_od_okraje), vzdalenost_der/2], center = true); |
- |
|
38 |
|
- |
|
39 |
color("gray") |
- |
|
40 |
translate([vzdalenost_der/4, -vzdalenost_od_okraje/2, -vyska/2]) |
- |
|
41 |
linear_extrude(height = vyska) |
- |
|
42 |
square([vzdalenost_der/2, vzdalenost_od_okraje], center = true); |
- |
|
43 |
|
- |
|
44 |
color("red") |
- |
|
45 |
translate([-(vzdalenost_od_okraje-radidus_hrany)/2, -vzdalenost_od_okraje/2, -vyska/2]) |
- |
|
46 |
linear_extrude(height = vyska) |
- |
|
47 |
square([vzdalenost_od_okraje-radidus_hrany, vzdalenost_od_okraje], center = true); |
- |
|
48 |
|
- |
|
49 |
color("red") |
- |
|
50 |
translate([-vzdalenost_od_okraje/2,-(vzdalenost_od_okraje-radidus_hrany)/2, -vyska/2]) |
- |
|
51 |
linear_extrude(height = vyska) |
- |
|
52 |
square([vzdalenost_od_okraje, vzdalenost_od_okraje-radidus_hrany], center = true); |
- |
|
53 |
|
- |
|
54 |
|
- |
|
55 |
|
- |
|
56 |
translate([-(vzdalenost_od_okraje),-(vzdalenost_od_okraje),vyska/2-vyska_podpery-matice_sila_materialu-vyska_matice-vyska_mat_pod_matici]) |
- |
|
57 |
rotate([0, 0, 45]) |
- |
|
58 |
cylinder(vyska_podpery,0,sqrt(2*((vzdalenost_od_okraje+vzdalenost_der/2)*(vzdalenost_od_okraje+vzdalenost_der/2))),$fn=4); |
- |
|
59 |
|
- |
|
60 |
|
- |
|
61 |
} |
- |
|
62 |
|
- |
|
63 |
|
- |
|
64 |
|
10 |
|
- |
|
11 |
difference () { |
- |
|
12 |
translate([-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,0]) |
- |
|
13 |
minkowski() |
- |
|
14 |
{ |
- |
|
15 |
cube([prumer_matice+2*tloustka_bocnice-2*radidus_hrany,prumer_matice+2*tloustka_bocnice-2*radidus_hrany,vyska_matice+2*tloustka_bocnice]); // base plastics brick |
- |
|
16 |
cylinder(r=radidus_hrany,h=0.1); |
65 |
//na matku |
17 |
} |
- |
|
18 |
|
- |
|
19 |
translate([0,0,vyska_matice+2*tloustka_bocnice+0.1-tloustka_bocnice/2+0.2]) |
- |
|
20 |
cylinder((tloustka_bocnice), d=(prumer_sroubu), center=true); |
- |
|
21 |
|
- |
|
22 |
cylinder((vyska_matice+2*tloustka_bocnice), d=(prumer_sroubu), center=true); |
- |
|
23 |
|
- |
|
24 |
|
66 |
//prostredni dira |
25 |
//otvor na matici |
67 |
translate([0,(((((prumer_matice)/2)+posuv_dorazu+vzdalenost_od_diry)/2)-(posuv_dorazu+prumer_matice/2)),((vyska)/2-vyska_matice/2)-matice_sila_materialu]) // center top screw |
26 |
translate([0,tloustka_bocnice/2-posuv_dorazu/2,(vyska_matice+2*tloustka_bocnice)/2]) |
68 |
|
27 |
|
69 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
28 |
cube([prumer_matice, prumer_matice+posuv_dorazu+tloustka_bocnice,vyska_matice], center = true); |
70 |
|
29 |
|
71 |
//ubrání materiálu protoze neni potreba ceky sloupek |
- |
|
72 |
translate([0,0,-vyska/4+(vyska/2-vyska_matice-matice_sila_materialu-vyska_mat_pod_matici)/2-1]) |
- |
|
73 |
cube([prumer_matice+posuv_dorazu+vzdalenost_od_diry+vzdalenost_od_okraje+1, prumer_matice+posuv_dorazu+vzdalenost_od_diry+vzdalenost_od_okraje+1,vyska/2+(vyska/2-vyska_matice-matice_sila_materialu-vyska_mat_pod_matici+2)], center = true); |
- |
|
74 |
|
- |
|
75 |
|
- |
|
76 |
|
30 |
} |
77 |
|
- |
|
78 |
//---------------------------------------------------- |
- |
|
79 |
//LOGO MLAB |
- |
|
80 |
/* |
- |
|
81 |
union (){ |
- |
|
82 |
translate ([0, -vzdalenost_od_okraje+1,0]) // ODROIDs passive components hole. |
- |
|
83 |
rotate([0, 90, 270]) |
- |
|
84 |
scale(v = [logo_sirka, logo_vyska, 0.3]) |
- |
|
85 |
MLAB_logo_short(); |
- |
|
86 |
} |
- |
|
87 |
|
31 |
|
88 |
|
- |
|
89 |
*/ |
32 |
difference () { |
90 |
} |
- |
|
91 |
|
- |
|
92 |
//podbera pro sloupek aby sel tisknout |
- |
|
93 |
translate([-(vzdalenost_od_okraje),-(vzdalenost_od_okraje),vyska/2-vyska_podpery-matice_sila_materialu-vyska_matice-vyska_mat_pod_matici]) |
33 |
translate([-(prumer_matice+2*tloustka_bocnice)/2,-(prumer_matice+2*tloustka_bocnice)/2,-vyska_podpery]) |
94 |
rotate([0, 0, 45]) |
34 |
rotate([0, 0, 45]) |
- |
|
35 |
|
95 |
cylinder(vyska_podpery,0,sqrt(2*((vzdalenost_od_okraje+vzdalenost_der/2)*(vzdalenost_od_okraje+vzdalenost_der/2))),$fn=4); |
36 |
cylinder(vyska_podpery,0,sqrt(2*((prumer_matice+2*tloustka_bocnice)*(prumer_matice+2*tloustka_bocnice))),$fn=4); |
- |
|
37 |
|
- |
|
38 |
|
96 |
} |
39 |
|
- |
|
40 |
|
- |
|
41 |
difference () { |
97 |
|
42 |
|
98 |
|
43 |
|
99 |
|
44 |
|
100 |
//pro odstaranění nepotřebného z podpery |
- |
|
101 |
|
- |
|
102 |
translate([-(vzdalenost_od_okraje),-(vzdalenost_od_okraje),0]) |
45 |
translate([-((sqrt(2*((prumer_matice+2*tloustka_bocnice)*(prumer_matice+2*tloustka_bocnice))*2))),-((sqrt(2*((prumer_matice+2*tloustka_bocnice)*(prumer_matice+2*tloustka_bocnice))*2))),-vyska_podpery]) |
103 |
translate([radidus_hrany,radidus_hrany,0]) |
- |
|
104 |
translate([-tloustka_bocnice,-tloustka_bocnice,0]) |
- |
|
105 |
difference () { |
- |
|
106 |
|
- |
|
107 |
translate([-2*vzdalenost_od_okraje,-2*vzdalenost_od_okraje,-vyska_bocnice/2]) |
46 |
cube([2*(sqrt(2*((prumer_matice+2*tloustka_bocnice)*(prumer_matice+2*tloustka_bocnice))*2)),2*(sqrt(2*((prumer_matice+2*tloustka_bocnice)*(prumer_matice+2*tloustka_bocnice))*2)),vyska_podpery+0.1]); |
108 |
minkowski() |
- |
|
109 |
{ |
47 |
|
110 |
cube([(pocet_der1)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice+4*vzdalenost_od_okraje,(pocet_der2)*vzdalenost_der+2*vzdalenost_od_okraje-2*radidus_hrany+2*tloustka_bocnice+4*vzdalenost_od_okraje,vyska_bocnice]); // base plastics brick |
48 |
translate([-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-vyska_podpery+0.05]) |
111 |
cylinder(r=radidus_hrany,h=0.1); |
- |
|
112 |
} |
49 |
|
113 |
translate([tloustka_bocnice,tloustka_bocnice,-vyska_bocnice/2-0.025]) |
- |
|
114 |
minkowski() |
50 |
minkowski() |
115 |
{ |
51 |
{ |
116 |
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+0.05]); // base plastics brick |
52 |
cube([prumer_matice+2*tloustka_bocnice-2*radidus_hrany,prumer_matice+2*tloustka_bocnice-2*radidus_hrany,vyska_podpery+0.01]); // base plastics brick |
117 |
cylinder(r=radidus_hrany,h=0.1); |
53 |
cylinder(r=radidus_hrany,h=0.1); |
118 |
} |
54 |
} |
119 |
} |
55 |
} |
- |
|
56 |
|
- |
|
57 |
|
- |
|
58 |
|
- |
|
59 |
|
- |
|
60 |
} |
- |
|
61 |
|
- |
|
62 |
|
- |
|
63 |
|
120 |
|
64 |
|
121 |
|
- |
|
122 |
//diry na sroub |
65 |
} |
123 |
translate([0,0,vyska/2]) // center top screw |
- |
|
124 |
cylinder(1+vyska/2, d=(prumer_sroubu), center=true); |
- |
|
125 |
|
66 |
|
126 |
|
67 |
|
127 |
} |
- |
|
128 |
} |
- |
|
129 |
|
68 |
|
130 |
|
69 |
|
131 |
|
70 |
|
132 |
|
71 |
|