mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Some minor fixes related to polyline refactoring
This commit is contained in:
		
							parent
							
								
									d63fd77da4
								
							
						
					
					
						commit
						4ade11b26e
					
				
					 3 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -12,7 +12,7 @@ sub process_polyline {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    my ($polyline, $bounding_box) = @_;
 | 
					    my ($polyline, $bounding_box) = @_;
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    $_->[X] += ($bounding_box->[X1] + $bounding_box->[X2]/2) for @{$polyline->points};
 | 
					    $_->[X] += ($bounding_box->[X1] + $bounding_box->[X2]/2) for @$polyline;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1;
 | 
					1;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -137,7 +137,7 @@ sub is_printable {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub is_valid {
 | 
					sub is_valid {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    return @{$self->points} >= 3;
 | 
					    return @$self >= 3;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1;
 | 
					1;
 | 
				
			||||||
| 
						 | 
					@ -63,7 +63,7 @@ sub simplify {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub reverse_points {
 | 
					sub reverse_points {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    @{$self->points} = reverse @{$self->points};
 | 
					    @$self = reverse @$self;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub is_counter_clockwise {
 | 
					sub is_counter_clockwise {
 | 
				
			||||||
| 
						 | 
					@ -152,13 +152,13 @@ sub clip_with_expolygon {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub bounding_box {
 | 
					sub bounding_box {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    return Slic3r::Geometry::bounding_box($self->points);
 | 
					    return Slic3r::Geometry::bounding_box($self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
sub translate {
 | 
					sub translate {
 | 
				
			||||||
    my $self = shift;
 | 
					    my $self = shift;
 | 
				
			||||||
    my ($x, $y) = @_;
 | 
					    my ($x, $y) = @_;
 | 
				
			||||||
    @{$self->points} = move_points([$x, $y], @{$self->points});
 | 
					    @$self = move_points([$x, $y], @$self);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1;
 | 
					1;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue