-
Notifications
You must be signed in to change notification settings - Fork 0
/
door_handle_catch.scad
93 lines (81 loc) · 2.84 KB
/
door_handle_catch.scad
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
use <mayscadlib/positioning.scad>
use <mayscadlib/3d/screws.scad>
$fn = 100;
module round_2d(r=1) {
offset(r=r)
offset(r=-r)
children();
}
module catch(handle_height=20, catch_height=20, plate_width=10, screw=spax_3x12_z1(), mount_right=false) {
mount_plate_width = 1.5 * screw_head_dia(screw);
plate_thickness = screw_head_h(screw);
module catch_core() {
lift(plate_thickness)
linear_extrude(catch_height) {
catch_shape();
}
baseplate();
module baseplate() {
difference () {
linear_extrude(plate_thickness)
round_2d() {
translate([-plate_width - 1, -mount_plate_width])
square([plate_width + handle_height, mount_plate_width]);
catch_shape(round=false);
}
lift(plate_thickness)
translate([-plate_width, -mount_plate_width/2])
place([
[1*screw_head_dia(screw),0],
[plate_width + handle_height - 1.25 * screw_head_dia(screw), 0]
])
make_screw(screw, head_clearance=2);
}
}
// Old vertical baseplate
/*
module baseplate() {
difference() {
linear_extrude(plate_thickness) {
baseplate_shape();
}
lift(plate_thickness)
place([
[0, -mount_plate_width/2],
[0, mount_plate_width/2 + handle_height]
])
make_screw(screw, head_clearance=2);
}
}
module baseplate_shape() {
hull() catch_shape();
translate([-mount_plate_width/2, - mount_plate_width])
round_2d() {
square([mount_plate_width, handle_height + 2 * mount_plate_width]);
// square([handle_height - 2 + mount_plate_width/2, mount_plate_width]);
}
}
*/
// The actual "catching part", simply a rounded triangle with a
// plate to prevent the handle from going back over on the inside
module catch_shape(round=true) {
if(round) {
round_2d() catch_shape(round=false);
} else {
translate([-1,0,0]) {
polygon([[0,0], [handle_height,0], [0, handle_height]]);
translate([-plate_width, 0])
square([plate_width, plate_thickness]);
}
}
}
}
if(mount_right) {
rotate([180,0,0])
mirror([0,0,1])
catch(handle_height=handle_height, catch_height=catch_height, plate_width=plate_width, screw=screw, mount_right=false);
} else {
catch_core();
}
}
catch(mount_right=true);