diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-10-05 00:27:45 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-10-05 00:27:45 +0400 |
commit | 2da5ee744812f0a2d49d7bd63eabcec984be5537 (patch) | |
tree | 22e4cbb277f125b982c33e24d3dc005f12819322 /lib/Slic3r/STL.pm | |
parent | f1a36502e11292b44d0a433322032ede519a7509 (diff) |
Bugfixes and improvements in surface detection
Diffstat (limited to 'lib/Slic3r/STL.pm')
-rw-r--r-- | lib/Slic3r/STL.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Slic3r/STL.pm b/lib/Slic3r/STL.pm index cf9ade6d4..44a229357 100644 --- a/lib/Slic3r/STL.pm +++ b/lib/Slic3r/STL.pm @@ -176,7 +176,10 @@ sub intersect_facet { if ($a->[Z] == $b->[Z] && $a->[Z] == $z) { # edge is horizontal and belongs to the current layer - push @lines, [ [$a->[X], $a->[Y]], [$b->[X], $b->[Y]] ]; + push @lines, Slic3r::Line::FacetEdge->cast( + [ [$a->[X], $a->[Y]], [$b->[X], $b->[Y]] ], + edge_type => (grep $_->[Z] > $z, @$vertices) ? 'bottom' : 'top', + ); #print "Horizontal!\n"; } elsif (($a->[Z] < $z && $b->[Z] > $z) || ($b->[Z] < $z && $a->[Z] > $z)) { @@ -213,7 +216,7 @@ sub intersect_facet { #} # connect points: - push @lines, [ @intersection_points ]; + push @lines, Slic3r::Line->cast([ @intersection_points ]); } return @lines; |