source: robotics/car/design/2014.06.15-Robotics-Drill_Mount-v1/Robotics-Drill_Mount-v1.scad @ 11071cf

Last change on this file since 11071cf was 11071cf, checked in by Steve Castellotti <sc@…>, 8 years ago
  • all screw holes added
  • Property mode set to 100644
File size: 4.6 KB
Line 
1// Drill Mount
2// - all numbers are in mm
3
4// Default direction reference:
5// X - right
6// Y - forward/away
7// Z - up
8
9// NOTE: All measurements for direction switch are looking down on switch from above with movable piece pointed foward/away (y)
10
11switch_base_x = 17;
12switch_base_y = 28;
13switch_base_z = 10;
14
15wall_thickness = 10;
16
17mount_plate_thickness = 4;
18mount_plate_screw_clearance = 12;
19
20screw_hole_diameter = 1.75;
21screw_head_diameter = 4.20;
22screw_head_height = mount_plate_thickness / 4;
23
24// Left Wall
25left_wall_x = wall_thickness; // 10
26left_wall_y = switch_base_y + (wall_thickness * 2); // 48
27left_wall_z = switch_base_z; // 10
28
29// Right Wall
30right_wall_x = left_wall_x;
31right_wall_y = left_wall_y;
32right_wall_z = left_wall_z;
33
34// Rear Wall
35rear_wall_x = switch_base_x; // 17
36rear_wall_y = wall_thickness; // 10
37rear_wall_z = 13; // 13
38
39// Front Wall
40front_wall_x = switch_base_x; // 17
41front_wall_y = wall_thickness; // 10
42front_wall_z = 5; // 5
43
44// Mounting Platform
45mount_platform_x = switch_base_x + (wall_thickness * 2) + (mount_plate_screw_clearance * 2);
46mount_platform_y = switch_base_y + (wall_thickness * 2);
47mount_platform_z = mount_plate_thickness;
48
49
50module switch_mount(switch_base_x, switch_base_y, switch_base_z) {
51        difference() {
52                union() {
53
54                        // Direction Switch
55//                      translate(v=[0,0,0]){
56//                              cube([switch_base_x, switch_base_y, switch_base_z], center=true);
57//                      }
58
59                        // Left Wall
60                        translate(v=[(-switch_base_x/2)-(left_wall_x/2), 0, 0]){
61                                cube([left_wall_x, left_wall_y, left_wall_z], center=true);
62                        }
63
64                        // Right Wall
65                        translate(v=[(switch_base_x/2)+(right_wall_x/2), 0, 0]){
66                                cube([right_wall_x, right_wall_y, right_wall_z], center=true);
67                        }
68
69                        // Rear Wall
70                        translate(v=[0, (-switch_base_y/2)-(wall_thickness/2), (rear_wall_z-switch_base_z)/2]){
71                                cube([rear_wall_x, rear_wall_y, rear_wall_z], center=true);
72                        }
73
74                        // Front Wall
75                        translate(v=[0, (switch_base_y/2)+(wall_thickness/2), (front_wall_z-switch_base_z)/2]){
76                                cube([front_wall_x, front_wall_y, front_wall_z], center=true);
77                        }
78
79                        // Mount Plate
80                        translate(v=[0, 0, -(switch_base_z+mount_platform_z)/2]) {
81                                cube([mount_platform_x, mount_platform_y, mount_platform_z], center=true);
82                        }
83
84                } // union()
85
86                // Front Left Screw Hole
87                translate(v=[-(switch_base_x/2)-(left_wall_x/2)-(mount_plate_screw_clearance/1.2), mount_platform_y/4, -(switch_base_z/2)-(mount_platform_z/2)-(mount_plate_thickness/2)])
88                {
89                        cylinder(r=screw_hole_diameter, h=mount_plate_thickness);
90                }
91                // Front Left Screw Head
92                translate(v=[-(switch_base_x/2)-(left_wall_x/2)-(mount_plate_screw_clearance/1.2), mount_platform_y/4, -(switch_base_z/2)-screw_head_height])
93                {
94                        cylinder(r=screw_head_diameter, h=screw_head_height);
95                }
96
97                // Rear Left Screw Hole
98                translate(v=[-(switch_base_x/2)-(left_wall_x/2)-(mount_plate_screw_clearance/1.2), -mount_platform_y/4, -(switch_base_z/2)-(mount_platform_z/2)-(mount_plate_thickness/2)])
99                {
100                        cylinder(r=screw_hole_diameter, h=mount_plate_thickness);
101                }
102                // Rear Left Screw Head
103                translate(v=[-(switch_base_x/2)-(left_wall_x/2)-(mount_plate_screw_clearance/1.2), -mount_platform_y/4, -(switch_base_z/2)-screw_head_height])
104                {
105                        cylinder(r=screw_head_diameter, h=screw_head_height);
106                }
107
108
109                // Rear Right Screw Hole
110                translate(v=[(switch_base_x/2)(right_wall_x/2)+(mount_plate_screw_clearance/1.2), mount_platform_y/4, -(switch_base_z/2)-(mount_platform_z/2)-(mount_plate_thickness/2)])
111                {
112                        cylinder(r=screw_hole_diameter, h=mount_plate_thickness);
113                }
114                // Rear Right Screw Head
115                translate(v=[(switch_base_x/2)(right_wall_x/2)+(mount_plate_screw_clearance/1.2), mount_platform_y/4, -(switch_base_z/2)-screw_head_height])
116                {
117                        cylinder(r=screw_head_diameter, h=screw_head_height);
118                }
119
120        } // difference()
121}
122
123switch_mount(switch_base_x, switch_base_y, switch_base_z);
124
125
126// Quick reference
127// translate() - Translates (moves) its child elements along the specified vector. The argument name is optional.
128// difference() -
129
130// Cube 
131// Creates a cube at the origin of the coordinate system. When center is true the cube will be centered on the origin, otherwise it is created in the first octant. The argument names are optional if the arguments are given in the same order as specified in the parameters
132//
133// Parameters
134//
135// size
136// v=Decimal or 3 value array. If a single number is given, the result will be a cube with sides of that length. If a 3 value array is given, then the values will correspond to the lengths of the X, Y, and Z sides. Default value is 1.
137//
138// center
139// Boolean. This determines the positioning of the object. If true, object is centered at (0,0,0). Otherwise, the cube is placed in the positive quadrant with one corner at (0,0,0). Defaults to false
Note: See TracBrowser for help on using the repository browser.