mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Bugfix: 3D honeycomb infill wasn't correctly aligned among skewed layers. #2194
This commit is contained in:
		
							parent
							
								
									d5eb6b7be0
								
							
						
					
					
						commit
						2d0b27abed
					
				
					 1 changed files with 12 additions and 2 deletions
				
			
		|  | @ -24,6 +24,16 @@ sub fill_surface { | ||||||
|      |      | ||||||
|     my $distance = $flow->scaled_spacing / $params{density}; |     my $distance = $flow->scaled_spacing / $params{density}; | ||||||
|      |      | ||||||
|  |     # align bounding box to a multiple of our honeycomb grid | ||||||
|  |     { | ||||||
|  |         my $min = $bb->min_point; | ||||||
|  |         $min->translate( | ||||||
|  |             -($bb->x_min % $distance), | ||||||
|  |             -($bb->y_min % $distance), | ||||||
|  |         ); | ||||||
|  |         $bb->merge_point($min); | ||||||
|  |     } | ||||||
|  |      | ||||||
|     # generate pattern |     # generate pattern | ||||||
|     my @polylines = map Slic3r::Polyline->new(@$_), |     my @polylines = map Slic3r::Polyline->new(@$_), | ||||||
|         makeGrid( |         makeGrid( | ||||||
|  | @ -176,9 +186,9 @@ sub makeNormalisedGrid { | ||||||
|     my ($z, $gridWidth, $gridHeight, $curveType) = @_; |     my ($z, $gridWidth, $gridHeight, $curveType) = @_; | ||||||
|      |      | ||||||
|     ## offset required to create a regular octagram |     ## offset required to create a regular octagram | ||||||
|     ## my $octagramGap = 1 / (1 + sqrt(2)); |     my $octagramGap = 1 / (1 + sqrt(2)); | ||||||
|      |      | ||||||
|     my $octagramGap = 1; |     # my $octagramGap = 1; | ||||||
|      |      | ||||||
|     # sawtooth wave function for range f($z) = [-$octagramGap .. $octagramGap] |     # sawtooth wave function for range f($z) = [-$octagramGap .. $octagramGap] | ||||||
|     my $offset = (abs((fmod($z * sqrt(2), 4)) - 2) - 1) * $octagramGap; |     my $offset = (abs((fmod($z * sqrt(2), 4)) - 2) - 1) * $octagramGap; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci