summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2016-01-06 23:46:44 (UTC)
committer Michael Krelin <hacker@klever.net>2016-01-06 23:46:44 (UTC)
commit740c971a9ebf663765e91eb84e2251d303ea4ceb (patch) (side-by-side diff)
tree8ff1127eaaf754b37d74a13a19fc8f7f7090f301
parent4cb92354224641376d311adc7589ebb4bdc5639d (diff)
downloadredelta-740c971a9ebf663765e91eb84e2251d303ea4ceb.zip
redelta-740c971a9ebf663765e91eb84e2251d303ea4ceb.tar.gz
redelta-740c971a9ebf663765e91eb84e2251d303ea4ceb.tar.bz2
part selection machinery
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--delta.jscad12
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
@@ -595,14 +595,24 @@ function refaxes(o) {
}
function P(x) {
return x.connectTo(x.properties.P,new CSG.Connector([0,0,0],[0,0,1],[1,0,0]), false, 0);
}
+var PARTS = {
+ wip: function(params) {
+ return union(base_extrusions(),column_extrusions(),duet());
+ }
+};
+
function main(params) {
- return refaxes().union(P(base_extrusions()));
+ var part = params.part && PARTS[params.part];
+ if(!part) return refaxes();
+ var rv = P(part(params));
+ if(true) rv = rv.union(refaxes());
+ return rv;
}
function _main(params) {
var e = EFFECTOR.effector();
var hs = E3DV6.heatsink();
hs = hs.connectTo(hs.properties.grove_connector,e.properties.grove_connector,false,0);