diff --git a/t/clean_polylines.t b/t/clean_polylines.t index bc7d864e6..064b7bd3a 100644 --- a/t/clean_polylines.t +++ b/t/clean_polylines.t @@ -32,8 +32,9 @@ use Slic3r; my $polyline = Slic3r::Polyline->new([ [0,0],[0.5,0.5],[1,0],[1.25,-0.25],[1.5,.5], ]); - $polyline->simplify(0.25); - is_deeply $polyline, [ [0, 0], [0.5, 0.5], [1.25, -0.25], [1.5, 0.5] ], 'Douglas-Peucker'; + $polyline->scale(100); + $polyline->simplify(25); + is_deeply $polyline, [ [0, 0], [50, 50], [125, -25], [150, 50] ], 'Douglas-Peucker'; } { diff --git a/t/polyclip.t b/t/polyclip.t index 285ef45be..49e3be175 100644 --- a/t/polyclip.t +++ b/t/polyclip.t @@ -92,7 +92,7 @@ is_deeply $intersection, [ [12, 12], [18, 16] ], 'internal lines are preserved'; { my $intersections = $expolygon->clip_line(Slic3r::Line->new(reverse @$line)); is_deeply $intersections, [ - [ [20, 15], [16, 15] ], + [ [20, 15], [15, 15] ], [ [14, 15], [10, 15] ], ], 'reverse line is clipped to square with hole'; } @@ -144,8 +144,8 @@ is_deeply $intersection, [ [12, 12], [18, 16] ], 'internal lines are preserved'; my $intersections = $expolygon->clip_line($line); is_deeply $intersections, [ - [ [152.742, 288.087], [152.742, 215.179], ], - [ [152.742, 108.088], [152.742, 35.1665] ], + [ [152, 287], [152, 214], ], + [ [152, 107], [152, 35] ], ], 'line is clipped to square with hole'; }