summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad57
1 files changed, 54 insertions, 3 deletions
diff --git a/delta.jscad b/delta.jscad
index 24c1c7e..0e8fd62 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -36,24 +36,30 @@ var CONFIG = {
bolt: { d:5, l: 19, hd: 10 },
margin: 2.5,
nut: { d: 8.6 /* TODO: */, h: 3.5 },
shell: 4,
zscalefactor: 1.6,
foot: { ho: 2.5, hi: 5 }
},
duetholder: {
bolt: { d: 3, l: 10, head: { d: 5.33, h: 3 } },
margin: 3,
s: 2.5
},
+ bedholder: {
+ h: 15,
+ margin: 3,
+ nut: { w: 5.4, h: 2.5 },
+ bolt: { d: 3, l: 10, head: { d: 5.33, h: 3 } }
+ },
hotend: {
h: 62.4, // full assembly height
groove: { d:12, h:6 }, // grove diameter and height
ungroove: { d:16, above:3.7, below: 3+4 }
},
effector: {
h: 6,
o: 20, // offset to the rod mounts line
rods_apart: 40,
cone: { shell: 1, angle: Math.PI/6 },
rodend: {
joint_w: 7, // thickness of the joint
@@ -755,24 +761,67 @@ function glass() {
rv.properties.c_bed = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]);
rv.properties.P = new CSG.Connector([0,0,-CONFIG.foot.h-CONFIG.heatbed.h],[0,0,1],[1,0,0]);
rv.properties.vitamin = true;
return rv.setColor(CONFIG.color.glass);
}
function platform() {
var b = heatbed();
var g = glass();
g = g.connectTo(g.properties.c_bed,b.properties.c_glass,false,0);
return b.union(g);
}
+function bedholder(params) {
+ var h0 = CONFIG.foot.h+CONFIG.extrusion.w*2+CONFIG.base.gap;
+ var bolt_s = CONFIG.bedholder.bolt.l-CONFIG.extrusion.slotdepth+PRINT.play_tolerance*2;
+ var nuth=h0+CONFIG.bedholder.h*3/4;
+ var nutth = nuth+CONFIG.bedholder.nut.h/2+PRINT.slide_tolerance/2;
+ var rv = CSG.roundedCube({
+ corner1: [-CONFIG.extrusion.w/2,-CD.base.inner_inscription_r,h0],
+ corner2: [ CONFIG.extrusion.w/2,-CONFIG.heatbed.sr-3/2-CONFIG.bedholder.margin,h0+CONFIG.bedholder.h],
+ roundradius: CONFIG.bedholder.margin
+ });
+ rv = rv.subtract([
+ CSG.cylinder({ // base screw
+ start: [0,-CD.base.mid_inscription_r,h0-1],
+ end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1],
+ radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2
+ }),
+ CSG.cylinder({ // bed screw
+ start: [0,-CONFIG.heatbed.sr,h0-1],
+ end: [0,-CONFIG.heatbed.sr,h0+CONFIG.bedholder.h+1],
+ radius: CONFIG.bedholder.bolt.d/2+PRINT.screw_tolerance/2
+ }),
+ CSG.cube({ // nut pocket
+ center: [0,-CONFIG.heatbed.sr,nuth],
+ radius: [CONFIG.extrusion.w/2+1,(CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2,(CONFIG.bedholder.nut.h+PRINT.slide_tolerance)/2]
+ }),
+ CSG.cylinder({ // sink base screw
+ start: [0,-CD.base.mid_inscription_r,h0+bolt_s],
+ end: [0,-CD.base.mid_inscription_r,h0+CONFIG.bedholder.h+1],
+ radius: CONFIG.bedholder.bolt.head.d/2+PRINT.play_tolerance
+ })
+ ]);
+ rv = rv.union(CSG.cylinder({
+ start: [0,-CONFIG.heatbed.sr,nutth], end: [0,-CONFIG.heatbed.sr,nutth+PRINT.layer_height],
+ radius: (CONFIG.bedholder.nut.w+PRINT.slide_tolerance)/2+PRINT.extrusion_width
+ }));
+ rv = rv.intersect(CSG.cylinder({
+ start: [0,0,h0-1], end: [0,0,h0+CONFIG.bedholder.h+1],
+ radius: CONFIG.heatbed.r, resolution: 270
+ }));
+ rv.properties.P = new CSG.Connector([0,-CD.base.mid_inscription_r,h0],[0,0,1],[1,0,0]);
+ return rv.setColor(CONFIG.color.parts);
+}
+
var PARTS = {
wip: function(params) {
return duetholder(params);
return PARTS.alltogethernow(params);
return base_extrusions();
return foot();
return union(base_extrusions(),column_extrusions(),duet().translate([0,-20,0]));
},
alltogethernow: function(params) {
var cols = columns();
var sides = base_sides();
var feet = THREEWINDS.map(function(w,i) {
@@ -794,25 +843,26 @@ var PARTS = {
var rv = union(cols).union(sides.map(union)).union(feet).union([
d,dhsw,dhse,dhne,dhnw
]);
var p = P(platform());
rv = rv.union(p);
rv.properties.P = new CSG.Connector([0,0,0],[0,0,1],[1,0,0]);
return rv;
},
duetholder: function(params) {
return duetholder();
},
foot: foot,
- shoe: shoe
+ shoe: shoe,
+ bedholder: bedholder
};
function main(params) {
var part = params.part && PARTS[params.part];
if(!part) return refaxes();
var rv = P(part(params));
if(!params.print) rv = rv.union(refaxes());
return rv;
}
function _main(params) {
var e = EFFECTOR.effector();
@@ -862,35 +912,36 @@ function P(x) {
function getParameterDefinitions() {
return [{
name: 'part',
type: 'choice',
values: [
'platform',
'hinged',
'clamp',
'fanholder',
'duetholder',
'foot', 'shoe',
+ 'bedholder',
'alltogethernow',
'wip'
],
captions: [
'Effector platform',
'Hinged part',
'Clamp',
'Fan holder',
'Duet holder',
- 'Foot',
- 'Shoe',
+ 'Foot', 'Shoe',
+ 'Bed holder',
'All together now!',
'Work in progress'
],
caption: 'Part',
initial: 'wip'
},{
name: 'print',
type: 'checkbox',
caption: 'For print, no nonsense',
initial: false
}];
}