File: layer_generator.jscad

package info (click to toggle)
slic3r 1.3.0%2Bdfsg1-5.1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 8,552 kB
  • sloc: cpp: 63,126; perl: 21,512; ansic: 6,312; sh: 591; xml: 201; makefile: 37; python: 11
file content (19 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// title: Layer_generator
// written by: Joseph Lenox
// Used for generating cubes oriented about the center 
// for making simple modifier meshes.

var width = 100;
var layer_height = 0.3;
var z = 30;
function main() {
    
    return cube(size=[width,width,layer_height], center=true).translate([0,0,z]);    
}
function getParameterDefinitions() {
  return [
      { name: 'width', type: 'float', initial: 100, caption: "Width of the cube:" },
      { name: 'layer_height', type: 'float', initial: 0.3, caption: "Layer height used:" },
      { name: 'z', type: 'float', initial: 0, caption: "Z:" }
  ];
}