Skip to content

Instantly share code, notes, and snippets.

@nataliefreed
Created October 10, 2016 16:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nataliefreed/7837250bce29adbbd6fb7e245ac91161 to your computer and use it in GitHub Desktop.
Save nataliefreed/7837250bce29adbbd6fb7e245ac91161 to your computer and use it in GitHub Desktop.
// title : OpenJSCAD Example
// author : Natalie Freed
function getParameterDefinitions() {
return [{ name: 'heightOfBox1', type: 'float', initial: 6, caption: "Height of box 1:" }];
}
function main(params) {
var box1 = cube({size: [1,2,params.heightOfBox1]});
var box2 = cube({size: [4,3,2]});
var bothBoxes = union(box1, box2);
return bothBoxes;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment