mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Exclude support from bridged areas
This commit is contained in:
		
							parent
							
								
									7e3024d6ad
								
							
						
					
					
						commit
						148c773319
					
				
					 4 changed files with 33 additions and 4 deletions
				
			
		|  | @ -157,7 +157,7 @@ sub coverage { | |||
|     my ($self, $angle) = @_; | ||||
|      | ||||
|     if (!defined $angle) { | ||||
|         return [] if !defined($angle = $self->detect_angle); | ||||
|         return [] if !defined($angle = $self->angle); | ||||
|     } | ||||
|      | ||||
|     # Clone our expolygon and rotate it so that we work with vertical lines. | ||||
|  | @ -181,6 +181,9 @@ sub coverage { | |||
|         my @polylines = map $_->as_polyline, @{$trapezoid->lines}; | ||||
|         my @supported = @{intersection_pl(\@polylines, [map @$_, @$anchors])}; | ||||
|          | ||||
|         # not nice, we need a more robust non-numeric check | ||||
|         @supported = grep $_->length >= $self->extrusion_width, @supported; | ||||
|          | ||||
|         if (@supported >= 2) { | ||||
|             push @covered, $trapezoid; | ||||
|         } | ||||
|  |  | |||
|  | @ -30,6 +30,9 @@ has 'thin_fills' => (is => 'rw', default => sub { Slic3r::ExtrusionPath::Collect | |||
| # collection of surfaces for infill generation | ||||
| has 'fill_surfaces' => (is => 'rw', default => sub { Slic3r::Surface::Collection->new }); | ||||
| 
 | ||||
| # collection of expolygons representing the bridged areas (thus not needing support material) | ||||
| has 'bridged' => (is => 'rw', default => sub { Slic3r::ExPolygon::Collection->new }); | ||||
| 
 | ||||
| # ordered collection of extrusion paths/loops to build all perimeters | ||||
| has 'perimeters' => (is => 'rw', default => sub { Slic3r::ExtrusionPath::Collection->new }); | ||||
| 
 | ||||
|  | @ -412,6 +415,10 @@ sub process_external_surfaces { | |||
|             ); | ||||
|             Slic3r::debugf "Processing bridge at layer %d:\n", $self->id; | ||||
|             $angle = $bridge_detector->detect_angle; | ||||
|              | ||||
|             if (defined $angle && $self->object->config->support_material) { | ||||
|                 $self->bridged->append(@{ $bridge_detector->coverage($angle) }); | ||||
|             } | ||||
|         } | ||||
|          | ||||
|         push @bottom, map $surface->clone(expolygon => $_, bridge_angle => $angle), @$grown; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci