Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlessandro Ranellucci <aar@cpan.org>2013-06-23 23:11:46 +0400
committerAlessandro Ranellucci <aar@cpan.org>2013-06-23 23:11:46 +0400
commit2a2633da0afcca36cf875cd28b798c639ae3c628 (patch)
tree5172aec04251f40ce4150972f4fd522f8dc7491c /slic3r.pl
parentf62896a77aa3233398847115db21d4d57b3706fa (diff)
New automatic built-in STL repair
Diffstat (limited to 'slic3r.pl')
-rwxr-xr-xslic3r.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/slic3r.pl b/slic3r.pl
index 0b05cd043..771dc80ce 100755
--- a/slic3r.pl
+++ b/slic3r.pl
@@ -33,6 +33,7 @@ my %cli_options = ();
'datadir=s' => \$opt{datadir},
'export-svg' => \$opt{export_svg},
'merge|m' => \$opt{merge},
+ 'repair' => \$opt{repair},
);
foreach my $opt_key (keys %{$Slic3r::Config::Options}) {
my $cli = $Slic3r::Config::Options->{$opt_key}->{cli} or next;
@@ -92,6 +93,18 @@ die $@ if $@ && $opt{gui};
if (@ARGV) { # slicing from command line
$config->validate;
+ if ($opt{repair}) {
+ foreach my $file (@ARGV) {
+ die "Repair is currently supported only on STL files\n"
+ if $file !~ /\.stl$/i;
+
+ my $output_file = $file;
+ $output_file =~ s/\.(stl)$/_fixed.obj/i;
+ Slic3r::TriangleMesh::XS::stl_repair($file, $output_file);
+ }
+ exit;
+ }
+
while (my $input_file = shift @ARGV) {
my $model;
if ($opt{merge}) {
@@ -150,6 +163,7 @@ Usage: slic3r.pl [ OPTIONS ] file.stl
-o, --output <file> File to output gcode to (by default, the file will be saved
into the same directory as the input file using the
--output-filename-format to generate the filename)
+ --repair Automatically repair given STL files and saves them as _fixed.obj
$j
GUI options:
--no-plater Disable the plater tab