summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad20
1 files changed, 18 insertions, 2 deletions
diff --git a/delta.jscad b/delta.jscad
index ad19f88..eb538d2 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -28,25 +28,26 @@ var CONFIG = {
28 }, 28 },
29 duet: { 29 duet: {
30 pcb_size: { x: 124, y: 100, z: 1 }, 30 pcb_size: { x: 124, y: 100, z: 1 },
31 hole_spacing: { x: 115, y: 92 }, 31 hole_spacing: { x: 115, y: 92 },
32 h: 30 32 h: 30
33 }, 33 },
34 foot: { 34 foot: {
35 d: 20*Math.sqrt(2), h: 30, 35 d: 20*Math.sqrt(2), h: 30,
36 bolt: { d:5, l: 19, hd: 10 }, 36 bolt: { d:5, l: 19, hd: 10 },
37 margin: 2.5, 37 margin: 2.5,
38 nut: { d: 8.6 /* TODO: */, h: 3.5 }, 38 nut: { d: 8.6 /* TODO: */, h: 3.5 },
39 shell: 4, 39 shell: 4,
40 zscalefactor: 1.6 40 zscalefactor: 1.6,
41 foot: { ho: 2.5, hi: 5 }
41 }, 42 },
42 hotend: { 43 hotend: {
43 h: 62.4, // full assembly height 44 h: 62.4, // full assembly height
44 groove: { d:12, h:6 }, // grove diameter and height 45 groove: { d:12, h:6 }, // grove diameter and height
45 ungroove: { d:16, above:3.7, below: 3+4 } 46 ungroove: { d:16, above:3.7, below: 3+4 }
46 }, 47 },
47 effector: { 48 effector: {
48 h: 6, 49 h: 6,
49 o: 20,// offset to the rod mounts line 50 o: 20,// offset to the rod mounts line
50 rods_apart: 40, 51 rods_apart: 40,
51 cone: { shell: 1, angle: Math.PI/6 }, 52 cone: { shell: 1, angle: Math.PI/6 },
52 rodend: { 53 rodend: {
@@ -82,25 +83,26 @@ var CONFIG = {
82 }, 83 },
83 fanholder: { 84 fanholder: {
84 r: 30, 85 r: 30,
85 screw: { d: 3, m: 2.5/*margin*/ }, 86 screw: { d: 3, m: 2.5/*margin*/ },
86 w: 3 87 w: 3
87 } 88 }
88 }, 89 },
89 nut: { h: 2.3, w: 5.5 }, 90 nut: { h: 2.3, w: 5.5 },
90 color: { 91 color: {
91 extrusion: [0.8, 0.8, 0.8, 0.8], 92 extrusion: [0.8, 0.8, 0.8, 0.8],
92 pcb: [ 0, 0.3, 0.2, 0.8 ], 93 pcb: [ 0, 0.3, 0.2, 0.8 ],
93 bulk: [ .9, .9, .9, .2 ], 94 bulk: [ .9, .9, .9, .2 ],
94 parts: [ 0, 0.8, 0, 0.9 ] 95 parts: [ 0, 0.8, 0, 0.9 ],
96 softparts: [ 0, 0, 0.8, 0.9 ]
95 } 97 }
96}; 98};
97 99
98var CD = { 100var CD = {
99 base: (function(){ 101 base: (function(){
100 var rv = {}; 102 var rv = {};
101 rv.circumscription_r = 103 rv.circumscription_r =
102 CONFIG.base.sl/2/Math.cos(Math.PI/6); 104 CONFIG.base.sl/2/Math.cos(Math.PI/6);
103 rv.outer_inscription_r = 105 rv.outer_inscription_r =
104 Math.sqrt(Math.pow(rv.circumscription_r,2)- 106 Math.sqrt(Math.pow(rv.circumscription_r,2)-
105 Math.pow(CONFIG.base.sl/2,2)); 107 Math.pow(CONFIG.base.sl/2,2));
106 rv.mid_inscription_r = 108 rv.mid_inscription_r =
@@ -627,24 +629,38 @@ function foot() {
627 start: [0,0,-1], end: [0,0,F.h-F.nut.h-PRINT.play_tolerance-F.shell], 629 start: [0,0,-1], end: [0,0,F.h-F.nut.h-PRINT.play_tolerance-F.shell],
628 radius: F.bolt.hd/2+PRINT.play_tolerance 630 radius: F.bolt.hd/2+PRINT.play_tolerance
629 }) 631 })
630 ]).union(CSG.cylinder({ // bridging patch 632 ]).union(CSG.cylinder({ // bridging patch
631 start: [0,0,F.h-F.nut.h-PRINT.play_tolerance-PRINT.layer_height], 633 start: [0,0,F.h-F.nut.h-PRINT.play_tolerance-PRINT.layer_height],
632 end: [0,0,F.h-F.nut.h-PRINT.play_tolerance], 634 end: [0,0,F.h-F.nut.h-PRINT.play_tolerance],
633 radius: F.nut.d/2 635 radius: F.nut.d/2
634 })); 636 }));
635 rv.properties.c_column = new CSG.Connector([0,0,F.h],[0,0,1],[1,0,0]); 637 rv.properties.c_column = new CSG.Connector([0,0,F.h],[0,0,1],[1,0,0]);
636 rv.properties.P = new CSG.Connector([0,0,F.h],[0,0,-1],[1,0,0]); 638 rv.properties.P = new CSG.Connector([0,0,F.h],[0,0,-1],[1,0,0]);
637 return rv.setColor(CONFIG.color.parts); 639 return rv.setColor(CONFIG.color.parts);
638} 640}
641function foot_foot() {
642 // TODO: connect in the altogethernow?
643 var F = CONFIG.foot;
644 var rv = CSG.cylinder({
645 start: [0,0,0], end: [0,0,F.foot.ho],
646 radius: F.bolt.hd/2+F.margin
647 }).union(CSG.cylinder({
648 start: [0,0,0], end: [0,0,F.foot.ho+F.foot.hi],
649 radius: F.bolt.hd/2+PRINT.play_tolerance-PRINT.fit_tolerance
650 }));
651 rv.properties.c_foot = new CSG.Connector([0,0,F.foot.ho],[0,0,1],[1,0,0]);
652 rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]);
653 return rv.setColor(CONFIG.color.softparts);
654}
639 655
640function refaxes(o) { 656function refaxes(o) {
641 if(!o) o = {}; 657 if(!o) o = {};
642 var l = o.l||20, g = o.g||0.7; 658 var l = o.l||20, g = o.g||0.7;
643 return union([ 659 return union([
644 CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]), 660 CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]),
645 CSG.roundedCylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]), 661 CSG.roundedCylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]),
646 CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g]) 662 CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g])
647 ]); 663 ]);
648} 664}
649 665
650function P(x) { 666function P(x) {