Welcome to mirror list, hosted at ThFree Co, Russian Federation.

upperFrame.scad - github.com/haydnhuntley/kumu-3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5b3812f8a925082c57919d1e8cd36f8995dbaac8 (plain)
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
// This upper frame works with 2020 extrusions and 6mm wide belts.
//
// This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
// International License.
// Visit:  http://creativecommons.org/licenses/by-sa/4.0/
//
// Haydn Huntley
// haydn.huntley@gmail.com

// 30% hexagonal infill with a 0.5mm nozzle is plenty strong enough.

$fn = 360/24;

include <configuration.scad>;
include <motor.scad>;
include <vertex.scad>;


// All measurements in mm.
debug  = false;
height = extrusionWidth;
crossPieceOffset       = -43;


// Draw the vertical extrusion.
if (debug)
   rotate([0, 0, 45])
   translate([-extrusionWidth/2, -extrusionWidth/2, -smidge/2])
   %cube([extrusionWidth, extrusionWidth, height+smidge]);

// Draw the horizontal extrusions.
if (debug)
	for (a = [1, -1])
		translate([a*20, -5, 0])
		rotate([0, 0, a*30])
		translate([-extrusionWidth/2, -2-4*extrusionWidth, 0])
		%cube([extrusionWidth, 4*extrusionWidth, extrusionWidth]);


module upperFrame()
{
	difference()
	{
		union()
		{
			vertex(height);

			intersection()
			{
				translate([-50, -100, 0])
				cube([100, 100, height]);

				// Use two conic sections to hold the idler bearing.
				union()
				{
					// The part of the cone which is away from the crosspiece.
					translate([0, -18.9, height/2])
					rotate([90, 0, 0])
					cylinder(r1=27.2/2, r2=7/2, h=11.1, $fn=90);

					// The part of the cone which attaches to the crosspiece.
					translate([0,
							   crossPieceOffset+dampenerOffset-1.6-smidge,
							   height/2])
					rotate([90, 0, 0])
					cylinder(r1=7/2, r2=19.4/2, h=6.2, $fn=90);
				}
			}
		}
		
		// Remove four M5x10 holes to attach the four horizontal extrusions.
		for (x = [1, -1])
			for (d = [35, 70])
				translate([x*fnX(d), -fnY(d), height/2])
				rotate([90, 0, x*120])
				translate([0, 0, -0.2])
				cylinder(r=m5LooseRadius, h=5, $fn=24);

		// Remove two M5x10 holes to attach the vertical extrusion.
		for (x = [1, -1])
			for (a = [0, 1])
				rotate([0, 0, 45+a*90])
				translate([extrusionWidth/2, 0, height/2])
				rotate([0, 90, 0])
				{
					cylinder(r=m5LooseRadius, h=5, $fn=24);
					translate([0, 0, 5-smidge])
					cylinder(r1=m5LowProfileHeadRadius,
							 r2=1.5+m5LowProfileHeadRadius,
							 h=9, $fn=24);
				}

		// Remove a hole for an M3x25 for the idler shaft.
		translate([0, crossPieceOffset-7, height/2])
		rotate([90, 0, 0])
		rotate([180, 0, 0])
		cylinder(r1=m3LooseRadius, r2=m3TightRadius, h=35+1, $fn=36);
	}

	// Add a piece to hold a microswitch.
	difference()
	{
		intersection()
		{
			translate([0, -10/2-5, 14/2+height])
			cube([20, 14, 14], true);
			
			translate([0, -23, height])
			scale([0.50, 1, 1])
			cylinder(r=20, h=14, $fn=72);
		}
	
		// Show where the microswitch will go.
		translate([0, -6.3/2-17, 10.6/2+height+6])
		%cube([20, 6.3, 10.6], true);

		// Carve out tapered holes for the microswitch's M2.5x12 screws.
		for (x = [1, -1])
			translate([x*9.5/2, -17-6.3, height+6+3])
			rotate([-90, 0, 0])
			cylinder(r1=(2.5+0.4)/2, r2=2.5/2, h=12+4, $fn=12);

		// Carve space for the vertical extrusion.
		translate([0, 0, extrusionWidth])
		rotate([0, 0, 45])
		cube([extrusionWidth+extraClearance,
			  extrusionWidth+extraClearance,
			  2*extrusionWidth],
			  true);
		
		// Remove a vertical groove to make the inside corner sharp.
		rotate([0, 0, 45+180])
		translate([extrusionWidth/2, extrusionWidth/2, -smidge/2])
		cylinder(r=grooveRadius, h=2*extrusionWidth, $fn=8);
	}
}


difference()
{
	upperFrame();
	
	// Make wiring tunnels for the microswitch.
	for (x = [1, -1])
	{
		rotate([25, 0, 0])
		translate([x*8, -7.5, -1])
		cylinder(r=4/2, h=height+15, $fn=12);
	}
}

// Draw the motor, offset by the dampener.
//translate([0, crossPieceOffset-30-dampenerOffset, (height-43)/2+43/2])
//rotate([0, 0, 90])
//%nema17Motor();

// Draw the idler bearing, which is composed of two 623ZZ flanged bearings with
// an M3 washer separating them.  Together they are 8.6mm in width.
translate([0, crossPieceOffset+13, height/2])
%rotate([90, 0, 0])
{
	h = 8.6;
	cylinder(r=12/2, h=1);
	cylinder(r=10/2, h=h);
	translate([0, 0, h-1])
	cylinder(r=12/2, h=1);
}

// Show where the carriage will go.
if (debug)
{
	translate([0, -22, 62])
	%cube([50, 10, 50], true);
}