initial import of upstream cura dual temp plugin
[clinton/3d-models.git] / carriage adapter / itty-wilson.scad
CommitLineData
f9a12374
CE
1/*
2min y = 0
3max y = 100
4min x = 1205
5max x = 1254
6
7Makerfair X carriage plate adapter for the Wilson RepRap.
8Copyright (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
23Measurements reverse engineered from
24https://github.com/RickSisco/MakerFarm-Prusa-i3v-12-Inch
25
26Intended for use with the itty bitty dual extruder series.
27
28Source needs a good cleanup. Evil loops that don't take advantage of
29the geometry of the object abound.
30
62f36d7f
CE
31major todo:
32
33 - square hole placement is a total mess
34
f9a12374
CE
35*/
36
37use <MCAD/nuts_and_bolts.scad>
38
62f36d7f
CE
39$fn = 64;
40
70d8c6b3
CE
41hole_tolerance = 0.6; // widen holes a bit, may still need to drill out
42
43// Size of mounting bolt heads so they can be recessed
736cd53b 44bolthead_depth = 2;
70d8c6b3
CE
45bolthead_diameter = 5.5 + hole_tolerance;
46
62f36d7f 47carriage_height = 64;
736cd53b 48carriage_width = 51;
f9a12374
CE
49
50plate_width = 75; // wilson carriage is only 50mm wide!
70d8c6b3 51plate_depth = 6 + bolthead_depth; // wilson default depth = 8, makerfarm = 6
f9a12374
CE
52
53plate_cut_height = 6.5;
54plate_cut_width = 6;
70d8c6b3 55plate_cut_distance = 13.3;
f9a12374 56plate_cut_y_offset = 27;
84a5e569 57plate_cut_bolt = 3 + hole_tolerance;
70d8c6b3 58plate_cut_x_bolt_offset = plate_cut_distance + plate_cut_bolt / 2;
f9a12374 59
62f36d7f 60plate_extra_height = 4; // make plate a bit taller so it is structurally sound
84a5e569 61
70d8c6b3 62plate_height = plate_cut_height + plate_cut_y_offset + plate_extra_height;
f9a12374
CE
63
64lower_cut_y_offset = 5.33; // 5.325 in CAD
65lower_bolt_x_offset = 1.5 + plate_cut_bolt / 2;
66lower_bolt_y_offset = 3.275 + plate_cut_bolt / 2;
67
84a5e569 68carriage_bolt = 4 + hole_tolerance;
62f36d7f 69carriage_hole_spacing = 23;
f9a12374
CE
70carriage_clearance = 20; // holes are 20mm from bottom of plate
71carriage_y_offset = plate_cut_y_offset + plate_cut_height + carriage_clearance;
84a5e569 72carriage_nut_depth = 3.2 + 3.2/2 + 0.1; // m4 nut depth + half of an m4 nut + tolerance
70d8c6b3 73carriage_offset = [(plate_width - carriage_width) / 2, 0 , 0];
f9a12374
CE
74
75corner_radius = 3; // round off the corners to make it look nicer
76
736cd53b
CE
77module itty_wilson () {
78 difference () {
79 union () {
80 translate (carriage_offset) carriage_mount_base ();
81 shelf_mount_base ();
82 }
83 translate (carriage_offset) carriage_mount_holes ();
84 shelf_mount_holes ();
70d8c6b3 85 }
70d8c6b3 86}
f9a12374 87
736cd53b
CE
88itty_wilson ();
89
70d8c6b3
CE
90// mount to wilson x-carriage
91module carriage_mount_base () {
92 linear_extrude (height = plate_depth, convexity = 8) {
93 // outline of plate + bolt holes
94 translate ([corner_radius, corner_radius, 0]) {
95 minkowski () {
736cd53b 96 square ([carriage_width - corner_radius*2, carriage_height - corner_radius*2]);
70d8c6b3 97 circle (r = corner_radius);
f9a12374 98 }
f9a12374 99 }
70d8c6b3
CE
100 }
101}
102
103module carriage_mount_holes () {
104 #translate ([(carriage_width - carriage_hole_spacing) / 2, (carriage_height - carriage_hole_spacing) /2, 0])
105 for (x = [0, carriage_hole_spacing], y = [0, carriage_hole_spacing]) {
736cd53b 106 translate ([x, y, -50.1]) cylinder (d = carriage_bolt, h = plate_depth+100);
70d8c6b3
CE
107 }
108
109 // after extruding, cut out spaces for M4 hex nuts.
110 translate ([(carriage_width - carriage_hole_spacing) / 2, (carriage_height - carriage_hole_spacing) /2, plate_depth - carriage_nut_depth]) {
111 for (x = [0, carriage_hole_spacing], y = [0, carriage_hole_spacing]) {
112 translate ([x, y, 0]) linear_extrude (height = carriage_nut_depth + 0.01) nutHole (size = carriage_bolt, proj = 1);
f9a12374
CE
113 }
114 }
115}
116
84a5e569 117// mount for makerfarm extruder shelf
70d8c6b3
CE
118module shelf_mount_base () {
119 linear_extrude (height = plate_depth, convexity = 8) {
120 translate ([corner_radius, corner_radius, 0]) {
121 minkowski () {
122 square ([plate_width - corner_radius*2, plate_height - corner_radius*2]);
123 circle (r = corner_radius);
84a5e569 124 }
70d8c6b3
CE
125 }
126 }
127}
f9a12374 128
70d8c6b3 129module shelf_mount_holes () {
736cd53b 130 depth = plate_depth*2+0.4;
70d8c6b3 131 translate ([0, 0, -0.1]) {
736cd53b
CE
132 // upper shelf mount
133 translate ([plate_cut_width/2, plate_cut_y_offset, 0]) {
134 for (x = [-0.001, plate_cut_width + plate_cut_distance,
70d8c6b3 135 plate_width - plate_cut_width + 0.001, plate_width - plate_cut_width*2 - plate_cut_distance])
736cd53b 136 translate ([x, plate_cut_height/2, 0]) cube ([plate_cut_width + hole_tolerance, plate_cut_height, depth], center = true);
70d8c6b3
CE
137
138 // looks like the bolt is at the midpoint between the cut outs
139 for (x = [plate_cut_x_bolt_offset - plate_cut_width, plate_width - plate_cut_x_bolt_offset])
140 translate ([x, plate_cut_height / 2, 0]) {
141 #cylinder (d = plate_cut_bolt, h = depth);
142 cylinder (d = bolthead_diameter, h = bolthead_depth+0.1);
143 }
84a5e569 144
84a5e569
CE
145 }
146
147 // lower shelf mount
148 translate ([0, lower_cut_y_offset, 0]) {
62f36d7f 149 for (x = [plate_cut_width/2 - 0.01, plate_width - plate_cut_width/2 + 0.01]) {
84a5e569 150 // lower cut out is closer to 6mm than 6.5mm in cad drawings
70d8c6b3
CE
151 translate ([x, plate_cut_height/2, 0]) cube ([plate_cut_width, plate_cut_height - 0.5, depth*2], center=true);
152 }
84a5e569
CE
153 // I think the intention is for the screw holes to be centered over the cut out
154 for (x = [lower_bolt_x_offset, plate_width - lower_bolt_x_offset])
70d8c6b3
CE
155 translate ([x, plate_cut_height + lower_bolt_y_offset, 0]) {
156 cylinder (d = plate_cut_bolt, h = depth);
157 cylinder (d = bolthead_diameter, h = bolthead_depth+0.1);
158 }
f9a12374
CE
159 }
160 }
f9a12374 161}