2011-09-01 19:06:28 +00:00
|
|
|
package Slic3r;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2011-11-23 13:22:21 +00:00
|
|
|
our $VERSION = "0.5.1beta";
|
2011-11-13 21:57:58 +00:00
|
|
|
|
2011-09-05 11:33:09 +00:00
|
|
|
our $debug = 0;
|
|
|
|
sub debugf {
|
|
|
|
printf @_ if $debug;
|
|
|
|
}
|
|
|
|
|
2011-10-03 09:55:32 +00:00
|
|
|
use Slic3r::Config;
|
2011-10-15 09:36:05 +00:00
|
|
|
use Slic3r::ExPolygon;
|
2011-09-26 09:42:08 +00:00
|
|
|
use Slic3r::Extruder;
|
2011-09-25 21:15:45 +00:00
|
|
|
use Slic3r::ExtrusionLoop;
|
2011-09-04 10:04:01 +00:00
|
|
|
use Slic3r::ExtrusionPath;
|
2011-10-20 16:11:59 +00:00
|
|
|
use Slic3r::ExtrusionPath::Arc;
|
2011-09-26 08:52:58 +00:00
|
|
|
use Slic3r::ExtrusionPath::Collection;
|
2011-09-05 10:21:27 +00:00
|
|
|
use Slic3r::Fill;
|
2011-09-18 17:28:12 +00:00
|
|
|
use Slic3r::Geometry;
|
2011-09-01 19:06:28 +00:00
|
|
|
use Slic3r::Layer;
|
|
|
|
use Slic3r::Line;
|
2011-10-04 20:27:45 +00:00
|
|
|
use Slic3r::Line::FacetEdge;
|
2011-09-02 19:10:20 +00:00
|
|
|
use Slic3r::Perimeter;
|
2011-09-01 19:06:28 +00:00
|
|
|
use Slic3r::Point;
|
2011-10-15 09:36:05 +00:00
|
|
|
use Slic3r::Polygon;
|
2011-09-01 19:06:28 +00:00
|
|
|
use Slic3r::Polyline;
|
|
|
|
use Slic3r::Polyline::Closed;
|
|
|
|
use Slic3r::Print;
|
2011-10-03 09:55:32 +00:00
|
|
|
use Slic3r::Skein;
|
2011-09-01 19:06:28 +00:00
|
|
|
use Slic3r::STL;
|
|
|
|
use Slic3r::Surface;
|
|
|
|
|
2011-09-06 09:10:12 +00:00
|
|
|
# printer options
|
2011-10-05 19:25:17 +00:00
|
|
|
our $nozzle_diameter = 0.5;
|
2011-09-06 09:10:12 +00:00
|
|
|
our $print_center = [100,100]; # object will be centered around this point
|
|
|
|
our $use_relative_e_distances = 0;
|
2011-11-13 17:26:31 +00:00
|
|
|
our $no_extrusion = 0;
|
2011-10-20 16:11:59 +00:00
|
|
|
our $z_offset = 0;
|
|
|
|
our $gcode_arcs = 0;
|
2011-11-14 11:15:32 +00:00
|
|
|
our $g0 = 0;
|
2011-09-05 11:33:09 +00:00
|
|
|
|
2011-09-06 09:10:12 +00:00
|
|
|
# filament options
|
|
|
|
our $filament_diameter = 3; # mm
|
2011-10-05 19:25:17 +00:00
|
|
|
our $filament_packing_density = 1;
|
2011-10-14 14:24:55 +00:00
|
|
|
our $temperature = 200;
|
2011-09-06 09:10:12 +00:00
|
|
|
|
|
|
|
# speed options
|
|
|
|
our $print_feed_rate = 60; # mm/sec
|
2011-09-26 08:52:58 +00:00
|
|
|
our $travel_feed_rate = 130; # mm/sec
|
2011-10-02 07:57:37 +00:00
|
|
|
our $perimeter_feed_rate = 30; # mm/sec
|
2011-10-01 16:10:33 +00:00
|
|
|
our $bottom_layer_speed_ratio = 0.3;
|
2011-09-06 09:10:12 +00:00
|
|
|
|
|
|
|
# accuracy options
|
2011-10-06 15:11:59 +00:00
|
|
|
our $resolution = 0.00000001;
|
|
|
|
our $layer_height = 0.4;
|
2011-11-13 18:08:19 +00:00
|
|
|
our $first_layer_height_ratio = 1;
|
2011-10-18 13:57:53 +00:00
|
|
|
our $infill_every_layers = 1;
|
2011-10-06 15:11:59 +00:00
|
|
|
our $thickness_ratio = 1;
|
2011-09-06 09:10:12 +00:00
|
|
|
our $flow_width;
|
|
|
|
|
|
|
|
# print options
|
2011-11-17 09:38:23 +00:00
|
|
|
our $perimeters = 3;
|
2011-09-25 20:11:56 +00:00
|
|
|
our $solid_layers = 3;
|
2011-11-13 18:25:15 +00:00
|
|
|
our $perimeter_infill_overlap_ratio = 0.15; # factor for flow width
|
2011-11-13 17:14:02 +00:00
|
|
|
our $fill_pattern = 'rectilinear';
|
|
|
|
our $solid_fill_pattern = 'rectilinear';
|
2011-09-05 16:52:09 +00:00
|
|
|
our $fill_density = 0.4; # 1 = 100%
|
2011-09-26 13:51:22 +00:00
|
|
|
our $fill_angle = 0;
|
2011-10-14 14:24:55 +00:00
|
|
|
our $start_gcode = "G28 ; home all axes";
|
|
|
|
our $end_gcode = <<"END";
|
|
|
|
M104 S0 ; turn off temperature
|
|
|
|
G28 X0 ; home X axis
|
|
|
|
M84 ; disable motors
|
|
|
|
END
|
2011-09-03 18:47:38 +00:00
|
|
|
|
2011-09-06 09:10:12 +00:00
|
|
|
# retraction options
|
2011-10-01 16:10:33 +00:00
|
|
|
our $retract_length = 1; # mm
|
2011-09-05 16:52:09 +00:00
|
|
|
our $retract_restart_extra = 0; # mm
|
|
|
|
our $retract_speed = 40; # mm/sec
|
2011-10-06 13:24:21 +00:00
|
|
|
our $retract_before_travel = 2; # mm
|
2011-11-07 14:58:47 +00:00
|
|
|
our $retract_lift = 0; # mm
|
2011-09-05 16:52:09 +00:00
|
|
|
|
2011-09-06 09:10:12 +00:00
|
|
|
# skirt options
|
2011-09-25 20:11:56 +00:00
|
|
|
our $skirts = 1;
|
2011-09-05 18:00:59 +00:00
|
|
|
our $skirt_distance = 6; # mm
|
2011-11-13 17:41:12 +00:00
|
|
|
our $skirt_height = 1; # layers
|
2011-09-05 18:00:59 +00:00
|
|
|
|
2011-09-26 10:07:29 +00:00
|
|
|
# transform options
|
|
|
|
our $scale = 1;
|
2011-09-26 14:07:12 +00:00
|
|
|
our $rotate = 0;
|
2011-11-07 14:49:07 +00:00
|
|
|
our $duplicate_x = 1;
|
|
|
|
our $duplicate_y = 1;
|
|
|
|
our $duplicate_distance = 6; # mm
|
2011-09-26 10:07:29 +00:00
|
|
|
|
2011-09-01 19:06:28 +00:00
|
|
|
1;
|