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

vertex.scad - github.com/haydnhuntley/kumu-3d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 6a7cac0f87a5e664ff04328832f25856559d3210 (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
// This implements the basic shape for the vertex.
//
// DO NOT SLICE THIS.
//
// 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


include <configuration.scad>;
extraClearance         =   0.3;
grooveRadius           =   0.7;
crossPieceOffset       = -43;
layerHeight            = 0.2;


function fnX(d, offset=0) = d * sin(30) - offset;
function fnY(d, offset=0) = d * cos(30) - offset;


module vertex(height)
{
	// This draws the core shape used at the three corners with the given
	// height.

	difference()
	{
		hull()
		{
			// The circular section at the vertex.
			translate([0, -12, 0])
			scale([1, 1, 1])
			cylinder(r=30.8, h=height, $fn=360/2);

			// The triangular section for the arms.
			for (a = [1, -1])
				translate([a*20, -5, 0])
				rotate([0, 0, a*30])
				translate([-extrusionWidth/2, -3.5*extrusionWidth, 0])
				cube([extrusionWidth, 3.5*extrusionWidth, height]);
		}

		// Remove space for the vertical 2020 extrusion.
		rotate([0, 0, 45])
		translate([-(extrusionWidth+extraClearance)/2,
				   -(extrusionWidth+extraClearance)/2, -smidge/2])
		cube([extrusionWidth+extraClearance,
			  extrusionWidth+extraClearance, height+smidge]);

		// At the bottoms of the vertical 2020 extrusions, widen out the
		// square hole slightly to account for the first layer squishing
		// inward.
		for (i = [0:4])
		{
			size = extrusionWidth+extraClearance+(4-i)*nozzleWidth/3;
			rotate([0, 0, 45])
			translate([-size/2,
					   -size/2,
					   i*layerHeight-smidge/2])
			cube([size, size, layerHeight+smidge]);
		}
			  
		// Remove four vertical grooves to make the inside corners sharp.
		for (a = [1:4])
			rotate([0, 0, 45+a*90])
			translate([extrusionWidth/2, extrusionWidth/2, -smidge/2])
			cylinder(r=grooveRadius, h=height+smidge, $fn=8);
		
		// Remove space for the horizontal 2020 extrusions.
		for (a = [1, -1])
			translate([a*20, -5, 0])
			rotate([0, 0, a*30])
			translate([-(extrusionWidth+smidge)/2,
					   -2-2-4*extrusionWidth-smidge/2,
					   -smidge/2])
			cube([extrusionWidth+smidge,
				  2+4*extrusionWidth+smidge,
				  height+smidge]);
		
		// Remove interior space for the pulleys.
		hull()
			for (x = [1, -1])
				for (d = [23, 41.2])
					translate([x*fnX(d, 3.5), -fnY(d, -4), -smidge/2])
					cylinder(r=5, h=height+smidge, $fn=24);

		// Remove exterior space for the motor.
		hull()
			for (x = [1, -1])
				for (d = [57, 100])
					translate([x*fnX(d, 3.5), -fnY(d, -4), -smidge/2])
					cylinder(r=5, h=height+smidge, $fn=24);

		// Remove two vertical grooves to make the inside corners sharp.
		for (a = [1, -1])
			translate([a*20, -5, 0])
			rotate([0, 0, a*30])
			translate([-a*extrusionWidth/2, -2, -smidge/2])
			cylinder(r=grooveRadius, h=height+smidge, $fn=8);
	}

	// Add pads at the ends of the arms.
	color("green")
	for (x = [1, -1])
		translate([x*fnX(82, -2), -fnY(82), 0])
		cylinder(r=10, h=0.4, $fn=24);
}