2011-09-01 23:06:28 +04:00
|
|
|
package Slic3r;
|
|
|
|
|
|
|
|
use strict;
|
|
|
|
use warnings;
|
|
|
|
|
2011-12-22 21:56:11 +04:00
|
|
|
our $VERSION = "0.5.7";
|
2011-11-14 01:57:58 +04:00
|
|
|
|
2011-09-05 15:33:09 +04:00
|
|
|
our $debug = 0;
|
|
|
|
sub debugf {
|
|
|
|
printf @_ if $debug;
|
|
|
|
}
|
|
|
|
|
2011-10-03 13:55:32 +04:00
|
|
|
use Slic3r::Config;
|
2011-10-15 13:36:05 +04:00
|
|
|
use Slic3r::ExPolygon;
|
2011-09-26 13:42:08 +04:00
|
|
|
use Slic3r::Extruder;
|
2011-09-26 01:15:45 +04:00
|
|
|
use Slic3r::ExtrusionLoop;
|
2011-09-04 14:04:01 +04:00
|
|
|
use Slic3r::ExtrusionPath;
|
2011-10-20 20:11:59 +04:00
|
|
|
use Slic3r::ExtrusionPath::Arc;
|
2011-09-26 12:52:58 +04:00
|
|
|
use Slic3r::ExtrusionPath::Collection;
|
2011-09-05 14:21:27 +04:00
|
|
|
use Slic3r::Fill;
|
2011-12-07 22:33:59 +04:00
|
|
|
use Slic3r::Geometry qw(PI);
|
2011-09-01 23:06:28 +04:00
|
|
|
use Slic3r::Layer;
|
|
|
|
use Slic3r::Line;
|
2011-09-02 23:10:20 +04:00
|
|
|
use Slic3r::Perimeter;
|
2011-09-01 23:06:28 +04:00
|
|
|
use Slic3r::Point;
|
2011-10-15 13:36:05 +04:00
|
|
|
use Slic3r::Polygon;
|
2011-09-01 23:06:28 +04:00
|
|
|
use Slic3r::Polyline;
|
|
|
|
use Slic3r::Polyline::Closed;
|
|
|
|
use Slic3r::Print;
|
2011-10-03 13:55:32 +04:00
|
|
|
use Slic3r::Skein;
|
2011-09-01 23:06:28 +04:00
|
|
|
use Slic3r::STL;
|
|
|
|
use Slic3r::Surface;
|
2011-11-27 14:40:03 +04:00
|
|
|
use Slic3r::TriangleMesh;
|
|
|
|
use Slic3r::TriangleMesh::IntersectionLine;
|
2011-09-01 23:06:28 +04:00
|
|
|
|
2011-09-06 13:10:12 +04:00
|
|
|
# printer options
|
2011-10-05 23:25:17 +04:00
|
|
|
our $nozzle_diameter = 0.5;
|
2011-09-06 13:10:12 +04:00
|
|
|
our $print_center = [100,100]; # object will be centered around this point
|
|
|
|
our $use_relative_e_distances = 0;
|
2011-12-02 01:34:21 +04:00
|
|
|
our $extrusion_axis = 'E';
|
2011-10-20 20:11:59 +04:00
|
|
|
our $z_offset = 0;
|
|
|
|
our $gcode_arcs = 0;
|
2011-11-14 15:15:32 +04:00
|
|
|
our $g0 = 0;
|
2011-12-14 22:49:21 +04:00
|
|
|
our $gcode_comments = 0;
|
2011-09-05 15:33:09 +04:00
|
|
|
|
2011-09-06 13:10:12 +04:00
|
|
|
# filament options
|
|
|
|
our $filament_diameter = 3; # mm
|
2011-11-25 14:15:20 +04:00
|
|
|
our $extrusion_multiplier = 1;
|
2011-10-14 18:24:55 +04:00
|
|
|
our $temperature = 200;
|
2011-09-06 13:10:12 +04:00
|
|
|
|
|
|
|
# speed options
|
2011-12-02 01:03:13 +04:00
|
|
|
our $travel_speed = 130; # mm/sec
|
|
|
|
our $perimeter_speed = 30; # mm/sec
|
2011-12-04 23:50:03 +04:00
|
|
|
our $small_perimeter_speed = 30; # mm/sec
|
2011-12-02 01:03:13 +04:00
|
|
|
our $infill_speed = 60; # mm/sec
|
|
|
|
our $solid_infill_speed = 60; # mm/sec
|
|
|
|
our $bridge_speed = 60; # mm/sec
|
2011-10-01 20:10:33 +04:00
|
|
|
our $bottom_layer_speed_ratio = 0.3;
|
2011-09-06 13:10:12 +04:00
|
|
|
|
|
|
|
# accuracy options
|
2011-10-06 19:11:59 +04:00
|
|
|
our $resolution = 0.00000001;
|
2011-12-04 23:50:03 +04:00
|
|
|
our $small_perimeter_area = (5 / $resolution) ** 2;
|
2011-10-06 19:11:59 +04:00
|
|
|
our $layer_height = 0.4;
|
2011-11-13 22:08:19 +04:00
|
|
|
our $first_layer_height_ratio = 1;
|
2011-10-18 17:57:53 +04:00
|
|
|
our $infill_every_layers = 1;
|
2011-12-07 22:33:59 +04:00
|
|
|
|
|
|
|
# flow options
|
2011-11-26 23:51:04 +04:00
|
|
|
our $extrusion_width_ratio = 0;
|
2011-12-04 23:29:21 +04:00
|
|
|
our $bridge_flow_ratio = 1;
|
2011-12-17 22:52:34 +04:00
|
|
|
our $overlap_factor = 0.5;
|
2011-09-06 13:10:12 +04:00
|
|
|
our $flow_width;
|
2011-12-17 22:52:34 +04:00
|
|
|
our $min_flow_spacing;
|
|
|
|
our $flow_spacing;
|
2011-09-06 13:10:12 +04:00
|
|
|
|
|
|
|
# print options
|
2011-11-17 13:38:23 +04:00
|
|
|
our $perimeters = 3;
|
2011-09-26 00:11:56 +04:00
|
|
|
our $solid_layers = 3;
|
2011-11-13 21:14:02 +04:00
|
|
|
our $fill_pattern = 'rectilinear';
|
|
|
|
our $solid_fill_pattern = 'rectilinear';
|
2011-09-05 20:52:09 +04:00
|
|
|
our $fill_density = 0.4; # 1 = 100%
|
2011-12-08 13:33:05 +04:00
|
|
|
our $fill_angle = 45;
|
2011-10-14 18:24:55 +04: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 22:47:38 +04:00
|
|
|
|
2011-09-06 13:10:12 +04:00
|
|
|
# retraction options
|
2011-10-01 20:10:33 +04:00
|
|
|
our $retract_length = 1; # mm
|
2011-09-05 20:52:09 +04:00
|
|
|
our $retract_restart_extra = 0; # mm
|
2011-12-14 13:33:22 +04:00
|
|
|
our $retract_speed = 30; # mm/sec
|
2011-10-06 17:24:21 +04:00
|
|
|
our $retract_before_travel = 2; # mm
|
2011-11-07 18:58:47 +04:00
|
|
|
our $retract_lift = 0; # mm
|
2011-09-05 20:52:09 +04:00
|
|
|
|
2011-09-06 13:10:12 +04:00
|
|
|
# skirt options
|
2011-09-26 00:11:56 +04:00
|
|
|
our $skirts = 1;
|
2011-09-05 22:00:59 +04:00
|
|
|
our $skirt_distance = 6; # mm
|
2011-11-13 21:41:12 +04:00
|
|
|
our $skirt_height = 1; # layers
|
2011-09-05 22:00:59 +04:00
|
|
|
|
2011-09-26 14:07:29 +04:00
|
|
|
# transform options
|
|
|
|
our $scale = 1;
|
2011-09-26 18:07:12 +04:00
|
|
|
our $rotate = 0;
|
2011-11-07 18:49:07 +04:00
|
|
|
our $duplicate_x = 1;
|
|
|
|
our $duplicate_y = 1;
|
|
|
|
our $duplicate_distance = 6; # mm
|
2011-09-26 14:07:29 +04:00
|
|
|
|
2011-09-01 23:06:28 +04:00
|
|
|
1;
|