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

copperPipeSpoolHolder.scad - github.com/haydnhuntley/kumu-3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2bba4895b6a0394c027e3e86b7ba599bb40159f4 (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
// This spool holder uses a piece of 1/2" copper pipe for the axle.
// It is designed to rest on the top of a Kossel-style Delta printer.
// It assumes that the top of the printer is made from 20x20mm aluminum
// extrusion.
// An M5x8 button socket head screw holds each side of the spool holder in
// place.
//
// 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

$fn = 360/4;

include <configuration.scad>;

// All measurements in mm.
debug              = false;
baseHeight         = 3.0;
minWallWidth       = 2.0;
size               = 2.5 * copperPipeRadius;
extraHeight        = 42;
keyWidth           = 6.5;
keyDepth           = 2.4;
keyLength          = 0.6 * size;
lCopperPipeRadius  = copperPipeRadius + 0.25;


module spoolHolder(angle)
{
	signAngle = sign(angle);
	// The following is centered in 2D at the origin.
	difference()
	{
		union()
		{
			intersection()
			{
				// Intersect a cone with a rectangle for the body.
				scale([1, 1.25, 1])
				cylinder(r1=size,
						 r2=(1+lCopperPipeRadius+baseHeight)/1.25,
						 h=size+extraHeight);
			
				translate([-extrusionWidth/2, -size, 0])
				cube([extrusionWidth, 2*size, size-minWallWidth+extraHeight]);
			}
			
			// Add two trapezoids as keys on the bottom.
			color("blue")
			for (y = [1, -1])
			translate([0, y*size/2, 0])
			{
				size = keyWidth * cos(45);
				intersection()
				{
					rotate([0, 45, 0])
					cube([size, keyLength, size], true);

					cube([keyWidth, keyLength, keyDepth], true);
				}
			}
		}

		// Remove the copper tube.
		color("red")
		translate([6, signAngle * 3, 0])
		rotate([0, 0, angle])
		translate([0, 0,
		          lCopperPipeRadius+m5ButtonHeadHeight+baseHeight+extraHeight])
		rotate([0, 90, 0])
		union()
		{
			// A cylinder, plus a square above it, for it to slide out of.
			cylinder(r=lCopperPipeRadius, h=extrusionWidth+2, center=true);
			
			translate([-2*lCopperPipeRadius, -lCopperPipeRadius,
					  -(extrusionWidth+2)/2])
			cube([2*lCopperPipeRadius, 2*lCopperPipeRadius, extrusionWidth+2]);
		}

		// Remove the screw hole.
		color("green")
		translate([0, 0, -smidge])
		scale([1.2, 1, 1])
		cylinder(r=m5LooseRadius+smidge, h=baseHeight+1);
 
		// Remove the screw head and access to it.
		color("green")
		hull()
		{
			translate([0, 0, baseHeight])
			scale([1.2, 1, 1])
			cylinder(r=m5ButtonHeadRadius, h=smidge);
			
			translate([-20, 0, baseHeight+20+extraHeight])
			scale([1.2, 1, 1])
			cylinder(r=m5ButtonHeadRadius, h=smidge);
		}
	}
}


if (debug)
{
	// Right side up for designing.
	spoolHolder(30);
}
else
{
	// Flip them on their sides and separate for printing.
	rotate([0, -90, 0])
	translate([extrusionWidth/2, 0, 0])
	spoolHolder(30);

	translate([0, 2*extrusionWidth+3, 0])
	rotate([0, -90, 0])
	translate([extrusionWidth/2, 0, 0])
	spoolHolder(-30);
}