mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Make angle increment (i.e. angle resolution) configurable
This commit is contained in:
		
							parent
							
								
									20ca6cea05
								
							
						
					
					
						commit
						627f23d5fe
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		|  | @ -8,6 +8,7 @@ use Slic3r::Geometry::Clipper qw(intersection_pl intersection_ex); | |||
| has 'lower_slices'      => (is => 'rw', required => 1);  # ExPolygons or ExPolygonCollection | ||||
| has 'perimeter_flow'    => (is => 'rw', required => 1); | ||||
| has 'infill_flow'       => (is => 'rw', required => 1); | ||||
| has 'resolution' =>     => (is => 'rw', default => sub { PI/36 }); | ||||
| 
 | ||||
| sub detect_angle { | ||||
|     my ($self, $expolygon) = @_; | ||||
|  | @ -69,9 +70,8 @@ sub detect_angle { | |||
|             # bridge in several directions and then sum the length of lines having both | ||||
|             # endpoints within anchors | ||||
|             my %directions = ();  # angle => score | ||||
|             my $angle_increment = PI/36; # 5° | ||||
|             my $line_increment = $self->infill_flow->scaled_width; | ||||
|             for (my $angle = 0; $angle < PI; $angle += $angle_increment) { | ||||
|             for (my $angle = 0; $angle < PI; $angle += $self->resolution) { | ||||
|                 my $my_inset   = [ map $_->clone, @$inset ]; | ||||
|                 my $my_anchors = [ map $_->clone, @$anchors ]; | ||||
|                  | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci