mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 19:57:55 -06:00
Bugfix: fill escapes perimeters. #139
This commit is contained in:
parent
4a4c4b4e7d
commit
be9886eac3
3 changed files with 20 additions and 9 deletions
|
@ -13,7 +13,7 @@ our @EXPORT_OK = qw(
|
|||
polygon_has_vertex polyline_length can_connect_points deg2rad rad2deg
|
||||
rotate_points move_points remove_coinciding_points clip_segment_polygon
|
||||
sum_vectors multiply_vector subtract_vectors dot perp polygon_points_visibility
|
||||
line_intersection bounding_box bounding_box_intersect same_point
|
||||
line_intersection bounding_box bounding_box_intersect same_point same_line
|
||||
longest_segment angle3points three_points_aligned line_direction
|
||||
polyline_remove_parallel_continuous_edges polyline_remove_acute_vertices
|
||||
polygon_remove_acute_vertices polygon_remove_parallel_continuous_edges
|
||||
|
@ -103,6 +103,11 @@ sub same_point {
|
|||
return $p1->[X] == $p2->[X] && $p1->[Y] == $p2->[Y];
|
||||
}
|
||||
|
||||
sub same_line {
|
||||
my ($line1, $line2) = @_;
|
||||
return same_point($line1->[A], $line2->[A]) && same_point($line1->[B], $line2->[B]);
|
||||
}
|
||||
|
||||
sub distance_between_points {
|
||||
my ($p1, $p2) = @_;
|
||||
return sqrt((($p1->[X] - $p2->[X])**2) + ($p1->[Y] - $p2->[Y])**2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue