author | Michael Krelin <hacker@klever.net> | 2016-01-06 23:46:44 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2016-01-06 23:46:44 (UTC) |
commit | 740c971a9ebf663765e91eb84e2251d303ea4ceb (patch) (unidiff) | |
tree | 8ff1127eaaf754b37d74a13a19fc8f7f7090f301 | |
parent | 4cb92354224641376d311adc7589ebb4bdc5639d (diff) | |
download | redelta-740c971a9ebf663765e91eb84e2251d303ea4ceb.zip redelta-740c971a9ebf663765e91eb84e2251d303ea4ceb.tar.gz redelta-740c971a9ebf663765e91eb84e2251d303ea4ceb.tar.bz2 |
part selection machinery
-rw-r--r-- | delta.jscad | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/delta.jscad b/delta.jscad index b3bb3d3..5d40e26 100644 --- a/delta.jscad +++ b/delta.jscad | |||
@@ -597,10 +597,20 @@ function refaxes(o) { | |||
597 | function P(x) { | 597 | function P(x) { |
598 | return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0); | 598 | return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0); |
599 | } | 599 | } |
600 | 600 | ||
601 | var PARTS = { | ||
602 | wip: function(params) { | ||
603 | return union(base_extrusions(),column_extrusions(),duet()); | ||
604 | } | ||
605 | }; | ||
606 | |||
601 | function main(params) { | 607 | function main(params) { |
602 | return refaxes().union(P(base_extrusions())); | 608 | var part = params.part && PARTS[params.part]; |
609 | if(!part) return refaxes(); | ||
610 | var rv = P(part(params)); | ||
611 | if(true) rv = rv.union(refaxes()); | ||
612 | return rv; | ||
603 | } | 613 | } |
604 | 614 | ||
605 | function _main(params) { | 615 | function _main(params) { |
606 | var e = EFFECTOR.effector(); | 616 | var e = EFFECTOR.effector(); |