-
Notifications
You must be signed in to change notification settings - Fork 0
/
Chassis.scad
123 lines (97 loc) · 3.21 KB
/
Chassis.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
include <puzzle.scad>
res = 100;
thickness = 0.25;
kerf = 0.00;
kerf_2 = kerf / 2;
width = 10;
length = 8;
height = 5;
wheel_diameter = 3;
screw_diameter = 0.125;
wheel_stack = 2;
wheel_location = 1/3.8;
module FrontPlate_2d(is_square) {
difference() {
InterlockingPlate(width,height,0,0,0,1,0.25);
translate([width*.28,height/1.6]) SonarEye_2d();
translate([width*.72,height/1.6]) SonarEye_2d(true);
translate([width/2,height*.45]) square([.32,.32],center=true);
}
}
module SonarEye_2d(second) {
eye_size = 2.2;
dual_supports = false;
support_angle = 20;
difference() {
circle(eye_size/2, $fn=res);
circle(eye_size/2.3, $fn=res);
rotate((second?-1:1)*support_angle) square([eye_size,eye_size/8],center=true);
if (dual_supports) rotate(90+(second?-1:1)*support_angle) square([eye_size,eye_size/8],center=true);
} PingSensor_2d();
}
module LeftPlate_2d() {
difference() {
InterlockingPlate(length,height,0,0,0,1,0.25);
translate([length/2,height*.8]) PingSensor_2d();
}
}
module RightPlate_2d() {
difference() {
InterlockingPlate(length,height,0,1,1,0,0.25);
translate([length/2,height*.8]) PingSensor_2d();
}
}
module BackPlate_2d() {
difference() {
InterlockingPlate(width,height,0,1,0,1,0.25);
translate([width/2,height*.8]) PingSensor_2d();
}
}
module PingSensor_2d() {
translate([-0.495, 0]) circle(.315, $fn=res);
translate([0.495, 0]) circle(.315, $fn=res);
}
module MotorMount_2d() {
motor_mount_length = 2.52;
motor_mount_width = 0.5;
translate([motor_mount_width/2,-motor_mount_length/2]) union() {
circle(screw_diameter/2, $fn=res);
translate([0,motor_mount_length]) circle(screw_diameter/2, $fn=res);
}
}
module BottomPlate_2d() {
wall_dist = 1.75;
axle_length = 0.7;
wheel_width = 0.75;
difference() {
InterlockingPlate(width,length,1,0,1,1);
translate([wall_dist,length*wheel_location,0]) MotorMount_2d();
translate([width-wall_dist,length*wheel_location]) rotate(180) MotorMount_2d();
translate([wall_dist-axle_length,length*wheel_location]) square([wheel_width,wheel_diameter], center=true);
translate([width-wall_dist+axle_length,length*wheel_location]) square([wheel_width,wheel_diameter], center=true);
translate([width/2,length-1,0.25]) union() {
translate([-0.5,0,0]) circle(screw_diameter/2, $fn=res);
translate([0.5,0,0]) circle(screw_diameter/2, $fn=res);
}
}
}
module TopPlate_2d() {
InterlockingPlate(width,length,1,1,0,1);
}
module Wheel_2d() {
bolt_circle = 0.63;
shaft_diameter = 0.25;
bump_angle = 5;
bump_scale = 0.0125;
difference() {
circle(wheel_diameter/2, $fn=res);
for (i=[0:bump_angle:360-bump_angle]) {
translate([wheel_diameter*cos(i)/2,wheel_diameter*sin(i)/2]) circle(bump_scale*wheel_diameter, $fn=res);
}
translate([bolt_circle/2,0]) circle(screw_diameter/2,$fn=res);
translate([-bolt_circle/2,0]) circle(screw_diameter/2,$fn=res);
translate([0,bolt_circle/2]) circle(screw_diameter/2,$fn=res);
translate([0,-bolt_circle/2]) circle(screw_diameter/2,$fn=res);
circle(shaft_diameter/2,$fn=res);
}
}