Line 1... |
Line 1... |
1 |
include <configuration.scad> |
1 |
//include <configuration.scad> |
2 |
/* |
2 |
/* |
3 |
//sloupek |
3 |
//sloupek |
4 |
vyska = 60; //celeho sloupku |
4 |
vyska = 60; //celeho sloupku |
5 |
zapust = 6.5; //vyska zapusteni listy |
5 |
zapust = 6.5; //vyska zapusteni listy |
6 |
vzdalenost_der = 10; //roztec upevňovacich der |
6 |
vzdalenost_der = 10; //roztec upevňovacich der |
7 |
vzdalenost_od_okraje = 10; //vzdalenost stredu upevnovaci diry od kraje desky |
7 |
vzdalenost_od_okraje = 10; //vzdalenost stredu upevnovaci diry od kraje desky |
8 |
vzdalenost_od_diry = 5; //vzdalenost od stredu upevnovaci diry na druhou stranu |
8 |
vzdalenost_od_diry = 5; //vzdalenost od stredu upevnovaci diry na druhou stranu |
9 |
radidus_hrany = 5; //radius zaobleni |
9 |
radidus_hrany = 5; //radius zaobleni |
10 |
|
10 |
|
11 |
//parametry šroubu |
11 |
//parametry šroubu |
12 |
prumer_sroubu=3.3; |
12 |
prumer_sroubu=3.3; |
13 |
|
13 |
|
14 |
|
14 |
|
15 |
//parametry matice |
15 |
//parametry matice |
16 |
prumer_matice=6; //hrany k hraně |
16 |
prumer_matice=6; //hrany k hraně |
17 |
vyska_matice=3; //vyska matice |
17 |
vyska_matice=3; //vyska matice |
18 |
posuv_dorazu=0; //pro moznost posuvu dorazu pro vsunutí matice |
18 |
posuv_dorazu=0; //pro moznost posuvu dorazu pro vsunutí matice |
19 |
matice_sila_materialu=2; //sila materialu pod/nad maticí na ose z |
19 |
matice_sila_materialu=2; //sila materialu pod/nad maticí na ose z |
20 |
*/ |
20 |
*/ |
21 |
|
21 |
|
22 |
|
22 |
|
23 |
|
23 |
|
24 |
module sloupek( |
24 |
module sloupek( |
25 |
vyska, |
25 |
vyska, |
26 |
zapust, |
26 |
zapust, |
27 |
vzdalenost_der, |
27 |
vzdalenost_der, |
28 |
vzdalenost_od_okrajem, |
28 |
vzdalenost_od_okraje, |
29 |
vzdalenost_od_diry, |
29 |
vzdalenost_od_diry, |
30 |
radidus_hrany, |
30 |
radidus_hrany, |
31 |
prumer_sroubu, |
31 |
prumer_sroubu, |
32 |
prumer_matice, |
32 |
prumer_matice, |
33 |
vyska_matice, |
33 |
vyska_matice, |
34 |
posuv_dorazu, |
34 |
posuv_dorazu, |
35 |
matice_sila_materialu) { |
35 |
matice_sila_materialu) { |
36 |
|
36 |
|
37 |
difference () { |
37 |
difference () { |
38 |
union () { |
38 |
union () { |
39 |
color("green") |
39 |
color("green") |
40 |
translate([-(vzdalenost_od_okraje-radidus_hrany),-(vzdalenost_od_okraje-radidus_hrany),0]) // center top screw |
40 |
translate([-(vzdalenost_od_okraje-radidus_hrany),-(vzdalenost_od_okraje-radidus_hrany),0]) // center top screw |
41 |
cylinder(vyska, d=(2*radidus_hrany), center=true); |
41 |
cylinder(vyska, d=(2*radidus_hrany), center=true); |
42 |
|
42 |
|
43 |
color("cyan") |
43 |
color("cyan") |
44 |
translate([vzdalenost_der/4, vzdalenost_der/4, -vyska/2]) |
44 |
translate([vzdalenost_der/4, vzdalenost_der/4, -vyska/2]) |
45 |
linear_extrude(height = vyska) |
45 |
linear_extrude(height = vyska) |
46 |
square([vzdalenost_der/2, vzdalenost_der/2], center = true); |
46 |
square([vzdalenost_der/2, vzdalenost_der/2], center = true); |
47 |
|
47 |
|
48 |
color("gray") |
48 |
color("gray") |
49 |
translate([-vzdalenost_od_okraje/2, vzdalenost_der/4, -vyska/2]) |
49 |
translate([-vzdalenost_od_okraje/2, vzdalenost_der/4, -vyska/2]) |
50 |
linear_extrude(height = vyska) |
50 |
linear_extrude(height = vyska) |
51 |
square([(vzdalenost_od_okraje), vzdalenost_der/2], center = true); |
51 |
square([(vzdalenost_od_okraje), vzdalenost_der/2], center = true); |
52 |
|
52 |
|
53 |
color("gray") |
53 |
color("gray") |
54 |
translate([vzdalenost_der/4, -vzdalenost_od_okraje/2, -vyska/2]) |
54 |
translate([vzdalenost_der/4, -vzdalenost_od_okraje/2, -vyska/2]) |
55 |
linear_extrude(height = vyska) |
55 |
linear_extrude(height = vyska) |
56 |
square([vzdalenost_der/2, vzdalenost_od_okraje], center = true); |
56 |
square([vzdalenost_der/2, vzdalenost_od_okraje], center = true); |
57 |
|
57 |
|
58 |
color("red") |
58 |
color("red") |
59 |
translate([-(vzdalenost_od_okraje-radidus_hrany)/2, -vzdalenost_od_okraje/2, -vyska/2]) |
59 |
translate([-(vzdalenost_od_okraje-radidus_hrany)/2, -vzdalenost_od_okraje/2, -vyska/2]) |
60 |
linear_extrude(height = vyska) |
60 |
linear_extrude(height = vyska) |
61 |
square([vzdalenost_od_okraje-radidus_hrany, vzdalenost_od_okraje], center = true); |
61 |
square([vzdalenost_od_okraje-radidus_hrany, vzdalenost_od_okraje], center = true); |
62 |
|
62 |
|
63 |
color("red") |
63 |
color("red") |
64 |
translate([-vzdalenost_od_okraje/2,-(vzdalenost_od_okraje-radidus_hrany)/2, -vyska/2]) |
64 |
translate([-vzdalenost_od_okraje/2,-(vzdalenost_od_okraje-radidus_hrany)/2, -vyska/2]) |
65 |
linear_extrude(height = vyska) |
65 |
linear_extrude(height = vyska) |
66 |
square([vzdalenost_od_okraje, vzdalenost_od_okraje-radidus_hrany], center = true); |
66 |
square([vzdalenost_od_okraje, vzdalenost_od_okraje-radidus_hrany], center = true); |
67 |
|
67 |
|
68 |
color("green") |
68 |
color("green") |
69 |
translate([vzdalenost_der, -vzdalenost_od_okraje/2, -(vyska-(2*zapust))/2]) |
69 |
translate([vzdalenost_der, -vzdalenost_od_okraje/2, -(vyska-(2*zapust))/2]) |
70 |
linear_extrude(height = (vyska-(2*zapust))) |
70 |
linear_extrude(height = (vyska-(2*zapust))) |
71 |
square([vzdalenost_der, vzdalenost_od_okraje], center = true); |
71 |
square([vzdalenost_der, vzdalenost_od_okraje], center = true); |
72 |
|
72 |
|
73 |
color("red") |
73 |
color("red") |
74 |
translate([-vzdalenost_od_okraje/2,vzdalenost_der, -(vyska-(2*zapust))/2]) |
74 |
translate([-vzdalenost_od_okraje/2,vzdalenost_der, -(vyska-(2*zapust))/2]) |
75 |
linear_extrude(height = (vyska-(2*zapust))) |
75 |
linear_extrude(height = (vyska-(2*zapust))) |
76 |
square([ vzdalenost_od_okraje,vzdalenost_der], center = true); |
76 |
square([ vzdalenost_od_okraje,vzdalenost_der], center = true); |
77 |
|
77 |
|
78 |
color("cyan") |
78 |
color("cyan") |
79 |
translate([vzdalenost_od_diry/2, vzdalenost_der, -(vyska-(2*zapust))/2]) |
79 |
translate([vzdalenost_od_diry/2, vzdalenost_der, -(vyska-(2*zapust))/2]) |
80 |
linear_extrude(height = (vyska-(2*zapust))) |
80 |
linear_extrude(height = (vyska-(2*zapust))) |
81 |
square([(vzdalenost_od_diry), vzdalenost_der], center = true); |
81 |
square([(vzdalenost_od_diry), vzdalenost_der], center = true); |
82 |
|
82 |
|
83 |
color("cyan") |
83 |
color("cyan") |
84 |
translate([vzdalenost_der, vzdalenost_od_diry/2, -(vyska-(2*zapust))/2]) |
84 |
translate([vzdalenost_der, vzdalenost_od_diry/2, -(vyska-(2*zapust))/2]) |
85 |
linear_extrude(height = (vyska-(2*zapust))) |
85 |
linear_extrude(height = (vyska-(2*zapust))) |
86 |
square([vzdalenost_der, vzdalenost_od_diry ], center = true); |
86 |
square([vzdalenost_der, vzdalenost_od_diry ], center = true); |
87 |
} |
87 |
} |
88 |
|
88 |
|
89 |
//diry na sroub |
89 |
//diry na sroub |
90 |
translate([0,0,0]) // center top screw |
90 |
translate([0,0,0]) // center top screw |
91 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
91 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
92 |
|
92 |
|
93 |
translate([vzdalenost_der,0,0]) // center top screw |
93 |
translate([vzdalenost_der,0,0]) // center top screw |
94 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
94 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
95 |
|
95 |
|
96 |
translate([0,vzdalenost_der,0]) // center top screw |
96 |
translate([0,vzdalenost_der,0]) // center top screw |
97 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
97 |
cylinder(2*vyska, d=(prumer_sroubu), center=true); |
98 |
|
98 |
|
99 |
//diry na matice |
99 |
//diry na matice |
100 |
//1. krajni matice |
100 |
//1. krajni matice |
101 |
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 |
101 |
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 |
102 |
|
102 |
|
103 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
103 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
104 |
|
104 |
|
105 |
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 |
105 |
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 |
106 |
|
106 |
|
107 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
107 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
108 |
|
108 |
|
109 |
|
109 |
|
110 |
//2. krajni matice |
110 |
//2. krajni matice |
111 |
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 |
111 |
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 |
112 |
|
112 |
|
113 |
cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true); |
113 |
cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true); |
114 |
|
114 |
|
115 |
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 |
115 |
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 |
116 |
|
116 |
|
117 |
cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true); |
117 |
cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true); |
118 |
|
118 |
|
119 |
//prostredni dira |
119 |
//prostredni dira |
120 |
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 |
120 |
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 |
121 |
|
121 |
|
122 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
122 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
123 |
|
123 |
|
124 |
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 |
124 |
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 |
125 |
|
125 |
|
126 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
126 |
cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true); |
127 |
|
127 |
|
128 |
} |
128 |
} |
129 |
} |
129 |
} |