mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Optimization in Polyline instantiation
This commit is contained in:
		
							parent
							
								
									27c421c27f
								
							
						
					
					
						commit
						8061cc6e30
					
				
					 14 changed files with 40 additions and 45 deletions
				
			
		|  | @ -888,7 +888,7 @@ sub repaint { | |||
|              | ||||
|             # if sequential printing is enabled and we have more than one object | ||||
|             if ($parent->{config}->complete_objects && (map @{$_->instances}, @{$parent->{objects}}) > 1) { | ||||
|             	my $convex_hull = Slic3r::Polygon->new(convex_hull([ map @{$_->contour}, @{$parent->{object_previews}->[-1][2]->expolygons} ])); | ||||
|             	my $convex_hull = Slic3r::Polygon->new(@{convex_hull([ map @{$_->contour}, @{$parent->{object_previews}->[-1][2]->expolygons} ])}); | ||||
|                 my ($clearance) = @{offset([$convex_hull], $parent->{config}->extruder_clearance_radius / 2 * $parent->{scaling_factor}, 100, JT_ROUND)}; | ||||
|                 $dc->SetPen($parent->{clearance_pen}); | ||||
|                 $dc->SetBrush($parent->{transparent_brush}); | ||||
|  | @ -899,7 +899,7 @@ sub repaint { | |||
|      | ||||
|     # draw skirt | ||||
|     if (@{$parent->{object_previews}} && $parent->{config}->skirts) { | ||||
|         my $convex_hull = Slic3r::Polygon->new(convex_hull([ map @{$_->contour}, map @{$_->[2]->expolygons}, @{$parent->{object_previews}} ])); | ||||
|         my $convex_hull = Slic3r::Polygon->new(@{convex_hull([ map @{$_->contour}, map @{$_->[2]->expolygons}, @{$parent->{object_previews}} ])}); | ||||
|         ($convex_hull) = @{offset([$convex_hull], $parent->{config}->skirt_distance * $parent->{scaling_factor}, 100, JT_ROUND)}; | ||||
|         $dc->SetPen($parent->{skirt_pen}); | ||||
|         $dc->SetBrush($parent->{transparent_brush}); | ||||
|  | @ -1098,7 +1098,7 @@ sub _trigger_model_object { | |||
| 	    $self->bounding_box($self->model_object->bounding_box); | ||||
| 	     | ||||
|     	my $mesh = $self->model_object->mesh; | ||||
|         $self->convex_hull(Slic3r::Polygon->new(Math::ConvexHull::MonotoneChain::convex_hull($mesh->used_vertices))); | ||||
|         $self->convex_hull(Slic3r::Polygon->new(@{Math::ConvexHull::MonotoneChain::convex_hull($mesh->used_vertices)})); | ||||
| 	    $self->facets(scalar @{$mesh->facets}); | ||||
| 	    $self->vertices(scalar @{$mesh->vertices}); | ||||
| 	     | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci