mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-04 14:15:16 +08:00
Ported ExtrusionLoop->make_counter_clockwise()
This commit is contained in:
parent
5d6fd7f4d9
commit
ea1d138c95
@ -13,13 +13,4 @@ sub split_at {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
sub make_counter_clockwise {
|
|
||||||
my $self = shift;
|
|
||||||
if (!$self->polygon->is_counter_clockwise) {
|
|
||||||
$self->reverse;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
@ -41,4 +41,10 @@ ExtrusionLoop::split_at_first_point()
|
|||||||
return this->split_at_index(0);
|
return this->split_at_index(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
ExtrusionLoop::make_counter_clockwise()
|
||||||
|
{
|
||||||
|
return this->polygon.make_counter_clockwise();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ class ExtrusionLoop : public ExtrusionEntity
|
|||||||
Polygon polygon;
|
Polygon polygon;
|
||||||
ExtrusionPath* split_at_index(int index);
|
ExtrusionPath* split_at_index(int index);
|
||||||
ExtrusionPath* split_at_first_point();
|
ExtrusionPath* split_at_first_point();
|
||||||
|
bool make_counter_clockwise();
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
%code{% const char* CLASS = "Slic3r::ExtrusionPath"; RETVAL = THIS->split_at_index(index); %};
|
%code{% const char* CLASS = "Slic3r::ExtrusionPath"; RETVAL = THIS->split_at_index(index); %};
|
||||||
ExtrusionPath* split_at_first_point()
|
ExtrusionPath* split_at_first_point()
|
||||||
%code{% const char* CLASS = "Slic3r::ExtrusionPath"; RETVAL = THIS->split_at_first_point(); %};
|
%code{% const char* CLASS = "Slic3r::ExtrusionPath"; RETVAL = THIS->split_at_first_point(); %};
|
||||||
|
bool make_counter_clockwise();
|
||||||
%{
|
%{
|
||||||
|
|
||||||
ExtrusionLoop*
|
ExtrusionLoop*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user