From 740c971a9ebf663765e91eb84e2251d303ea4ceb Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 06 Jan 2016 23:46:44 +0000 Subject: part selection machinery --- diff --git a/delta.jscad b/delta.jscad index b3bb3d3..5d40e26 100644 --- a/delta.jscad +++ b/delta.jscad @@ -598,8 +598,18 @@ 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) { -- cgit v0.9.0.2