mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Ported point_along_segment(), Polyline::length(), Polyline::clip_end() to XS
This commit is contained in:
		
							parent
							
								
									26a18a2a52
								
							
						
					
					
						commit
						29b83517cb
					
				
					 12 changed files with 64 additions and 57 deletions
				
			
		|  | @ -264,8 +264,7 @@ sub extrude_loop { | |||
|         # the rotation of the second segment so we might cross the object boundary | ||||
|         my $first_segment = Slic3r::Line->new(@{$extrusion_path->polyline}[0,1]); | ||||
|         my $distance = min(scale $extrusion_path->flow_spacing, $first_segment->length); | ||||
|         my $point = Slic3r::Geometry::point_along_segment(@$first_segment, $distance); | ||||
|         $point = Slic3r::Point->new(@$point); | ||||
|         my $point = $first_segment->point_at($distance); | ||||
|         $point->rotate($angle, $extrusion_path->first_point); | ||||
|          | ||||
|         # generate the travel move | ||||
|  | @ -474,8 +473,8 @@ sub retract { | |||
|     my $wipe_path; | ||||
|     if ($self->extruder->wipe && $self->wipe_path) { | ||||
|         my @points = @{$self->wipe_path}; | ||||
|         $wipe_path = Slic3r::Polyline->new($self->last_pos, @{$self->wipe_path}[1..$#{$self->wipe_path}]) | ||||
|             ->clip_start($self->extruder->scaled_wipe_distance); | ||||
|         $wipe_path = Slic3r::Polyline->new($self->last_pos, @{$self->wipe_path}[1..$#{$self->wipe_path}]); | ||||
|         $wipe_path->clip_end($wipe_path->length - $self->extruder->scaled_wipe_distance); | ||||
|     } | ||||
|      | ||||
|     # prepare moves | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci