-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchassi.scad
142 lines (124 loc) · 3.4 KB
/
chassi.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
use <./bcad.scad>
include <cfg.scad>
module baseChassi() {
difference() {
cube([LEG_W, CHASSI_H, WALL]);
move(x=WALL, y=WALL, z=-WALL/2)
cube([LEG_W-WALL*2, CHASSI_H - WALL*2 -CRANK_D-WALL, WALL*2]);
}
}
module baseChassiO() {
difference() {
union() {
cube([LEG_W, CHASSI_H-WALL-CRANK_D, WALL]);
move(x=LEG_W/2,y=CHASSI_H-WALL-CRANK_D) {
cylinder(d=CRANK_D+R_PLAY+WALL*2,h=2);
}
}
move(x=WALL, y=WALL, z=-WALL/2)
cube([LEG_W-WALL*2, CHASSI_H - WALL*2 -CRANK_D-WALL*2, WALL*2]);
move(x=LEG_W/2,y=CHASSI_H-WALL-CRANK_D,z=-WALL/2)
cylinder(d=CRANK_D+R_PLAY,h=WALL*2);
}
}
module chassiO(legs=LEG_COUNT) {
for(i = [0:legs]) {
back(i*LEG_W)
zrot(90) xrot(90)
baseChassiO();
}
for(i = NUT_POSITION) { //M3NutHolder
back(i*10)
left(10/2-2) zrot(90)
m3NutHolder(cutted=false);
}
}
module crankHold() {
d = CRANK_D+R_PLAY+WALL*2;
difference() {
union() {
cylinder(d=d,h=2);
move(x=-d/2,y=-d/2-1)
xflip() triangle([d/2,d/2+1,2]);
move(x=d/2,y=-d/2-1)
triangle([d/2,d/2+1,2]);
move(x=-d/2,y=-d/2-1)
cube([d,d/2+1,2]);
}
down(WALL/2)
cylinder(d=CRANK_D+R_PLAY,h=WALL*2);
}
}
module baseChassiI() {
union(){
difference() {
union() {
cube([LEG_W, CHASSI_H-WALL-7, WALL]);
}
move(x=WALL, y=WALL, z=-WALL/2)
cube([LEG_W-WALL*2, CHASSI_H - WALL*2 -9, WALL*2]);
}
back(7)
difference() {
cube([10,2,18]);
move(x=WALL,y=-1,z=WALL2)
cube([10-WALL2,4,18-WALL2-4-WALL2]);
move(x=10/2,z=18-1-2,y=3)
xrot(90)
cylinder(r=2.1,h=4);
}
}
}
module chassiI(legs=LEG_COUNT) {
zrot(90) xrot(90) {
difference()
{
union() {
for(i = [0:legs]) {
right(i*LEG_W)
baseChassiI();
}
}
for(i = NUT_POSITION) {
right(-LEG_W + LEG_W*i +WALL)
up(WALL2) {
cube([16,20,6]);
}
}
}
for(i = NUT_POSITION) {
right((i-1)*LEG_W)
back(7) up(10) {
right(2)
xrot(-90)
triangle([6,6,2]);
right(12+6)
xflip() xrot(-90)
triangle([6,6,2]);
}
}
}
zrot(90) xrot(90) {
for(i = INNER_CRANK_STOPS) {
move(x=i*10,y= CHASSI_H-WALL-CRANK_R-1)
crankHold();
}
}
for(i = [0,2,3,4,6,7,8,9,10,11,13,14]) { //left triangles
move(y=WALL+i*10, x=WALL, z=7)
yrot(90)xrot(90)
triangle([5,6,WALL]);
}
for(i = [1,2,3,5,6,7,8,9,10,12,13,15]) { //right triangles
move(y=WALL+i*10+LEG_W-WALL, x=WALL, z=7)
yrot(90)xrot(90)
triangle([5,6,WALL]);
}
for(i = NUT_POSITION) {
back(i*10)
right(10/2)zrot(-90)
m3NutHolder(cutted=false,play=NUT_PLAY);
}
}
$fn=50;
chassiI();