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

Last change on this file since fb0b634 was fb0b634, checked in by Steve Castellotti <sc@…>, 8 years ago
  • initial commit
  • right and left walls created
  • Property mode set to 100644
File size: 2.0 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// Direction Switch
10// - all measurements are looking down from switch with movable piece pointed foward/away (y)
11switch_base_x = 17;
12switch_base_y = 28;
13switch_base_z = 10;
14
15// Quick reference
16// translate() - Translates (moves) its child elements along the specified vector. The argument name is optional.
17// difference() -
18
19// Cube 
20// 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
21//
22// Parameters
23//
24// size
25// 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.
26//
27// center
28// 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
29
30wall_thickness = 10;
31
32// Left Wall
33left_wall_x = wall_thickness; // 10
34left_wall_y = switch_base_y + (wall_thickness * 2); // 48
35left_wall_z = switch_base_z; // 10
36
37
38// Right Wall
39right_wall_x = left_wall_x;
40right_wall_y = left_wall_y;
41right_wall_z = left_wall_z;
42
43module switch_mount(switch_base_x, switch_base_y, switch_base_z) {
44        difference() {
45                union() {
46
47                        // Direction Switch
48                        translate(v=[0,0,0]){
49                                cube([switch_base_x,switch_base_y,switch_base_z],center=true);
50                        }
51
52                        // Left Wall
53                        translate(v=[(-switch_base_x/2)-(left_wall_x/2),0,0]){
54                                cube([left_wall_x,left_wall_y,left_wall_z],center=true);
55                        }
56
57                        // Right Wall
58                        translate(v=[(switch_base_x/2)+(right_wall_x/2),0,0]){
59                                cube([right_wall_x,right_wall_y,right_wall_z],center=true);
60                        }
61
62                }
63        }
64}
65
66switch_mount(switch_base_x, switch_base_y, switch_base_z);
67
Note: See TracBrowser for help on using the repository browser.