PrusaSlicer-NonPlainar/lib/Slic3r.pm

58 lines
1.3 KiB
Perl
Raw Normal View History

2016-09-13 11:24:55 +02:00
# This package loads all the non-GUI Slic3r perl packages.
2011-09-01 21:06:28 +02:00
package Slic3r;
2012-01-18 20:04:18 +01:00
# Copyright holder: Alessandro Ranellucci
# This application is licensed under the GNU Affero General Public License, version 3
2011-09-01 21:06:28 +02:00
use strict;
use warnings;
use Config;
2012-01-22 13:56:15 +01:00
require v5.10;
2011-09-01 21:06:28 +02:00
our $VERSION = VERSION();
our $BUILD = BUILD();
our $FORK_NAME = FORK_NAME();
2011-11-13 22:57:58 +01:00
2011-09-05 13:33:09 +02:00
our $debug = 0;
sub debugf {
printf @_ if $debug;
}
2016-11-24 13:44:51 +01:00
our $loglevel = 0;
BEGIN {
$debug = 1 if (defined($ENV{'SLIC3R_DEBUGOUT'}) && $ENV{'SLIC3R_DEBUGOUT'} == 1);
print "Debugging output enabled\n" if $debug;
}
2012-05-19 20:25:59 +02:00
2012-05-29 14:19:14 +02:00
use FindBin;
2017-10-25 12:53:31 +02:00
use Moo 1.003001;
2013-07-14 13:05:55 +02:00
use Slic3r::XS; # import all symbols (constants etc.) before they get parsed
2011-10-03 11:55:32 +02:00
use Slic3r::Config;
use Slic3r::ExPolygon;
use Slic3r::ExtrusionLoop;
use Slic3r::ExtrusionPath;
use Slic3r::GCode::Reader;
2011-09-01 21:06:28 +02:00
use Slic3r::Layer;
use Slic3r::Line;
use Slic3r::Model;
2011-09-01 21:06:28 +02:00
use Slic3r::Point;
use Slic3r::Polygon;
2011-09-01 21:06:28 +02:00
use Slic3r::Polyline;
use Slic3r::Print::Object;
2011-09-01 21:06:28 +02:00
use Slic3r::Surface;
2013-04-27 20:55:43 +02:00
our $build = eval "use Slic3r::Build; 1";
2011-09-01 21:06:28 +02:00
2016-09-13 11:24:55 +02:00
# Scaling between the float and integer coordinates.
# Floats are in mm.
use constant SCALING_FACTOR => 0.000001;
2016-11-24 13:44:51 +01:00
# Set the logging level at the Slic3r XS module.
$Slic3r::loglevel = (defined($ENV{'SLIC3R_LOGLEVEL'}) && $ENV{'SLIC3R_LOGLEVEL'} =~ /^[1-9]/) ? $ENV{'SLIC3R_LOGLEVEL'} : 0;
set_logging_level($Slic3r::loglevel);
2011-09-01 21:06:28 +02:00
1;