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) (show 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
@@ -872,7 +872,7 @@ var PARTS = {
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;
@@ -887,9 +887,9 @@ var PARTS = {
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;
}
@@ -924,21 +924,6 @@ function _main(params) {
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',