mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Bugfix: crash when rendering lines with zero length in 3D preview. #2569
This commit is contained in:
parent
a10a554e2a
commit
c264969962
8 changed files with 35 additions and 30 deletions
|
@ -1198,6 +1198,7 @@ sub _extrusionentity_to_verts {
|
|||
return;
|
||||
} elsif ($entity->isa('Slic3r::ExtrusionPath')) {
|
||||
my $polyline = $entity->polyline->clone;
|
||||
$polyline->remove_duplicate_points;
|
||||
$polyline->translate(@$copy);
|
||||
$lines = $polyline->lines;
|
||||
$widths = [ map $entity->width, 0..$#$lines ];
|
||||
|
@ -1210,6 +1211,7 @@ sub _extrusionentity_to_verts {
|
|||
$closed = 1;
|
||||
foreach my $path (@$entity) {
|
||||
my $polyline = $path->polyline->clone;
|
||||
$polyline->remove_duplicate_points;
|
||||
$polyline->translate(@$copy);
|
||||
my $path_lines = $polyline->lines;
|
||||
push @$lines, @$path_lines;
|
||||
|
@ -1217,7 +1219,6 @@ sub _extrusionentity_to_verts {
|
|||
push @$heights, map $path->height, 0..$#$path_lines;
|
||||
}
|
||||
}
|
||||
|
||||
Slic3r::GUI::_3DScene::_extrusionentity_to_verts_do($lines, $widths, $heights,
|
||||
$closed, $top_z, $copy, $qverts, $tverts);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue