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) (unidiff)
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
@@ -874,3 +874,3 @@ var PARTS = {
874 ]); 874 ]);
875 var p = P(platform()); 875 var p = U.P(platform());
876 rv = rv.union(p); 876 rv = rv.union(p);
@@ -889,5 +889,5 @@ function main(params) {
889 var part = params.part && PARTS[params.part]; 889 var part = params.part && PARTS[params.part];
890 if(!part) return refaxes(); 890 if(!part) return U.axes();
891 var rv = P(part(params)); 891 var rv = U.P(part(params));
892 if(!params.print) rv = rv.union(refaxes()); 892 if(!params.print) rv = rv.union(U.axes());
893 return rv; 893 return rv;
@@ -926,17 +926,2 @@ function _main(params) {
926 926
927function refaxes(o) {
928 if(!o) o = {};
929 var l = o.l||20, g = o.g||0.7;
930 return union([
931 CSG.roundedCylinder({start:[0,0,0],end:[l,0,0]}).setColor([1,0,0,g]),
932 CSG.roundedCylinder({start:[0,0,0],end:[0,l,0]}).setColor([0,1,0,g]),
933 CSG.roundedCylinder({start:[0,0,0],end:[0,0,l]}).setColor([0,0,1,g])
934 ]);
935}
936
937function P(x) {
938 return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0);
939}
940
941
942function getParameterDefinitions() { 927function getParameterDefinitions() {