mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-12 20:19:09 +08:00
Update dump-stl.pl
This commit is contained in:
parent
39449f9245
commit
f79ba8cec0
@ -225,7 +225,9 @@ sub mesh {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Slic3r::TriangleMesh->merge(@meshes);
|
my $mesh = Slic3r::TriangleMesh->new;
|
||||||
|
$mesh->merge($_) for @meshes;
|
||||||
|
return $mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
# this method splits objects into multiple distinct objects by walking their meshes
|
# this method splits objects into multiple distinct objects by walking their meshes
|
||||||
|
@ -19,6 +19,7 @@ $ARGV[0] or usage(1);
|
|||||||
if (-e $ARGV[0]) {
|
if (-e $ARGV[0]) {
|
||||||
my $model = Slic3r::Format::STL->read_file($ARGV[0]);
|
my $model = Slic3r::Format::STL->read_file($ARGV[0]);
|
||||||
my $mesh = $model->mesh;
|
my $mesh = $model->mesh;
|
||||||
|
$mesh->repair;
|
||||||
printf "VERTICES = %s\n", join ',', map "[$_->[0],$_->[1],$_->[2]]", @{$mesh->vertices};
|
printf "VERTICES = %s\n", join ',', map "[$_->[0],$_->[1],$_->[2]]", @{$mesh->vertices};
|
||||||
printf "FACETS = %s\n", join ',', map "[$_->[0],$_->[1],$_->[2]]", @{$mesh->facets};
|
printf "FACETS = %s\n", join ',', map "[$_->[0],$_->[1],$_->[2]]", @{$mesh->facets};
|
||||||
exit 0;
|
exit 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user