summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-02-27 14:20:05 (UTC)
committer Michael Krelin <hacker@klever.net>2016-02-27 14:20:05 (UTC)
commitb0cb21f0d722dd4ae845ba3341c6a3066afa0409 (patch) (side-by-side diff)
treed40043c606f144d9e5fab6c284348951de3ab754
parentf39bbe4d0a4b3b556f93aecf5fee37974817dc12 (diff)
downloadredelta-b0cb21f0d722dd4ae845ba3341c6a3066afa0409.zip
redelta-b0cb21f0d722dd4ae845ba3341c6a3066afa0409.tar.gz
redelta-b0cb21f0d722dd4ae845ba3341c6a3066afa0409.tar.bz2
made use of new U-capabilities
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad23
1 files changed, 4 insertions, 19 deletions
diff --git a/delta.jscad b/delta.jscad
index 35a777c..45e8765 100644
--- a/delta.jscad
+++ b/delta.jscad
@@ -869,13 +869,13 @@ var PARTS = {
var dhse = dh.connectTo(dh.properties.duet.c_se,d.properties.holes.c_se,false,0);
var dhne = dh.connectTo(dh.properties.duet.c_ne,d.properties.holes.c_ne,false,0);
var dhnw = dh.connectTo(dh.properties.duet.c_nw,d.properties.holes.c_nw,false,0);
var rv = union(cols).union(sides.map(union)).union(feet).union([
d,dhsw,dhse,dhne,dhnw
]);
- var p = P(platform());
+ var p = U.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();
@@ -884,15 +884,15 @@ var PARTS = {
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());
+ if(!part) return U.axes();
+ var rv = U.P(part(params));
+ if(!params.print) rv = rv.union(U.axes());
return rv;
}
function _main(params) {
var e = EFFECTOR.effector();
var hs = E3DV6.heatsink();
@@ -921,27 +921,12 @@ function _main(params) {
///hd,
hdhd[0], hdhd[1],
ms);
return rv;
}
-function refaxes(o) {
- if(!o) o = {};
- var l = o.l||20, g = o.g||0.7;
- return union([
- CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]),
- CSG.roundedCylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]),
- CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g])
- ]);
-}
-
-function P(x) {
- return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0);
-}
-
-
function getParameterDefinitions() {
return [{
name: 'part',
type: 'choice',
values: [
'platform',