mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Removed dependency on ->object from Region.pm
This commit is contained in:
		
							parent
							
								
									bd8c430afd
								
							
						
					
					
						commit
						57fd6ad563
					
				
					 4 changed files with 8 additions and 6 deletions
				
			
		|  | @ -5,7 +5,7 @@ use Slic3r::Geometry qw(PI); | |||
| 
 | ||||
| has 'layer_id'            => (is => 'rw'); | ||||
| has 'angle'               => (is => 'rw', default => sub { $Slic3r::Config->fill_angle }); | ||||
| has 'bounding_box'        => (is => 'ro', required => 1);  # Slic3r::Geometry::BoundingBox object | ||||
| has 'bounding_box'        => (is => 'ro', required => 0);  # Slic3r::Geometry::BoundingBox object | ||||
| 
 | ||||
| sub angles () { [0, PI/2] } | ||||
| 
 | ||||
|  | @ -16,7 +16,9 @@ sub infill_direction { | |||
|     # set infill angle | ||||
|     my (@rotate, @shift); | ||||
|     $rotate[0] = Slic3r::Geometry::deg2rad($self->angle); | ||||
|     $rotate[1] = $self->bounding_box->center_2D; | ||||
|     $rotate[1] = $self->bounding_box | ||||
|         ? $self->bounding_box->center_2D | ||||
|         : $surface->expolygon->bounding_box->center_2D; | ||||
|     @shift = @{$rotate[1]}; | ||||
|      | ||||
|     if (defined $self->layer_id) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci