mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Bugfix: concave starting points were not correctly detected for slice holes. Includes regression test. #2857
This commit is contained in:
17
t/geometry.t
17
t/geometry.t
@@ -2,7 +2,7 @@ use Test::More;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
plan tests => 38;
|
||||
plan tests => 42;
|
||||
|
||||
BEGIN {
|
||||
use FindBin;
|
||||
@@ -190,6 +190,21 @@ my $polygons = [
|
||||
|
||||
#==========================================================
|
||||
|
||||
{
|
||||
my $square = Slic3r::Polygon->new_scale(
|
||||
[100,100],
|
||||
[200,100],
|
||||
[200,200],
|
||||
[100,200],
|
||||
);
|
||||
is scalar(@{$square->concave_points(PI*4/3)}), 0, 'no concave vertices detected in ccw square';
|
||||
is scalar(@{$square->convex_points(PI*2/3)}), 4, 'four convex vertices detected in ccw square';
|
||||
|
||||
$square->make_clockwise;
|
||||
is scalar(@{$square->concave_points(PI*4/3)}), 4, 'fuor concave vertices detected in cw square';
|
||||
is scalar(@{$square->convex_points(PI*2/3)}), 0, 'no convex vertices detected in cw square';
|
||||
}
|
||||
|
||||
{
|
||||
my $square = Slic3r::Polygon->new_scale(
|
||||
[150,100],
|
||||
|
||||
Reference in New Issue
Block a user