-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoor_lock.scad
More file actions
60 lines (41 loc) · 1.23 KB
/
door_lock.scad
File metadata and controls
60 lines (41 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
$fn = 200;
size_x = 240;
size_y = 40;
size_z = 6;
hole = size_y / 4;
door_width = 36;
difference(){
union() {
translate([0, size_y / 2, 0]) cylinder(r1 = size_y/2, r2 = size_y / 2, h = size_z);
translate([0, 0, 0]) cube([size_x, size_y, size_z]);
translate([size_x, size_y / 2, 0]) cylinder(r1 = size_y/2, r2 = size_y / 2, h = size_z);
}
union() {
translate([0, size_y / 2, 0]) cylinder(r1 = hole, r2 = hole, h = size_z + 1);
translate([size_x - door_width, size_y / 2, 0]) cube([door_width, size_y, size_z + 1]);
}
}
/*CubePoints = [*/
/*[ 0, 0, 0 ], //0*/
/*[ 10, 0, 0 ], //1*/
/*[ 10, 7, 0 ], //2*/
/*[ 0, 0, 5 ], //3*/
/*[ 10, 0, 5 ], //4*/
/*[ 10, 7, 5 ]; //5*/
/*}*/
/*CubeFaces = [*/
/*[0,1,2], // bottom*/
/*[3,4,1,0], // front*/
/*[5,4,3], // top*/
/*[4,5,2,1], // right*/
/*[5,2], // back*/
/*[3,0]]; // left*/
/*polyhedron( CubePoints, CubeFaces );*/
*cube([10, 10, 10]);
*%sphere(10);
*cylinder(r1 = 5, r2 = 5, h = 20);
*translate([10, 0, 0]) cube([10, 10, 10]);
*rotate(a = 90, v=[1, 0, 0]) cylinder(r1 = 5, r2 = 5, h = 10);
*for(i = [10:10:100]) {
translate([20, i, 0]) cylinder(r1 = 5, r2 = 1, h = 20);
}