source: robotics/car/design/2014.06.15-Robotics-Drill_Mount-v1/Robotics-Drill_Mount-v1.scad @ 34e955d

Last change on this file since 34e955d was 34e955d, checked in by Steve Castellotti <sc@…>, 8 years ago
  • switch groove added to base
  • Volume gap added to cut down on resin required
  • Property mode set to 100644
File size: 5.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
45// Switch Groove
46switch_groove_x = 6;
47//switch_groove_y = 1.7;
48switch_groove_y = 20.4;
49switch_groove_z = 1;
50
51
52// Volume Gap - creates some extra space to cut down on print material
53volume_gap_x = 6;
54volume_gap_y = 6;
55volume_gap_z = 6;
56
57
58// Mounting Platform
59mount_platform_x = switch_base_x + (wall_thickness * 2) + (mount_plate_screw_clearance * 2);
60mount_platform_y = switch_base_y + (wall_thickness * 2);
61mount_platform_z = mount_plate_thickness;
62
63
64module switch_mount(switch_base_x, switch_base_y, switch_base_z) {
65        difference() {
66                union() {
67
68                        // Direction Switch
69//                      translate(v=[0,0,0]){
70//                              cube([switch_base_x, switch_base_y, switch_base_z], center=true);
71//                      }
72
73                        // Left Wall
74                        translate(v=[(-switch_base_x/2)-(left_wall_x/2), 0, 0]){
75                                cube([left_wall_x, left_wall_y, left_wall_z], center=true);
76                        }
77
78                        // Right Wall
79                        translate(v=[(switch_base_x/2)+(right_wall_x/2), 0, 0]){
80                                cube([right_wall_x, right_wall_y, right_wall_z], center=true);
81                        }
82
83                        // Rear Wall
84                        translate(v=[0, (-switch_base_y/2)-(wall_thickness/2), (rear_wall_z-switch_base_z)/2]){
85                                cube([rear_wall_x, rear_wall_y, rear_wall_z], center=true);
86                        }
87
88                        // Front Wall
89                        translate(v=[0, (switch_base_y/2)+(wall_thickness/2), (front_wall_z-switch_base_z)/2]){
90                                cube([front_wall_x, front_wall_y, front_wall_z], center=true);
91                        }
92
93                        // Mount Plate
94                        translate(v=[0, 0, -(switch_base_z+mount_platform_z)/2]) {
95                                cube([mount_platform_x, mount_platform_y, mount_platform_z], center=true);
96                        }
97
98                } // union()
99
100
101                // Front Switch Groove
102                translate(v=[0, 0, -5]){
103                        cube([switch_groove_x, switch_groove_y, switch_groove_z], center=true);
104                }
105
106
107                // Front Left Screw Hole
108                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)])
109                {
110                        cylinder(r=screw_hole_diameter, h=mount_plate_thickness);
111                }
112                // Front Left Screw Head
113                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])
114                {
115                        cylinder(r=screw_head_diameter, h=screw_head_height);
116                }
117
118                // Rear Left Screw Hole
119                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)])
120                {
121                        cylinder(r=screw_hole_diameter, h=mount_plate_thickness);
122                }
123                // Rear Left Screw Head
124                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])
125                {
126                        cylinder(r=screw_head_diameter, h=screw_head_height);
127                }
128
129
130                // Front Right Screw Hole
131                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)])
132                {
133                        cylinder(r=screw_hole_diameter, h=mount_plate_thickness);
134                }
135                // Front Right Screw Head
136                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])
137                {
138                        cylinder(r=screw_head_diameter, h=screw_head_height);
139                }
140
141                // Rear Right Screw Hole
142                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)])
143                {
144                        cylinder(r=screw_hole_diameter, h=mount_plate_thickness);
145                }
146                // Rear Right Screw Head
147                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])
148                {
149                        cylinder(r=screw_head_diameter, h=screw_head_height);
150                }
151
152
153
154                // Volume Gap
155                translate(v=[0, (-switch_base_y/2)-(wall_thickness/2), 0]){
156                        cube([volume_gap_x, volume_gap_y, volume_gap_z], center=true);
157                }
158
159        } // difference()
160}
161
162switch_mount(switch_base_x, switch_base_y, switch_base_z);
163
164
165// Quick reference
166// translate() - Translates (moves) its child elements along the specified vector. The argument name is optional.
167// difference() -
168
169// Cube 
170// 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
171//
172// Parameters
173//
174// size
175// 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.
176//
177// center
178// 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.