mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Merge branch 'high-res-perimeters'
Conflicts: lib/Slic3r/Extruder.pm
This commit is contained in:
		
						commit
						1cb515a8e5
					
				
					 7 changed files with 28 additions and 4 deletions
				
			
		|  | @ -45,9 +45,10 @@ our $perimeter_feed_rate        = 30;   # mm/sec | |||
| our $bottom_layer_speed_ratio   = 0.3; | ||||
| 
 | ||||
| # accuracy options | ||||
| our $resolution         = 0.00000001; | ||||
| our $layer_height       = 0.4; | ||||
| our $thickness_ratio    = 1; | ||||
| our $resolution             = 0.00000001; | ||||
| our $layer_height           = 0.4; | ||||
| our $high_res_perimeters    = 0; | ||||
| our $thickness_ratio        = 1; | ||||
| our $flow_width; | ||||
| 
 | ||||
| # print options | ||||
|  |  | |||
|  | @ -59,6 +59,10 @@ our $Options = { | |||
|         label   => 'Layer height (mm)', | ||||
|         type    => 'f', | ||||
|     }, | ||||
|     'high_res_perimeters' => { | ||||
|         label   => 'High-res perimeters', | ||||
|         type    => 'bool', | ||||
|     }, | ||||
|      | ||||
|     # print options | ||||
|     'perimeter_offsets' => { | ||||
|  |  | |||
|  | @ -4,6 +4,7 @@ use Moo; | |||
| has 'shift_x'            => (is => 'ro', default => sub {0} ); | ||||
| has 'shift_y'            => (is => 'ro', default => sub {0} ); | ||||
| has 'z'                  => (is => 'rw', default => sub {0} ); | ||||
| has 'flow_ratio'         => (is => 'rw', default => sub {1}); | ||||
| 
 | ||||
| has 'extrusion_distance' => (is => 'rw', default => sub {0} ); | ||||
| has 'retracted'          => (is => 'rw', default => sub {1} );  # this spits out some plastic at start | ||||
|  | @ -90,6 +91,7 @@ sub extrude { | |||
|         my $e = $line->a->distance_to($line->b) * $Slic3r::resolution | ||||
|             * (($Slic3r::nozzle_diameter**2) / ($Slic3r::filament_diameter ** 2)) | ||||
|             * $Slic3r::thickness_ratio  | ||||
|             * $self->flow_ratio | ||||
|             * $Slic3r::filament_packing_density; | ||||
|          | ||||
|         $gcode .= $self->G1($line->b, undef, $e, $description); | ||||
|  |  | |||
|  | @ -29,7 +29,7 @@ sub new { | |||
|         ), | ||||
|         accuracy => Slic3r::GUI::OptionsGroup->new($self, | ||||
|             title => 'Accuracy', | ||||
|             options => [qw(layer_height)], | ||||
|             options => [qw(layer_height high_res_perimeters)], | ||||
|         ), | ||||
|         print => Slic3r::GUI::OptionsGroup->new($self, | ||||
|             title => 'Print settings', | ||||
|  |  | |||
|  | @ -211,6 +211,18 @@ sub export_gcode { | |||
|     # write gcode commands layer by layer | ||||
|     foreach my $layer (@{ $self->layers }) { | ||||
|          | ||||
|         # with the --high-res-perimeters options enabled we extrude perimeters for | ||||
|         # each layer twice at half height | ||||
|         if ($Slic3r::high_res_perimeters && $layer->id > 0) { | ||||
|             # go to half-layer | ||||
|             printf $fh $extruder->move_z($Slic3r::z_offset + $layer->z * $Slic3r::resolution - $Slic3r::layer_height/2); | ||||
|              | ||||
|             # extrude perimeters | ||||
|             $extruder->flow_ratio(0.5); | ||||
|             printf $fh $extruder->extrude_loop($_, 'perimeter') for @{ $layer->perimeters }; | ||||
|             $extruder->flow_ratio(1); | ||||
|         } | ||||
|          | ||||
|         # go to layer | ||||
|         printf $fh $extruder->move_z($Slic3r::z_offset + $layer->z * $Slic3r::resolution); | ||||
|          | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci