File: solid_layers.scad

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 (24 lines) | stat: -rw-r--r-- 1,067 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
20
21
22
23
24
// Used to generate a modifier mesh to do something every few layers. 
// Load into OpenSCAD, tweak the variables below, export as STL and load as 
// a modifier mesh. Then change settings for the modifier mesh.

// Written by Joseph Lenox; in public domain.

layer_height = 0.3; // set to layer height in slic3r for "best" results.
number_of_solid_layers = 2;
N = 4; // N > number_of_solid_layers or else the whole thing will be solid
model_height = 300.0;
model_width = 300.0; // these two should be at least as big as the model 
model_depth = 300.0; // but bigger isn't a problem
initial_offset=0; // don't generate below this

position_on_bed=[0,0,0]; // in case you need to move it around

// don't touch below unless you know what you are doing.
simple_layers = round(model_height/layer_height);
translate(position_on_bed)
  for (i = [initial_offset:N:simple_layers]) {
    translate([0,0,i*layer_height])
      translate([0,0,(layer_height*number_of_solid_layers)/2])
      cube([model_width,model_depth,layer_height*number_of_solid_layers], center=true);
  }