mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 15:13:58 -06:00
Refactored Line objects to arrayrefs
This commit is contained in:
parent
e410410dc7
commit
c97a89c07c
10 changed files with 47 additions and 44 deletions
|
@ -150,11 +150,10 @@ sub intersect_facet {
|
|||
|
||||
if ($a->[Z] == $b->[Z] && $a->[Z] == $z) {
|
||||
# edge is horizontal and belongs to the current layer
|
||||
my $edge_type = (grep $_->[Z] > $z, @$vertices) ? 'bottom' : 'top';
|
||||
($a, $b) = ($b, $a) if $edge_type eq 'bottom';
|
||||
push @lines, Slic3r::Line::FacetEdge->cast(
|
||||
[ [$a->[X], $a->[Y]], [$b->[X], $b->[Y]] ],
|
||||
edge_type => $edge_type,
|
||||
my $edge_type = (grep $_->[Z] > $z, @$vertices) ? 'Bottom' : 'Top';
|
||||
($a, $b) = ($b, $a) if $edge_type eq 'Bottom';
|
||||
push @lines, "Slic3r::Line::FacetEdge::$edge_type"->new(
|
||||
[$a->[X], $a->[Y]], [$b->[X], $b->[Y]],
|
||||
);
|
||||
#print "Horizontal edge at $z!\n";
|
||||
|
||||
|
@ -192,7 +191,7 @@ sub intersect_facet {
|
|||
#}
|
||||
|
||||
# connect points:
|
||||
push @lines, Slic3r::Line->cast([ @intersection_points ]);
|
||||
push @lines, Slic3r::Line->new(@intersection_points);
|
||||
#printf " intersection points = %f,%f - %f,%f\n", map @$_, @intersection_points;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue