mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	This commit is contained in:
		
							parent
							
								
									9bfa4118a1
								
							
						
					
					
						commit
						b7d8444ac8
					
				
					 2 changed files with 12 additions and 1 deletions
				
			
		|  | @ -85,6 +85,12 @@ sub length { | |||
|     return $length; | ||||
| } | ||||
| 
 | ||||
| # this only applies to polylines | ||||
| sub grow { | ||||
|     my $self = shift; | ||||
|     return Slic3r::Polygon->new(@$self, CORE::reverse @$self[1..-2])->offset(@_); | ||||
| } | ||||
| 
 | ||||
| sub nearest_point_to { | ||||
|     my $self = shift; | ||||
|     my ($point) = @_; | ||||
|  |  | |||
|  | @ -511,7 +511,12 @@ sub make_brim { | |||
|      | ||||
|     my @islands = (); # array of polygons | ||||
|     foreach my $obj_idx (0 .. $#{$self->objects}) { | ||||
|         my @object_islands = map $_->contour, @{ $self->objects->[$obj_idx]->layers->[0]->slices }; | ||||
|         my $layer0 = $self->objects->[$obj_idx]->layers->[0]; | ||||
|         my @object_islands = ( | ||||
|             (map $_->contour, @{$layer0->slices}), | ||||
|             (map { $_->isa('Slic3r::Polygon') ? $_ : $_->grow } @{$layer0->thin_walls}), | ||||
|             (map $_->unpack->polyline->grow, map @{$_->support_fills->paths}, grep $_->support_fills, $layer0), | ||||
|         ); | ||||
|         foreach my $copy (@{$self->copies->[$obj_idx]}) { | ||||
|             push @islands, map $_->clone->translate(@$copy), @object_islands; | ||||
|         } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci