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