mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 13:02:39 -07:00
Bugfixes and improvements in surface detection
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use Test::More;
|
||||
|
||||
plan tests => 4;
|
||||
plan tests => 9;
|
||||
|
||||
BEGIN {
|
||||
use FindBin;
|
||||
@@ -29,3 +29,10 @@ is $intersection, undef, 'external lines are ignored 2';
|
||||
|
||||
$intersection = Slic3r::Geometry::clip_segment_polygon([ [12, 12], [18, 16] ], $square);
|
||||
is_deeply $intersection, [ [12, 12], [18, 16] ], 'internal lines are preserved';
|
||||
|
||||
is Slic3r::Geometry::point_in_segment([10, 10], [ [5, 10], [20, 10] ]), 1, 'point in horizontal segment';
|
||||
is Slic3r::Geometry::point_in_segment([30, 10], [ [5, 10], [20, 10] ]), 0, 'point not in horizontal segment';
|
||||
is Slic3r::Geometry::point_in_segment([10, 10], [ [10, 5], [10, 20] ]), 1, 'point in vertical segment';
|
||||
is Slic3r::Geometry::point_in_segment([10, 30], [ [10, 5], [10, 20] ]), 0, 'point not in vertical segment';
|
||||
is Slic3r::Geometry::point_in_segment([15, 15], [ [10, 10], [20, 20] ]), 1, 'point in diagonal segment';
|
||||
is Slic3r::Geometry::point_in_segment([20, 15], [ [10, 10], [20, 20] ]), 0, 'point not in diagonal segment';
|
||||
|
||||
Reference in New Issue
Block a user