mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Bugfix: avoid-crossing-perimeters was failing on layers only containing single walls. #978
This commit is contained in:
		
							parent
							
								
									8efe46e58d
								
							
						
					
					
						commit
						11637d527a
					
				
					 1 changed files with 10 additions and 4 deletions
				
			
		|  | @ -727,11 +727,17 @@ sub write_gcode { | |||
|         # compute the offsetted convex hull for each object and repeat it for each copy. | ||||
|         my @islands = (); | ||||
|         foreach my $obj_idx (0 .. $#{$self->objects}) { | ||||
|             my @island = Slic3r::ExPolygon->new(convex_hull([ | ||||
|             my $convex_hull = convex_hull([ | ||||
|                 map @{$_->contour}, map @{$_->slices}, @{$self->objects->[$obj_idx]->layers}, | ||||
|             ]))->translate(scale $shift[X], scale $shift[Y])->offset_ex(scale $distance_from_objects, 1, JT_SQUARE); | ||||
|             foreach my $copy (@{ $self->objects->[$obj_idx]->copies }) { | ||||
|                 push @islands, map $_->clone->translate(@$copy), @island; | ||||
|             ]); | ||||
|             # discard layers only containing thin walls (offset would fail on an empty polygon) | ||||
|             if (@$convex_hull) { | ||||
|                 my @island = Slic3r::ExPolygon->new($convex_hull) | ||||
|                     ->translate(scale $shift[X], scale $shift[Y]) | ||||
|                     ->offset_ex(scale $distance_from_objects, 1, JT_SQUARE); | ||||
|                 foreach my $copy (@{ $self->objects->[$obj_idx]->copies }) { | ||||
|                     push @islands, map $_->clone->translate(@$copy), @island; | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|         $gcodegen->external_mp(Slic3r::GCode::MotionPlanner->new( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci