mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 20:51:12 -06:00 
			
		
		
		
	Replaced Moose with Moo => big performance boost and easier packaging
This commit is contained in:
		
							parent
							
								
									bf5824781d
								
							
						
					
					
						commit
						26b05ab155
					
				
					 13 changed files with 67 additions and 75 deletions
				
			
		|  | @ -1,30 +1,30 @@ | |||
| package Slic3r::Polyline::Closed; | ||||
| use Moose; | ||||
| use Moo; | ||||
| 
 | ||||
| extends 'Slic3r::Polyline'; | ||||
| 
 | ||||
| has 'contour_of' => ( | ||||
|     is          => 'rw', | ||||
|     isa         => 'Slic3r::Surface', | ||||
|     #isa         => 'Slic3r::Surface', | ||||
|     weak_ref    => 1, | ||||
| ); | ||||
| 
 | ||||
| has 'hole_of' => ( | ||||
|     is          => 'rw', | ||||
|     isa         => 'Slic3r::Surface', | ||||
|     #isa         => 'Slic3r::Surface', | ||||
|     weak_ref    => 1, | ||||
| ); | ||||
| 
 | ||||
| override 'new_from_points' => sub { | ||||
| sub new_from_points { | ||||
|     my $class = shift; | ||||
|     my $polyline = super(); | ||||
|     my $polyline = $class->SUPER::new_from_points(@_); | ||||
|      | ||||
|     # polylines must be always closed, otherwise it means that our object is not manifold! | ||||
|     die "Polylines must be closed! Object not manifold?\n" | ||||
|         if ($polyline->lines->[0]->a != $polyline->lines->[-1]->b); | ||||
|      | ||||
|     return $polyline; | ||||
| }; | ||||
| } | ||||
| 
 | ||||
| sub encloses_point { | ||||
|     my $self = shift; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alessandro Ranellucci
						Alessandro Ranellucci