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