layer_generator.jscad 607 B

12345678910111213141516171819
  1. // title: Layer_generator
  2. // written by: Joseph Lenox
  3. // Used for generating cubes oriented about the center
  4. // for making simple modifier meshes.
  5. var width = 100;
  6. var layer_height = 0.3;
  7. var z = 30;
  8. function main() {
  9. return cube(size=[width,width,layer_height], center=true).translate([0,0,z]);
  10. }
  11. function getParameterDefinitions() {
  12. return [
  13. { name: 'width', type: 'float', initial: 100, caption: "Width of the cube:" },
  14. { name: 'layer_height', type: 'float', initial: 0.3, caption: "Layer height used:" },
  15. { name: 'z', type: 'float', initial: 0, caption: "Z:" }
  16. ];
  17. }