Rev Author Line No. Line
4224 kaklik 1 include <configuration.scad>
2  
3 difference () {
4 union () {
5 color("green")
6 translate([-(vzdalenost_od_okraje-radidus_hrany),-(vzdalenost_od_okraje-radidus_hrany),0]) // center top screw
7 cylinder(vyska, d=(2*radidus_hrany), center=true);
8  
9 color("cyan")
10 translate([vzdalenost_der/4, vzdalenost_der/4, -vyska/2])
11 linear_extrude(height = vyska)
12 square([vzdalenost_der/2, vzdalenost_der/2], center = true);
13  
14 color("gray")
15 translate([-vzdalenost_od_okraje/2, vzdalenost_der/4, -vyska/2])
16 linear_extrude(height = vyska)
17 square([(vzdalenost_od_okraje), vzdalenost_der/2], center = true);
18  
19 color("gray")
20 translate([vzdalenost_der/4, -vzdalenost_od_okraje/2, -vyska/2])
21 linear_extrude(height = vyska)
22 square([vzdalenost_der/2, vzdalenost_od_okraje], center = true);
23  
24 color("red")
25 translate([-(vzdalenost_od_okraje-radidus_hrany)/2, -vzdalenost_od_okraje/2, -vyska/2])
26 linear_extrude(height = vyska)
27 square([vzdalenost_od_okraje-radidus_hrany, vzdalenost_od_okraje], center = true);
28  
29 color("red")
30 translate([-vzdalenost_od_okraje/2,-(vzdalenost_od_okraje-radidus_hrany)/2, -vyska/2])
31 linear_extrude(height = vyska)
32 square([vzdalenost_od_okraje, vzdalenost_od_okraje-radidus_hrany], center = true);
33  
34 color("green")
35 translate([vzdalenost_der, -vzdalenost_od_okraje/2, -(vyska-(2*zapust))/2])
36 linear_extrude(height = (vyska-(2*zapust)))
37 square([vzdalenost_der, vzdalenost_od_okraje], center = true);
38  
39 color("red")
40 translate([-vzdalenost_od_okraje/2,vzdalenost_der, -(vyska-(2*zapust))/2])
41 linear_extrude(height = (vyska-(2*zapust)))
42 square([ vzdalenost_od_okraje,vzdalenost_der], center = true);
43  
44 color("cyan")
45 translate([vzdalenost_od_diry/2, vzdalenost_der, -(vyska-(2*zapust))/2])
46 linear_extrude(height = (vyska-(2*zapust)))
47 square([(vzdalenost_od_diry), vzdalenost_der], center = true);
48  
49 color("cyan")
50 translate([vzdalenost_der, vzdalenost_od_diry/2, -(vyska-(2*zapust))/2])
51 linear_extrude(height = (vyska-(2*zapust)))
52 square([vzdalenost_der, vzdalenost_od_diry ], center = true);
53  
54 }
55  
56 //diry na sroub
57 translate([0,0,0]) // center top screw
58 cylinder(2*vyska, d=(prumer_sroubu), center=true);
59  
60 translate([vzdalenost_der,0,0]) // center top screw
61 cylinder(2*vyska, d=(prumer_sroubu), center=true);
62  
63 translate([0,vzdalenost_der,0]) // center top screw
64 cylinder(2*vyska, d=(prumer_sroubu), center=true);
65  
66 //diry na matice
67 //1. krajni matice
68 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
69  
70 cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true);
71  
72 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
73  
74 cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true);
75  
76  
77 //2. krajni matice
78 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
79  
80 cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true);
81  
82 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
83  
84 cube([ prumer_matice+posuv_dorazu+vzdalenost_od_diry,prumer_matice,vyska_matice], center = true);
85  
86 //prostredni dira
87 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
88  
89 cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true);
90  
91 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
92  
93 cube([prumer_matice, prumer_matice+posuv_dorazu+vzdalenost_od_diry,vyska_matice], center = true);
94  
95  
96 }