mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 12:11:15 -06:00 
			
		
		
		
	When the support extruders are set to 0, support is printed with the current material without a tool change.
A fix of support path generator.
This commit is contained in:
		
							parent
							
								
									4e90ae9a28
								
							
						
					
					
						commit
						4ab972b87a
					
				
					 7 changed files with 77 additions and 53 deletions
				
			
		|  | @ -480,7 +480,9 @@ sub process_layer { | |||
|         # and also because we avoid travelling on other things when printing it | ||||
|         if ($layer->isa('Slic3r::Layer::Support')) { | ||||
|             if ($layer->support_interface_fills->count > 0) { | ||||
|                 $gcode .= $self->_gcodegen->set_extruder($object->config->support_material_interface_extruder-1); | ||||
|                 # Don't change extruder if the extruder is set to 0. Use the current extruder instead. | ||||
|                 $gcode .= $self->_gcodegen->set_extruder($object->config->support_material_interface_extruder-1) | ||||
|                     if ($object->config->support_material_interface_extruder > 0); | ||||
|                 for my $path (@{$layer->support_interface_fills->chained_path_from($self->_gcodegen->last_pos, 0)}) { | ||||
|                     if ($path->isa('Slic3r::ExtrusionMultiPath')) { | ||||
|                         $gcode .= $self->_gcodegen->extrude_multipath($path, 'support material interface', $object->config->get_abs_value('support_material_interface_speed')); | ||||
|  | @ -490,7 +492,9 @@ sub process_layer { | |||
|                 } | ||||
|             } | ||||
|             if ($layer->support_fills->count > 0) { | ||||
|                 $gcode .= $self->_gcodegen->set_extruder($object->config->support_material_extruder-1); | ||||
|                 # Don't change extruder if the extruder is set to 0. Use the current extruder instead. | ||||
|                 $gcode .= $self->_gcodegen->set_extruder($object->config->support_material_extruder-1) | ||||
|                     if ($object->config->support_material_extruder > 0); | ||||
|                 for my $path (@{$layer->support_fills->chained_path_from($self->_gcodegen->last_pos, 0)}) { | ||||
|                     if ($path->isa('Slic3r::ExtrusionMultiPath')) { | ||||
|                         $gcode .= $self->_gcodegen->extrude_multipath($path, 'support material', $object->config->get_abs_value('support_material_speed')); | ||||
|  |  | |||
|  | @ -150,6 +150,7 @@ sub prepare_infill { | |||
|     # Decide what surfaces are to be filled. | ||||
|     # Here the S_TYPE_TOP / S_TYPE_BOTTOMBRIDGE / S_TYPE_BOTTOM infill is turned to just S_TYPE_INTERNAL if zero top / bottom infill layers are configured. | ||||
|     # Also tiny S_TYPE_INTERNAL surfaces are turned to S_TYPE_INTERNAL_SOLID. | ||||
| #    BOOST_LOG_TRIVIAL(info) << "Preparing fill surfaces..."; | ||||
|     $_->prepare_fill_surfaces for map @{$_->regions}, @{$self->layers}; | ||||
| 
 | ||||
|     # this will detect bridges and reverse bridges | ||||
|  | @ -262,28 +263,8 @@ sub generate_support_material { | |||
|      | ||||
|     if (($self->config->support_material || $self->config->raft_layers > 0) && scalar(@{$self->layers}) > 1) { | ||||
|         $self->print->status_cb->(85, "Generating support material");     | ||||
|         if (0) { | ||||
|             # Old supports, Perl implementation. | ||||
|             my $first_layer_flow = Slic3r::Flow->new_from_width( | ||||
|                 width               => ($self->print->config->first_layer_extrusion_width || $self->config->support_material_extrusion_width), | ||||
|                 role                => FLOW_ROLE_SUPPORT_MATERIAL, | ||||
|                 nozzle_diameter     => $self->print->config->nozzle_diameter->[ $self->config->support_material_extruder-1 ] | ||||
|                                         // $self->print->config->nozzle_diameter->[0], | ||||
|                 layer_height        => $self->config->get_abs_value('first_layer_height'), | ||||
|                 bridge_flow_ratio   => 0, | ||||
|             );             | ||||
|             my $support_material = Slic3r::Print::SupportMaterial->new( | ||||
|                 print_config        => $self->print->config, | ||||
|                 object_config       => $self->config, | ||||
|                 first_layer_flow    => $first_layer_flow, | ||||
|                 flow                => $self->support_material_flow, | ||||
|                 interface_flow      => $self->support_material_flow(FLOW_ROLE_SUPPORT_MATERIAL_INTERFACE), | ||||
|             ); | ||||
|             $support_material->generate($self); | ||||
|         } else { | ||||
|             # New supports, C++ implementation. | ||||
|             $self->_generate_support_material; | ||||
|         } | ||||
|         # New supports, C++ implementation. | ||||
|         $self->_generate_support_material; | ||||
|     } | ||||
|      | ||||
|     $self->set_step_done(STEP_SUPPORTMATERIAL); | ||||
|  | @ -727,6 +708,8 @@ sub _simplify_slices { | |||
|     } | ||||
| } | ||||
| 
 | ||||
| # Used by t/support.t and by GCode.pm to export support line width as a comment. | ||||
| # To be removed. | ||||
| sub support_material_flow { | ||||
|     my ($self, $role) = @_; | ||||
|      | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 bubnikv
						bubnikv