author | Michael Krelin <hacker@klever.net> | 2016-02-27 14:20:05 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-02-27 14:20:05 (UTC) |
commit | b0cb21f0d722dd4ae845ba3341c6a3066afa0409 (patch) (side-by-side diff) | |
tree | d40043c606f144d9e5fab6c284348951de3ab754 | |
parent | f39bbe4d0a4b3b556f93aecf5fee37974817dc12 (diff) | |
download | redelta-b0cb21f0d722dd4ae845ba3341c6a3066afa0409.zip redelta-b0cb21f0d722dd4ae845ba3341c6a3066afa0409.tar.gz redelta-b0cb21f0d722dd4ae845ba3341c6a3066afa0409.tar.bz2 |
made use of new U-capabilities
-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 @@ -874,3 +874,3 @@ var PARTS = { ]); - var p = P(platform()); + var p = U.P(platform()); rv = rv.union(p); @@ -889,5 +889,5 @@ 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; @@ -926,17 +926,2 @@ function _main(params) { -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() { |