Ported ExtrusionLoop->make_counter_clockwise()

This commit is contained in:
Alessandro Ranellucci 2013-08-29 01:40:42 +02:00
parent 5d6fd7f4d9
commit ea1d138c95
4 changed files with 8 additions and 9 deletions

View file

@ -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;

View file

@ -41,4 +41,10 @@ ExtrusionLoop::split_at_first_point()
return this->split_at_index(0);
}
bool
ExtrusionLoop::make_counter_clockwise()
{
return this->polygon.make_counter_clockwise();
}
}

View file

@ -48,6 +48,7 @@ class ExtrusionLoop : public ExtrusionEntity
Polygon polygon;
ExtrusionPath* split_at_index(int index);
ExtrusionPath* split_at_first_point();
bool make_counter_clockwise();
};
}

View file

@ -17,6 +17,7 @@
%code{% const char* CLASS = "Slic3r::ExtrusionPath"; RETVAL = THIS->split_at_index(index); %};
ExtrusionPath* split_at_first_point()
%code{% const char* CLASS = "Slic3r::ExtrusionPath"; RETVAL = THIS->split_at_first_point(); %};
bool make_counter_clockwise();
%{
ExtrusionLoop*