mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Ported Slic3r::GCode::OozePrevention storage to XS
This commit is contained in:
		
							parent
							
								
									b43dd92766
								
							
						
					
					
						commit
						280f3f38d7
					
				
					 8 changed files with 42 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -195,6 +195,7 @@ sub thread_cleanup {
 | 
			
		|||
    *Slic3r::ExtrusionPath::Collection::DESTROY = sub {};
 | 
			
		||||
    *Slic3r::Flow::DESTROY                  = sub {};
 | 
			
		||||
    *Slic3r::GCode::AvoidCrossingPerimeters::DESTROY = sub {};
 | 
			
		||||
    *Slic3r::GCode::OozePrevention::DESTROY = sub {};
 | 
			
		||||
    *Slic3r::GCode::PlaceholderParser::DESTROY = sub {};
 | 
			
		||||
    *Slic3r::GCode::Wipe::DESTROY           = sub {};
 | 
			
		||||
    *Slic3r::GCode::Writer::DESTROY         = sub {};
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -504,13 +504,11 @@ sub set_extruder {
 | 
			
		|||
}
 | 
			
		||||
 | 
			
		||||
package Slic3r::GCode::OozePrevention;
 | 
			
		||||
use Moo;
 | 
			
		||||
use strict;
 | 
			
		||||
use warnings;
 | 
			
		||||
 | 
			
		||||
use Slic3r::Geometry qw(scale);
 | 
			
		||||
 | 
			
		||||
has 'enable'            => (is => 'rw', default => sub { 0 });
 | 
			
		||||
has 'standby_points'    => (is => 'rw');
 | 
			
		||||
 | 
			
		||||
sub pre_toolchange {
 | 
			
		||||
    my ($self, $gcodegen) = @_;
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -212,8 +212,8 @@ sub export {
 | 
			
		|||
            }
 | 
			
		||||
            my $convex_hull = convex_hull([ map @$_, @skirts ]);
 | 
			
		||||
            
 | 
			
		||||
            $gcodegen->ooze_prevention->enable(1);
 | 
			
		||||
            $gcodegen->ooze_prevention->standby_points(
 | 
			
		||||
            $gcodegen->ooze_prevention->set_enable(1);
 | 
			
		||||
            $gcodegen->ooze_prevention->set_standby_points(
 | 
			
		||||
                [ map @{$_->equally_spaced_points(scale 10)}, @{offset([$convex_hull], scale 3)} ]
 | 
			
		||||
            );
 | 
			
		||||
            
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue