mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Scale bounding_box by sqrt(2) in honeycomb too to ensure it will cover the object even after rotation, like we already did for Rectilinear
This commit is contained in:
		
							parent
							
								
									b5b0c2cc89
								
							
						
					
					
						commit
						627debf284
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -38,10 +38,12 @@ sub fill_surface {
 | 
			
		|||
        
 | 
			
		||||
        # adjust actual bounding box to the nearest multiple of our hex pattern
 | 
			
		||||
        # and align it so that it matches across layers
 | 
			
		||||
        
 | 
			
		||||
        my $bounding_box = [ @{$self->bounding_box} ];  # clone
 | 
			
		||||
        $bounding_box->[$_] = 0 for X1, Y1;
 | 
			
		||||
        {
 | 
			
		||||
            my $bb_polygon = Slic3r::Polygon->new_from_bounding_box($bounding_box);
 | 
			
		||||
            $bb_polygon->scale(sqrt 2);
 | 
			
		||||
            $bb_polygon->rotate($rotate_vector->[0][0], $hex_center);
 | 
			
		||||
            $bounding_box = [ Slic3r::Geometry::bounding_box($bb_polygon) ];
 | 
			
		||||
            # $bounding_box->[X1] and [Y1] represent the displacement between new bounding box offset and old one
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue