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 |
|
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); |
61 |
} |
17 |
} |
62 |
|
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); |
63 |
|
21 |
|
- |
|
22 |
cylinder((vyska_matice+2*tloustka_bocnice), d=(prumer_sroubu), center=true); |
64 |
|
23 |
|
65 |
//na matku |
- |
|
66 |
//prostredni dira |
- |
|
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 |
- |
|
68 |
|
24 |
|
- |
|
25 |
//otvor na matici |
69 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
26 |
translate([0,tloustka_bocnice/2-posuv_dorazu/2,(vyska_matice+2*tloustka_bocnice)/2]) |
70 |
|
27 |
|
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]) |
28 |
cube([prumer_matice, prumer_matice+posuv_dorazu+tloustka_bocnice,vyska_matice], center = true); |
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 |
|
29 |
|
- |
|
30 |
} |
75 |
|
31 |
|
- |
|
32 |
difference () { |
- |
|
33 |
translate([-(prumer_matice+2*tloustka_bocnice)/2,-(prumer_matice+2*tloustka_bocnice)/2,-vyska_podpery]) |
- |
|
34 |
rotate([0, 0, 45]) |
76 |
|
35 |
|
- |
|
36 |
cylinder(vyska_podpery,0,sqrt(2*((prumer_matice+2*tloustka_bocnice)*(prumer_matice+2*tloustka_bocnice))),$fn=4); |
77 |
|
37 |
|
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 |
|
38 |
|
88 |
|
39 |
|
89 |
*/ |
- |
|
90 |
} |
- |
|
91 |
|
40 |
|
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]) |
- |
|
94 |
rotate([0, 0, 45]) |
41 |
difference () { |
95 |
cylinder(vyska_podpery,0,sqrt(2*((vzdalenost_od_okraje+vzdalenost_der/2)*(vzdalenost_od_okraje+vzdalenost_der/2))),$fn=4); |
- |
|
96 |
} |
- |
|
97 |
|
42 |
|
98 |
|
43 |
|
99 |
|
44 |
|
- |
|
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]) |
100 |
//pro odstaranění nepotřebného z podpery |
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]); |
101 |
|
47 |
|
102 |
translate([-(vzdalenost_od_okraje),-(vzdalenost_od_okraje),0]) |
- |
|
103 |
translate([radidus_hrany,radidus_hrany,0]) |
- |
|
104 |
translate([-tloustka_bocnice,-tloustka_bocnice,0]) |
48 |
translate([-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-vyska_podpery+0.05]) |
105 |
difference () { |
- |
|
106 |
|
49 |
|
107 |
translate([-2*vzdalenost_od_okraje,-2*vzdalenost_od_okraje,-vyska_bocnice/2]) |
- |
|
108 |
minkowski() |
50 |
minkowski() |
109 |
{ |
51 |
{ |
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 |
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 |
111 |
cylinder(r=radidus_hrany,h=0.1); |
- |
|
112 |
} |
- |
|
113 |
translate([tloustka_bocnice,tloustka_bocnice,-vyska_bocnice/2-0.025]) |
- |
|
114 |
minkowski() |
- |
|
115 |
{ |
- |
|
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 |
- |
|
117 |
cylinder(r=radidus_hrany,h=0.1); |
53 |
cylinder(r=radidus_hrany,h=0.1); |
118 |
} |
54 |
} |
119 |
} |
55 |
} |
120 |
|
56 |
|
121 |
|
57 |
|
122 |
//diry na sroub |
- |
|
123 |
translate([0,0,vyska/2]) // center top screw |
- |
|
124 |
cylinder(1+vyska/2, d=(prumer_sroubu), center=true); |
- |
|
125 |
|
58 |
|
126 |
|
59 |
|
127 |
} |
60 |
} |
- |
|
61 |
|
- |
|
62 |
|
- |
|
63 |
|
- |
|
64 |
|
128 |
} |
65 |
} |
129 |
|
66 |
|
130 |
|
67 |
|
131 |
|
68 |
|
132 |
|
69 |
|
- |
|
70 |
|
- |
|
71 |
|