4314 |
jacho |
1 |
include <manufactury_conf.scad> |
|
|
2 |
include <../configuration.scad> |
|
|
3 |
use <MLAB_logo.scad> |
|
|
4 |
|
4298 |
jacho |
5 |
//Funkce pro generovani sloupku |
|
|
6 |
module sloupek( |
|
|
7 |
vyska, |
|
|
8 |
zapust, |
|
|
9 |
vzdalenost_der, |
|
|
10 |
vzdalenost_od_okraje, |
|
|
11 |
vzdalenost_od_diry, |
|
|
12 |
radidus_hrany, |
|
|
13 |
prumer_sroubu, |
|
|
14 |
prumer_matice, |
|
|
15 |
vyska_matice, |
|
|
16 |
posuv_dorazu, |
4314 |
jacho |
17 |
matice_sila_materialu,logo_vyska,logo_sirka) { |
4298 |
jacho |
18 |
|
|
|
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 |
color("green") |
|
|
51 |
translate([vzdalenost_der, -vzdalenost_od_okraje/2, -(vyska-(2*zapust))/2]) |
|
|
52 |
linear_extrude(height = (vyska-(2*zapust))) |
|
|
53 |
square([vzdalenost_der, vzdalenost_od_okraje], center = true); |
|
|
54 |
|
|
|
55 |
color("red") |
|
|
56 |
translate([-vzdalenost_od_okraje/2,vzdalenost_der, -(vyska-(2*zapust))/2]) |
|
|
57 |
linear_extrude(height = (vyska-(2*zapust))) |
|
|
58 |
square([ vzdalenost_od_okraje,vzdalenost_der], center = true); |
|
|
59 |
|
|
|
60 |
color("cyan") |
|
|
61 |
translate([vzdalenost_od_diry/2, vzdalenost_der, -(vyska-(2*zapust))/2]) |
|
|
62 |
linear_extrude(height = (vyska-(2*zapust))) |
|
|
63 |
square([(vzdalenost_od_diry), vzdalenost_der], center = true); |
|
|
64 |
|
|
|
65 |
color("cyan") |
|
|
66 |
translate([vzdalenost_der, vzdalenost_od_diry/2, -(vyska-(2*zapust))/2]) |
|
|
67 |
linear_extrude(height = (vyska-(2*zapust))) |
|
|
68 |
square([vzdalenost_der, vzdalenost_od_diry ], center = true); |
4314 |
jacho |
69 |
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
|
4298 |
jacho |
73 |
} |
|
|
74 |
|
|
|
75 |
//diry na sroub |
|
|
76 |
translate([0,0,0]) // center top screw |
|
|
77 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
|
|
78 |
|
|
|
79 |
translate([vzdalenost_der,0,0]) // center top screw |
|
|
80 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
|
|
81 |
|
|
|
82 |
translate([0,vzdalenost_der,0]) // center top screw |
|
|
83 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
|
|
84 |
|
|
|
85 |
//diry na matice |
|
|
86 |
//1. krajni matice |
|
|
87 |
translate([vzdalenost_der,(((((prumer_matice)/2)+posuv_dorazu+vzdalenost_od_diry)/2)-(posuv_dorazu+prumer_matice/2)),((vyska-2*zapust)/2-vyska_matice/2)-matice_sila_materialu]) // center top screw |
|
|
88 |
|
|
|
89 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
|
|
90 |
|
|
|
91 |
translate([vzdalenost_der,(((((prumer_matice)/2)+posuv_dorazu+vzdalenost_od_diry)/2)-(posuv_dorazu+prumer_matice/2)),-(((vyska-2*zapust)/2-vyska_matice/2)-matice_sila_materialu)]) // center top screw |
|
|
92 |
|
|
|
93 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
|
|
94 |
|
|
|
95 |
|
|
|
96 |
//2. krajni matice |
|
|
97 |
translate([(((((prumer_matice)/2)+posuv_dorazu+vzdalenost_od_diry)/2)-(posuv_dorazu+prumer_matice/2)), vzdalenost_der,((vyska-2*zapust)/2-vyska_matice/2)-matice_sila_materialu]) // center top screw |
|
|
98 |
|
|
|
99 |
cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true); |
|
|
100 |
|
|
|
101 |
translate([(((((prumer_matice)/2)+posuv_dorazu+vzdalenost_od_diry)/2)-(posuv_dorazu+prumer_matice/2)), vzdalenost_der,-(((vyska-2*zapust)/2-vyska_matice/2)-matice_sila_materialu)]) // center top screw |
|
|
102 |
|
|
|
103 |
cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true); |
|
|
104 |
|
|
|
105 |
//prostredni dira |
|
|
106 |
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 |
|
|
107 |
|
|
|
108 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
|
|
109 |
|
|
|
110 |
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 |
|
|
111 |
|
|
|
112 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
|
|
113 |
|
4314 |
jacho |
114 |
//---------------------------------------------------- |
|
|
115 |
//LOGO MLAB |
|
|
116 |
union (){ |
|
|
117 |
translate ([-vzdalenost_od_okraje+1,5, 0]) // ODROIDs passive components hole. |
|
|
118 |
rotate([0, 90, 180]) |
|
|
119 |
scale(v = [logo_sirka, logo_vyska, 0.3]) |
|
|
120 |
MLAB_logo_short(); |
|
|
121 |
} |
|
|
122 |
|
|
|
123 |
} |
4298 |
jacho |
124 |
} |
4314 |
jacho |
125 |
|
|
|
126 |
/*sloupek( |
|
|
127 |
vyska, |
|
|
128 |
zapust, |
|
|
129 |
vzdalenost_der, |
|
|
130 |
vzdalenost_od_okraje, |
|
|
131 |
vzdalenost_od_diry, |
|
|
132 |
radidus_hrany, |
|
|
133 |
prumer_sroubu, |
|
|
134 |
prumer_matice, |
|
|
135 |
vyska_matice, |
|
|
136 |
posuv_dorazu, |
|
|
137 |
matice_sila_materialu); |