-rw-r--r-- | delta.jscad | 23 |
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', |