f91b69e1d7576e27b7bca5b9fe3d7ffd6efd9edb
[clinton/3d-models.git] / carriage adapter / itty-wilson.scad
1 /*
2 min y = 0
3 max y = 100
4 min x = 1205
5 max x = 1254
6
7 Makerfair X carriage plate adapter for the Wilson RepRap.
8 Copyright (c) 2015 Clinton Ebadi <clinton@unknownlamer.org>
9
10 This program is free software: you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 3 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
22
23 Measurements reverse engineered from
24 https://github.com/RickSisco/MakerFarm-Prusa-i3v-12-Inch
25
26 Intended for use with the itty bitty dual extruder series.
27
28 Source needs a good cleanup. Evil loops that don't take advantage of
29 the geometry of the object abound.
30
31 major todo:
32
33 - square hole placement is a total mess
34
35 */
36
37 use <MCAD/nuts_and_bolts.scad>
38
39 $fn = 64;
40
41 carriage_height = 64;
42 carriage_width = 52;
43
44 plate_width = 75; // wilson carriage is only 50mm wide!
45 plate_depth = 6; // wilson default depth = 8, makerfarm = 6
46
47 hole_tolerance = 0.25; // widen holes a bit, may still need to drill out
48
49 plate_cut_height = 6.5;
50 plate_cut_width = 6;
51 plate_cut_distance = 13;
52 plate_cut_center = 25.1;
53 plate_cut_y_offset = 27;
54 plate_cut_bolt = 3 + hole_tolerance;
55 plate_cut_x_bolt_offset = 10.5 + plate_cut_bolt / 2;
56
57 plate_extra_height = 4; // make plate a bit taller so it is structurally sound
58
59 plate_height = plate_cut_height + plate_cut_y_offset + plate_extra_height;
60
61 lower_cut_y_offset = 5.33; // 5.325 in CAD
62 lower_bolt_x_offset = 1.5 + plate_cut_bolt / 2;
63 lower_bolt_y_offset = 3.275 + plate_cut_bolt / 2;
64
65 carriage_bolt = 4 + hole_tolerance;
66 carriage_hole_spacing = 23;
67 carriage_clearance = 20; // holes are 20mm from bottom of plate
68 carriage_y_offset = plate_cut_y_offset + plate_cut_height + carriage_clearance;
69 carriage_nut_depth = 3.2 + 3.2/2 + 0.1; // m4 nut depth + half of an m4 nut + tolerance
70
71 corner_radius = 3; // round off the corners to make it look nicer
72
73 shelf_mount ();
74 translate ([(plate_width - carriage_width) / 2, plate_height - plate_extra_height/2, 0]) carriage_mount ();
75
76 // mount to wilson x-carriage
77 module carriage_mount () {
78 difference () {
79 linear_extrude (height = plate_depth, convexity = 8) {
80 // outline of plate + bolt holes
81 difference () {
82 translate ([corner_radius, corner_radius, 0]) {
83 minkowski () {
84 square ([carriage_width - corner_radius*2, carriage_height - corner_radius]);
85 circle (r = corner_radius);
86 }
87 }
88
89 #translate ([(carriage_width - carriage_hole_spacing) / 2, (carriage_height - carriage_hole_spacing) /2, 0])
90 for (x = [0, carriage_hole_spacing], y = [0, carriage_hole_spacing]) {
91 translate ([x, y, 0]) circle (d = carriage_bolt);
92 }
93 }
94 }
95 // after extruding, cut out spaces for M4 hex nuts.
96 translate ([(carriage_width - carriage_hole_spacing) / 2, (carriage_height - carriage_hole_spacing) /2, plate_depth - carriage_nut_depth]) {
97 for (x = [0, carriage_hole_spacing], y = [0, carriage_hole_spacing]) {
98 translate ([x, y, 0]) linear_extrude (height = carriage_nut_depth + 0.01) nutHole (size = carriage_bolt, proj = 1);
99 }
100 }
101 }
102 }
103
104 // mount for makerfarm extruder shelf
105 module shelf_mount () {
106 linear_extrude (height = plate_depth, convexity = 8) {
107 difference () {
108 translate ([corner_radius, corner_radius, 0]) {
109 minkowski () {
110 square ([plate_width - corner_radius*2, plate_height - corner_radius*2]);
111 circle (r = corner_radius);
112 }
113 }
114
115 // upper shelf mount
116 translate ([0, plate_cut_y_offset, 0]) {
117 for (x = [-0.01, plate_cut_width + plate_cut_distance, plate_cut_width*2 + plate_cut_distance + plate_cut_center, plate_cut_width*3 + plate_cut_distance*2 + plate_cut_center + 0.01])
118 #translate ([x - hole_tolerance/2, 0, 0]) square ([plate_cut_width + hole_tolerance, plate_cut_height]);
119
120 // looks like the bolt is at the midpoint between the cut outs
121 for (x = [plate_cut_x_bolt_offset, plate_width - plate_cut_x_bolt_offset])
122 translate ([x, plate_cut_height / 2, 0]) circle (d = plate_cut_bolt + hole_tolerance);
123 }
124
125 // lower shelf mount
126 translate ([0, lower_cut_y_offset, 0]) {
127 for (x = [plate_cut_width/2 - 0.01, plate_width - plate_cut_width/2 + 0.01]) {
128 // lower cut out is closer to 6mm than 6.5mm in cad drawings
129 translate ([x, plate_cut_height/2, 0]) square ([plate_cut_width, plate_cut_height - 0.5], center=true);
130 }
131 // I think the intention is for the screw holes to be centered over the cut out
132 for (x = [lower_bolt_x_offset, plate_width - lower_bolt_x_offset])
133 translate ([x, plate_cut_height + lower_bolt_y_offset, 0]) circle (d = plate_cut_bolt + hole_tolerance);
134 }
135 }
136 }
137 }