summaryrefslogtreecommitdiffabout
path: root/delta.jscad
authorMichael Krelin <hacker@klever.net>2016-01-06 23:45:19 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 23:45:19 (UTC)
commitf669f3d2881597cc0d86e4b55332b541883c8205 (patch) (unidiff)
tree7728a7362ed323703267620ec680a01a99ca3879 /delta.jscad
parentd9e0cf63db5c64802dfbba0dc76506b9b0d5127a (diff)
downloadredelta-f669f3d2881597cc0d86e4b55332b541883c8205.zip
redelta-f669f3d2881597cc0d86e4b55332b541883c8205.tar.gz
redelta-f669f3d2881597cc0d86e4b55332b541883c8205.tar.bz2
more colors
Diffstat (limited to 'delta.jscad') (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad4
1 files changed, 3 insertions, 1 deletions
diff --git a/delta.jscad b/delta.jscad
index f06870e..ef0d4ec 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -35,97 +35,99 @@ var CONFIG = {
35 h: 62.4, // full assembly height 35 h: 62.4, // full assembly height
36 groove: { d:12, h:6 }, // grove diameter and height 36 groove: { d:12, h:6 }, // grove diameter and height
37 ungroove: { d:16, above:3.7, below: 3+4 } 37 ungroove: { d:16, above:3.7, below: 3+4 }
38 }, 38 },
39 effector: { 39 effector: {
40 h: 6, 40 h: 6,
41 o: 20,// offset to the rod mounts line 41 o: 20,// offset to the rod mounts line
42 rods_apart: 40, 42 rods_apart: 40,
43 cone: { shell: 1, angle: Math.PI/6 }, 43 cone: { shell: 1, angle: Math.PI/6 },
44 rodend: { 44 rodend: {
45 joint_w: 7,// thickness of the joint 45 joint_w: 7,// thickness of the joint
46 screw_l: 20-1, // 20 with the head 46 screw_l: 20-1, // 20 with the head
47 screw_d: 3 47 screw_d: 3
48 }, 48 },
49 hotend: { margin: 2 }, 49 hotend: { margin: 2 },
50 hinge: { 50 hinge: {
51 d: 3, w: 5, margin: 2.5, 51 d: 3, w: 5, margin: 2.5,
52 h: 1+(6+3.7)/2, // elevation + grove + top 52 h: 1+(6+3.7)/2, // elevation + grove + top
53 e: 1 // elevation 53 e: 1 // elevation
54 }, 54 },
55 clamp: { 55 clamp: {
56 shell: 4.6, 56 shell: 4.6,
57 d: 3, 57 d: 3,
58 margin: 2.5, 58 margin: 2.5,
59 split: 0.6 59 split: 0.6
60 }, 60 },
61 mswitch: { 61 mswitch: {
62 size: [ 19.8, 6, 10 ], 62 size: [ 19.8, 6, 10 ],
63 screw: { 63 screw: {
64 d: 2, h: 10/2-2, 64 d: 2, h: 10/2-2,
65 s: 1.3, // screw shell 65 s: 1.3, // screw shell
66 o: [-9.5/2,9.5/2].map(function(x) { 66 o: [-9.5/2,9.5/2].map(function(x) {
67 return -19.8/2+x; 67 return -19.8/2+x;
68 }) 68 })
69 }, 69 },
70 switch_x: 2.5 70 switch_x: 2.5
71 }, 71 },
72 guide: { 72 guide: {
73 width: 3, height: 5+1, length: 6 73 width: 3, height: 5+1, length: 6
74 }, 74 },
75 fanholder: { 75 fanholder: {
76 r: 30, 76 r: 30,
77 screw: { d: 3, m: 2.5/*margin*/ }, 77 screw: { d: 3, m: 2.5/*margin*/ },
78 w: 3 78 w: 3
79 } 79 }
80 }, 80 },
81 nut: { h: 2.3, w: 5.5 }, 81 nut: { h: 2.3, w: 5.5 },
82 color: { 82 color: {
83 extrusion: [0.8, 0.8, 0.8, 0.8] 83 extrusion: [0.8, 0.8, 0.8, 0.8],
84 pcb: [ 0, 0.3, 0.2, 0.8 ],
85 bulk: [ .9, .9, .9, .2 ]
84 } 86 }
85}; 87};
86 88
87var CD = { 89var CD = {
88 base: (function(){ 90 base: (function(){
89 var rv = {}; 91 var rv = {};
90 rv.circumscription_r = 92 rv.circumscription_r =
91 CONFIG.base.sl/2/Math.cos(Math.PI/6); 93 CONFIG.base.sl/2/Math.cos(Math.PI/6);
92 rv.outer_inscription_r = 94 rv.outer_inscription_r =
93 Math.sqrt(Math.pow(rv.circumscription_r,2)- 95 Math.sqrt(Math.pow(rv.circumscription_r,2)-
94 Math.pow(CONFIG.base.sl/2,2)); 96 Math.pow(CONFIG.base.sl/2,2));
95 rv.mid_inscription_r = 97 rv.mid_inscription_r =
96 rv.outer_inscription_r-CONFIG.extrusion.w/2; 98 rv.outer_inscription_r-CONFIG.extrusion.w/2;
97 rv.inner_inscription_r = 99 rv.inner_inscription_r =
98 rv.outer_inscription_r-CONFIG.extrusion.w/2; 100 rv.outer_inscription_r-CONFIG.extrusion.w/2;
99 // TODO: properly calculate 101 // TODO: properly calculate
100 rv.column_r = rv.circumscription_r - 48.29; 102 rv.column_r = rv.circumscription_r - 48.29;
101 return rv; 103 return rv;
102 })() 104 })()
103}; 105};
104 106
105var U = { 107var U = {
106 hypotenuse: function(a,b) { 108 hypotenuse: function(a,b) {
107 return Math.sqrt(Math.pow(a,2)+Math.pow(b,2)); 109 return Math.sqrt(Math.pow(a,2)+Math.pow(b,2));
108 }, 110 },
109 peek: function(x,m) { 111 peek: function(x,m) {
110 console.log(x,m); 112 console.log(x,m);
111 return x; 113 return x;
112 } 114 }
113}; 115};
114 116
115/* {h:,w:} */ 117/* {h:,w:} */
116function nut(o) { 118function nut(o) {
117 var rv = CSG.cylinder({ 119 var rv = CSG.cylinder({
118 start:[0,0,0],end:[0,0,o.h], 120 start:[0,0,0],end:[0,0,o.h],
119 radius: o.w/2/Math.cos(Math.PI/6), 121 radius: o.w/2/Math.cos(Math.PI/6),
120 resolution: 6 122 resolution: 6
121 }); 123 });
122 rv.properties.axis_connector = new CSG.Connector([0,0,0],[0,0,1],[0,1,0]); 124 rv.properties.axis_connector = new CSG.Connector([0,0,0],[0,0,1],[0,1,0]);
123 return rv; 125 return rv;
124} 126}
125 127
126var E3DV6 = { 128var E3DV6 = {
127 dimensions: { 129 dimensions: {
128 big_d: 22.3, 130 big_d: 22.3,
129 131
130 }, 132 },
131 heatsink: function() { 133 heatsink: function() {