forked from timschmidt/parameterized-mendel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
x-carriage-upper.scad
142 lines (130 loc) · 5.36 KB
/
x-carriage-upper.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
/*
* X carriage, upper section for Mendel
* by Vik Olliver. Based on examples which are:
* Copyright (C) 2009 Catarina Mota <[email protected]>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
<mendel.inc>
<mendel.conf>
x_car_top_height=14;
x_car_width=44;
x_top_knob_height=2;
x_top_knob_length=13;
x_centre_cavity_length=73;
x_centre_cavity_width=25;
x_centre_cavity_height=40;
wing_length=33;
wing_width=10;
wing_height=10;
module x_car_top_block() {
union () {
translate ([0,0.5,x_car_top_height/2]) box(x_car_length,x_car_width,x_car_top_height);
// Knobs for mounting bottom of carriage.
translate([(x_car_length-x_top_knob_length)/2,0,x_car_top_height+x_top_knob_height/2])
box(x_top_knob_length,x_car_top_knob_width,x_top_knob_height);
translate([(x_car_length-x_top_knob_length)/-2,0,x_car_top_height+x_top_knob_height/2])
box(x_top_knob_length,x_car_top_knob_width,x_top_knob_height);
// WIngs
translate ([5.5,(wing_width+x_car_width)/2,wing_height/2]) box(wing_length,wing_width,wing_height);
translate ([8,(wing_width+x_car_width)/-2+1.5,wing_height/2]) difference () {
box(wing_length,wing_width+1,wing_height);
translate ([wing_length/2,-wing_width,0]) rotate([0,0,45]) cube(19,center=true);
translate ([wing_length/-2,-wing_width,0]) rotate([0,0,45]) cube(19,center=true);
}
}
}
module cutouts() {
union () {
// Hole in da middle
translate([0,1,10])
box(x_centre_cavity_length,x_centre_cavity_width,x_centre_cavity_height);
// Hole to ease extruder fitting
translate ([x_car_wing_offset,1,10])
box(extruder_thick+2,x_centre_cavity_width+3,x_centre_cavity_height);
// Holes at distal X ends.
x_carriage_common_holes();
// Trimming of top edges
translate ([0,x_car_width/2+1,x_car_top_height]) rotate ([0,90,0])
cylinder(h=x_car_length+2,r=4,center=true);
translate ([0,x_car_width/-2,x_car_top_height]) rotate ([0,90,0]) cylinder(h=x_car_length+2,r=4,center=true);
// Nut & bolt holes in wings.
translate ([x_car_wing_offset,extruder_mount_hole_spacing/2,wing_height-4]) rotate([180,0,30])
m4_hole_vert_with_hex(50);
translate ([x_car_wing_offset,-extruder_mount_hole_spacing/2,wing_height-4]) rotate([180,0,30])
m4_hole_vert_with_hex(50);
// uncomment for bfb style extruder
/* //space for bfb extruder
translate ([x_car_wing_offset,0,10]) rotate([180,0,30])
cylinder(r=21,h=11);
translate([x_car_wing_offset,0,0]) rotate([0,0,180]) triangle(42,30);
*/
// Axle holes
translate([x_car_top_axle_offset,x_centre_cavity_width/-2-4,x_car_top_height/2-1]) rotate([90,-90,0])
m4_hole_horiz_with_hex(20);
translate([-x_car_top_axle_offset,x_centre_cavity_width/-2-4,x_car_top_height/2-1]) rotate([90,-90,0])
m4_hole_horiz_with_hex(20);
translate([x_car_top_axle_offset,x_centre_cavity_width/2+4,x_car_top_height/2-1]) rotate([-90,-90,0])
m4_hole_horiz_with_hex(20);
translate([-x_car_top_axle_offset,x_centre_cavity_width/2+4,x_car_top_height/2-1]) rotate([-90,-90,0])
m4_hole_horiz_with_hex(20);
// Horizontal holes in wing
// mendel extruder
translate([x_car_wing_offset+7,x_centre_cavity_width/2+6,x_car_top_height/2-1]) rotate([-90,-90,0])
// bfb extruder
//translate([x_car_wing_offset+7,x_centre_cavity_width/2+9,x_car_top_height/2-1]) rotate([-90,-90,0])
m4_hole_horiz_with_hex(30);
// mendel extruder
translate([x_car_wing_offset-11.2,x_centre_cavity_width/2+6,x_car_top_height/2-1]) rotate([-90,-90,0])
// bfb extruder
//translate([x_car_wing_offset-11.2,x_centre_cavity_width/2+9,x_car_top_height/2-1]) rotate([-90,-90,0])
m4_hole_horiz_with_hex(30);
// Notches for axles in bottom section.
// mendel extruder
translate ([x_car_bottom_axle_offset,x_centre_cavity_width/2-2,0]) rotate ([-17,0,0])
// bfb extruder
//translate ([x_car_bottom_axle_offset,x_centre_cavity_width/2-3,0]) rotate ([-17,0,0])
cylinder(h=50,r=5,center=true);
// mendel extruder
translate ([x_car_bottom_axle_offset,x_centre_cavity_width/2,18])
rotate ([110,0,0]) cylinder(h=21,r=10,center=true);
translate ([-x_car_bottom_axle_offset,x_centre_cavity_width/2-2,0]) rotate ([-17,0,0])
cylinder(h=50,r=5,center=true);
translate ([-x_car_bottom_axle_offset,x_centre_cavity_width/2,18])
rotate ([110,0,0]) cylinder(h=21,r=10,center=true);
// bfb extruder
/* translate ([-x_car_bottom_axle_offset,x_centre_cavity_width/2-3,0]) rotate ([-17,0,0])
cylinder(h=50,r=5,center=true);
*/
}
}
module triangle(width,height)
{
difference() {
cylinder(r=width/3*sqrt(3)-2,h=height);
for(i = [0:2])
{
rotate([0,0,i*360/3])
translate([width/2+(width/6)*sqrt(3),0,height/2]) cube([width,width,height],center=true);
}
}
}
module x_carriage_upper() {
difference () {
x_car_top_block();
cutouts();
}
}
x_carriage_upper();