mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Fixed regression causing wrong direction for inwards move in holes. Includes regression test. #1265
This commit is contained in:
		
							parent
							
								
									6e63e938a0
								
							
						
					
					
						commit
						c03f9f0197
					
				
					 4 changed files with 43 additions and 3 deletions
				
			
		|  | @ -190,8 +190,6 @@ sub extrude_loop { | |||
|             $extrusion_path->intersect_expolygons($self->_layer_overhangs); | ||||
|          | ||||
|         # reapply the nearest point search for starting point | ||||
|         # (TODO: choose the nearest point not on an overhang - make sure wipe and | ||||
|         # inwards move consider the new actual starting point) | ||||
|         @paths = Slic3r::ExtrusionPath::Collection | ||||
|             ->new(paths => [@paths]) | ||||
|             ->chained_path($last_pos, 1); | ||||
|  |  | |||
|  | @ -256,7 +256,11 @@ sub make_perimeters { | |||
|         foreach my $polynode (@nodes) { | ||||
|             push @loops, $traverse->($polynode->{children}, $depth+1, $is_contour); | ||||
|              | ||||
|             # return ccw contours and cw holes | ||||
|             # GCode.pm will convert all of them to ccw, but it needs to know | ||||
|             # what the holes are in order to compute the correct inwards move | ||||
|             my $polygon = Slic3r::Polygon->new($polynode->{outer} // [ reverse @{$polynode->{hole}} ]); | ||||
|             $polygon->reverse if !$is_contour; | ||||
|              | ||||
|             my $role = EXTR_ROLE_PERIMETER; | ||||
|             if ($is_contour ? $depth == 0 : !@{ $polynode->{children} }) { | ||||
|  |  | |||
|  | @ -27,6 +27,13 @@ sub model { | |||
|         $facets = [ | ||||
|             [0,1,2], [0,2,3], [4,5,6], [4,6,7], [0,4,7], [0,7,1], [1,7,6], [1,6,2], [2,6,5], [2,5,3], [4,0,3], [4,3,5], | ||||
|         ], | ||||
|     } elsif ($model_name eq 'cube_with_hole') { | ||||
|         $vertices = [ | ||||
|             [0,0,0],[0,0,10],[0,20,0],[0,20,10],[20,0,0],[20,0,10],[5,5,0],[15,5,0],[5,15,0],[20,20,0],[15,15,0],[20,20,10],[5,5,10],[5,15,10],[15,5,10],[15,15,10] | ||||
|         ]; | ||||
|         $facets = [ | ||||
|             [0,1,2],[2,1,3],[1,0,4],[5,1,4],[6,7,4],[8,2,9],[0,2,8],[10,8,9],[0,8,6],[0,6,4],[4,7,9],[7,10,9],[2,3,9],[9,3,11],[12,1,5],[13,3,12],[14,12,5],[3,1,12],[11,3,13],[11,15,5],[11,13,15],[15,14,5],[5,4,9],[11,5,9],[8,13,12],[6,8,12],[10,15,13],[8,10,13],[15,10,14],[14,10,7],[14,7,12],[12,7,6] | ||||
|         ], | ||||
|     } elsif ($model_name eq 'V') { | ||||
|         $vertices = [ | ||||
|             [-14,0,20],[-14,15,20],[0,0,0],[0,15,0],[-4,0,20],[-4,15,20],[5,0,7.14286],[10,0,0],[24,0,20],[14,0,20],[10,15,0],[5,15,7.14286],[14,15,20],[24,15,20] | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci