mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-10-16 12:12:51 +02:00
Use linestring_length() from Boost
This commit is contained in:
1 parent
0d6ff22e19
commit
bf809d1fd0
3 files changed
+4
-6
No files matched your search
@@ -7,7 +7,7 @@ use warnings;
|
||||
use Boost::Geometry::Utils;
|
||||
use List::Util qw(first);
|
||||
use Math::Geometry::Voronoi;
|
||||
use Slic3r::Geometry qw(X Y A B point_in_polygon same_line line_length epsilon);
|
||||
use Slic3r::Geometry qw(X Y A B point_in_polygon same_line epsilon);
|
||||
use Slic3r::Geometry::Clipper qw(union_ex JT_MITER);
|
||||
|
||||
# the constructor accepts an array of polygons
|
||||
@@ -131,7 +131,7 @@ sub encloses_line {
|
||||
# optimization
|
||||
return @$clip == 1 && same_line($clip->[0], $line);
|
||||
} else {
|
||||
return @$clip == 1 && abs(line_length($clip->[0]) - $line->length) < $tolerance;
|
||||
return @$clip == 1 && abs(Boost::Geometry::Utils::linestring_length($clip->[0]) - $line->length) < $tolerance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user