From 8851dc7f23de95fe91d56e2bb7f2af48a28f65fc Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 15 Feb 2015 16:47:55 +0100 Subject: [PATCH] Added failing test case for upstream Clipper issue 126 (our #2639) --- xs/t/11_clipper.t | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/xs/t/11_clipper.t b/xs/t/11_clipper.t index 4fc8261ec..ba60d8890 100644 --- a/xs/t/11_clipper.t +++ b/xs/t/11_clipper.t @@ -179,7 +179,7 @@ if (0) { # Clipper does not preserve polyline orientation } { - # Disabled until Clipper bug #122 is fixed + # Clipper bug #122 my $subject = [ Slic3r::Polyline->new([1975,1975],[25,1975],[25,25],[1975,25],[1975,1975]), ]; @@ -192,4 +192,17 @@ if (0) { # Clipper does not preserve polyline orientation is scalar(@{$result->[0]}), 5, 'intersection_pl - result is not empty'; } +if (0) { + # Disabled until Clipper bug ### is fixed + my $subject = Slic3r::Polyline->new( + [200000,19799999],[200000,200000],[24304692,200000],[15102879,17506106],[13883200,19799999],[200000,19799999], + ); + my $clip = [ + Slic3r::Polygon->new([15257205,18493894],[14350057,20200000],[-200000,20200000],[-200000,-200000],[25196917,-200000]), + ]; + my $result = Slic3r::Geometry::Clipper::intersection_pl([$subject], $clip); + is scalar(@$result), 1, 'intersection_pl - result is not empty'; + is $result->[0]->length, $subject->length, 'intersection_pl - result has same length as subject polyline'; +} + __END__