mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	Make plater work with XS data in single-thread environment
This commit is contained in:
		
							parent
							
								
									87a5de193d
								
							
						
					
					
						commit
						fb7cea3cb9
					
				
					 3 changed files with 7 additions and 5 deletions
				
			
		|  | @ -94,6 +94,7 @@ sub union_ex { | |||
|     my ($polygons, $jointype, $safety_offset) = @_; | ||||
|     $jointype = PFT_NONZERO unless defined $jointype; | ||||
|     $clipper->clear; | ||||
|     $polygons = $polygons->arrayref if ref $polygons eq 'Slic3r::ExPolygon::XS'; | ||||
|     $clipper->add_subject_polygons($safety_offset ? safety_offset($polygons) : $polygons); | ||||
|     return [ | ||||
|         map Slic3r::ExPolygon::XS->new($_->{outer}, @{$_->{holes}}), | ||||
|  |  | |||
|  | @ -533,6 +533,7 @@ sub horizontal_projection { | |||
|     my $scale_vector = Math::Clipper::integerize_coordinate_sets({ bits => 32 }, @f); | ||||
|     $_->make_counter_clockwise for @f;  # do this after scaling, as winding order might change while doing that | ||||
|     my $union = union_ex([ Slic3r::Geometry::Clipper::offset(\@f, 10000) ]); | ||||
|     $union = [ map $_->arrayref, @$union ]; | ||||
|     Math::Clipper::unscale_coordinate_sets($scale_vector, $_) for @$union; | ||||
|     return $union; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci