mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 18:58:00 -06:00
Bugfixes and improvements in surface detection
This commit is contained in:
parent
f1a36502e1
commit
2da5ee7448
13 changed files with 202 additions and 67 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue