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 (); |
- |
|
6 |
|
- |
|
7 |
|
5 |
//Funkce pro generovani sloupku |
8 |
//Funkce pro generovani sloupku |
6 |
module sloupek( |
9 |
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, |
- |
|
17 |
matice_sila_materialu,logo_vyska,logo_sirka) { |
- |
|
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); |
- |
|
69 |
|
- |
|
70 |
|
10 |
|
- |
|
11 |
difference () { |
- |
|
12 |
translate([-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,0]) |
71 |
|
13 |
minkowski() |
72 |
|
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); |
73 |
} |
17 |
} |
74 |
|
18 |
|
75 |
//diry na sroub |
- |
|
76 |
translate([0,0,0]) // center top screw |
19 |
translate([0,0,vyska_matice+2*tloustka_bocnice+0.1-tloustka_bocnice/2+0.2]) |
77 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
20 |
cylinder((tloustka_bocnice), d=(prumer_sroubu), center=true); |
78 |
|
21 |
|
79 |
translate([vzdalenost_der,0,0]) // center top screw |
- |
|
80 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
22 |
cylinder((vyska_matice+2*tloustka_bocnice), d=(prumer_sroubu), center=true); |
- |
|
23 |
|
81 |
|
24 |
|
- |
|
25 |
//otvor na matici |
82 |
translate([0,vzdalenost_der,0]) // center top screw |
26 |
translate([0,tloustka_bocnice/2-posuv_dorazu/2,(vyska_matice+2*tloustka_bocnice)/2]) |
- |
|
27 |
|
83 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
28 |
cube([prumer_matice, prumer_matice+posuv_dorazu+tloustka_bocnice,vyska_matice], center = true); |
- |
|
29 |
|
- |
|
30 |
} |
84 |
|
31 |
|
85 |
//diry na matice |
32 |
difference () { |
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 |
33 |
translate([-(prumer_matice+2*tloustka_bocnice)/2,-(prumer_matice+2*tloustka_bocnice)/2,-vyska_podpery]) |
88 |
|
34 |
rotate([0, 0, 45]) |
- |
|
35 |
|
89 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
36 |
cylinder(vyska_podpery,0,sqrt(2*((prumer_matice+2*tloustka_bocnice)*(prumer_matice+2*tloustka_bocnice))),$fn=4); |
- |
|
37 |
|
- |
|
38 |
|
- |
|
39 |
|
- |
|
40 |
|
- |
|
41 |
difference () { |
90 |
|
42 |
|
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 |
|
43 |
|
95 |
|
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]) |
- |
|
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]); |
96 |
//2. krajni matice |
47 |
|
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 |
48 |
translate([-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-(prumer_matice+2*tloustka_bocnice-2*radidus_hrany)/2,-vyska_podpery+0.05]) |
98 |
|
49 |
|
- |
|
50 |
minkowski() |
- |
|
51 |
{ |
99 |
cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true); |
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 |
- |
|
53 |
cylinder(r=radidus_hrany,h=0.1); |
- |
|
54 |
} |
- |
|
55 |
} |
- |
|
56 |
|
- |
|
57 |
|
- |
|
58 |
|
- |
|
59 |
|
- |
|
60 |
} |
- |
|
61 |
|
- |
|
62 |
|
- |
|
63 |
|
- |
|
64 |
|
- |
|
65 |
} |
- |
|
66 |
|
- |
|
67 |
|
100 |
|
68 |
|
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 |
|
69 |
|
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 |
|
70 |
|
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 |
|
71 |
|
114 |
//---------------------------------------------------- |
- |
|
115 |
//LOGO MLAB |
- |
|
116 |
union (){ |
- |
|
117 |
translate ([5, -vzdalenost_od_okraje+1,0]) // ODROIDs passive components hole. |
- |
|
118 |
rotate([0, 90, 270]) |
- |
|
119 |
scale(v = [logo_sirka, logo_vyska, 0.3]) |
- |
|
120 |
MLAB_logo_short(); |
- |
|
121 |
} |
- |
|
122 |
|
- |
|
123 |
} |
- |
|
124 |
} |
- |
|
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,logo_vyska,logo_sirka); |
- |
|