-
Notifications
You must be signed in to change notification settings - Fork 0
/
lensmount.scad
79 lines (64 loc) · 2.05 KB
/
lensmount.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
//All units in mm
//diameter
mount_d=13.9;
//radius
mount_r=mount_d/2;
//height
mount_h=15;
mount_thickness=1.25;
mount_hole_spacing=20;
mount_screw_hole_r=0.75;
//side
mount_base_s=17;
//mount_base_s=mount_d+mount_thickness*2;
//height
mount_base_h=8;
$fa=1;
$fs=0.1;
module copy_mirror(vec=[0,1,0]) {
children();
mirror(vec) children();
}
module mirror_holes() {
copy_mirror([1,0,0])
translate([mount_hole_spacing/2,0,0])
children();
}
difference(){
union(){
//Top of mount
cylinder(h=mount_h,r=mount_r+mount_thickness);
//Mount base
translate([0,0,mount_base_h/2])
cube([mount_base_s,mount_base_s,mount_base_h],true);
//Mount lugs
mirror_holes(){
hull(){
cylinder(h=mount_base_h,r=mount_screw_hole_r+mount_thickness);
mount_hole_lug_d=2*(mount_screw_hole_r+mount_thickness);
translate([-(mount_hole_spacing-mount_hole_spacing/4),0,mount_base_h/2])
cube([mount_hole_spacing/2,mount_hole_lug_d,mount_base_h],true);
}
}
translate([0,-mount_base_s/4,mount_h-(mount_h-mount_base_h)/2])
cube([mount_screw_hole_r+mount_thickness*2,mount_base_s/2,mount_h-mount_base_h],true);
//rotate([90,0,0])
// cylinder(h=mount_base_s/2,r=(mount_screw_hole_r+mount_thickness));
}
union(){
//Mount top
translate([0,0,-mount_h/2])cylinder(h=mount_h*2,r=mount_r);
//Mount base
mount_base_inner_s = mount_base_s-mount_thickness*2;
mount_base_inner_h = mount_base_h-mount_thickness*2;
translate([0,0,0])
cube([mount_base_inner_s,mount_base_inner_s,(mount_base_h-mount_thickness)*2],true);
//Screw holes
mirror_holes()
translate([0,0,-mount_base_h/2])
cylinder(h=mount_base_h*2,r=mount_screw_hole_r);
translate([0,0,mount_h-((mount_h-mount_base_h)/2)])
rotate([90,0,0])
cylinder(h=mount_base_h*2,r=mount_screw_hole_r);
}
}