mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-14 10:17:55 -06:00
Optimization: split meshes automatically when avoid_crossing_perimeters is enabled, so that we reduce the complexity of the MotionPlanner graphs. This commit includes a very large refactoring of the Model class which is now responsible for duplication and arrangement
This commit is contained in:
parent
e33ca54943
commit
08a0bbd7f0
12 changed files with 300 additions and 109 deletions
|
@ -7,7 +7,7 @@ our @ISA = qw(Exporter);
|
|||
our @EXPORT_OK = qw(
|
||||
PI X Y Z A B X1 Y1 X2 Y2 MIN MAX epsilon slope line_atan lines_parallel
|
||||
line_point_belongs_to_segment points_coincide distance_between_points
|
||||
chained_path_items chained_path_points normalize tan
|
||||
chained_path_items chained_path_points normalize tan move_points_3D
|
||||
line_length midpoint point_in_polygon point_in_segment segment_in_segment
|
||||
point_is_on_left_of_segment polyline_lines polygon_lines nearest_point
|
||||
point_along_segment polygon_segment_having_point polygon_has_subsegment
|
||||
|
@ -388,6 +388,15 @@ sub move_points {
|
|||
return map Slic3r::Point->new($shift->[X] + $_->[X], $shift->[Y] + $_->[Y]), @points;
|
||||
}
|
||||
|
||||
sub move_points_3D {
|
||||
my ($shift, @points) = @_;
|
||||
return map [
|
||||
$shift->[X] + $_->[X],
|
||||
$shift->[Y] + $_->[Y],
|
||||
$shift->[Z] + $_->[Z],
|
||||
], @points;
|
||||
}
|
||||
|
||||
# implementation of Liang-Barsky algorithm
|
||||
# polygon must be convex and ccw
|
||||
sub clip_segment_polygon {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue