mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	Customizable overlap ratio (it defaults to 0.15 now)
This commit is contained in:
		
							parent
							
								
									9f6be233f8
								
							
						
					
					
						commit
						d9a70ea80d
					
				
					 15 changed files with 67 additions and 42 deletions
				
			
		|  | @ -3,6 +3,7 @@ use Moo; | |||
| 
 | ||||
| extends 'Slic3r::Fill::Base'; | ||||
| 
 | ||||
| use Slic3r::Geometry qw(scale); | ||||
| use XXX; | ||||
| 
 | ||||
| sub fill_surface { | ||||
|  | @ -11,8 +12,8 @@ sub fill_surface { | |||
|      | ||||
|     # no rotation is supported for this infill pattern | ||||
|      | ||||
|     my $flow_width_res = $params{flow_width} / $Slic3r::resolution; | ||||
|     my $distance = $flow_width_res / $params{density}; | ||||
|     my $scaled_flow_spacing = scale $params{flow_spacing}; | ||||
|     my $distance = $scaled_flow_spacing / $params{density}; | ||||
|      | ||||
|     my @contour_loops = (); | ||||
|     my @hole_loops = (); | ||||
|  | @ -43,7 +44,7 @@ sub fill_surface { | |||
|         my $path = $loop->split_at($cur_pos); | ||||
|          | ||||
|         # clip the path to avoid the extruder to get exactly on the first point of the loop | ||||
|         $path->clip_end($Slic3r::flow_width / $Slic3r::resolution); | ||||
|         $path->clip_end(scale $Slic3r::flow_spacing); | ||||
|          | ||||
|         push @paths, $path->p; | ||||
|     } | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ use Moo; | |||
| 
 | ||||
| extends 'Slic3r::Fill::Base'; | ||||
| 
 | ||||
| use Slic3r::Geometry qw(bounding_box X1 Y1 X2 Y2); | ||||
| use Slic3r::Geometry qw(scale bounding_box X1 Y1 X2 Y2); | ||||
| use XXX; | ||||
| 
 | ||||
| sub multiplier () { 1 } | ||||
|  | @ -27,7 +27,7 @@ sub fill_surface { | |||
|     my $rotate_vector = $self->infill_direction($surface); | ||||
|     $self->rotate_points($expolygon, $rotate_vector); | ||||
|      | ||||
|     my $distance_between_lines = $params{flow_width} / $Slic3r::resolution / $params{density} * $self->multiplier; | ||||
|     my $distance_between_lines = scale $params{flow_spacing} / $params{density} * $self->multiplier; | ||||
|     my $bounding_box = [ bounding_box(map @$_, $expolygon) ]; | ||||
|     my $bounding_box_polygon = Slic3r::Polygon->new([ | ||||
|         [ $bounding_box->[X1], $bounding_box->[Y1] ], | ||||
|  |  | |||
|  | @ -19,7 +19,7 @@ sub fill_surface { | |||
|     $bounding_box->[X1] += scale 0.1; | ||||
|     $bounding_box->[X2] -= scale 0.1; | ||||
|      | ||||
|     my $min_spacing = scale $params{flow_width}; | ||||
|     my $min_spacing = scale $params{flow_spacing}; | ||||
|     my $distance_between_lines = $min_spacing / $params{density}; | ||||
|     my $line_oscillation = $distance_between_lines - $min_spacing; | ||||
|      | ||||
|  |  | |||
|  | @ -3,7 +3,7 @@ use Moo; | |||
| 
 | ||||
| extends 'Slic3r::Fill::Base'; | ||||
| 
 | ||||
| use Slic3r::Geometry qw(X1 Y1 X2 Y2 A B X Y); | ||||
| use Slic3r::Geometry qw(scale X1 Y1 X2 Y2 A B X Y); | ||||
| use XXX; | ||||
| 
 | ||||
| sub fill_surface { | ||||
|  | @ -16,7 +16,7 @@ sub fill_surface { | |||
|     my $rotate_vector = $self->infill_direction($surface); | ||||
|     $self->rotate_points($polygons, $rotate_vector); | ||||
|      | ||||
|     my $distance_between_lines = $params{flow_width} / $Slic3r::resolution / $params{density}; | ||||
|     my $distance_between_lines = scale $params{flow_spacing} / $params{density}; | ||||
|     my $number_of_lines = int(0.99999999 + $self->max_print_dimension / $distance_between_lines); # ceil | ||||
| 
 | ||||
|     #printf "distance = %f\n", $distance_between_lines; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci