mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	Avoid expensive TriangleMesh BUILD method during clone.
Gives 6% speedup and uses less memory when slicing yoda.stl and should give significantly bigger speedup on more complex models and plates.
This commit is contained in:
		
							parent
							
								
									a86c48d85c
								
							
						
					
					
						commit
						7979dd9e9c
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		|  | @ -3,6 +3,7 @@ use Moo; | |||
| 
 | ||||
| use Slic3r::Geometry qw(X Y Z A B unscale same_point); | ||||
| use Slic3r::Geometry::Clipper qw(union_ex); | ||||
| use Storable; | ||||
| 
 | ||||
| # public | ||||
| has 'vertices'      => (is => 'ro', required => 1);         # id => [$x,$y,$z] | ||||
|  | @ -92,11 +93,7 @@ sub merge { | |||
| } | ||||
| 
 | ||||
| sub clone { | ||||
|     my $self = shift; | ||||
|     return (ref $self)->new( | ||||
|         vertices => [ map [ @$_ ], @{$self->vertices} ], | ||||
|         facets   => [ map [ @$_ ], @{$self->facets} ], | ||||
|     ); | ||||
|   Storable::dclone($_[0]) | ||||
| } | ||||
| 
 | ||||
| sub _facet_edges { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Mark Hindess
						Mark Hindess