mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Remove unused methods
This commit is contained in:
		
							parent
							
								
									44d91774a6
								
							
						
					
					
						commit
						92ab53868e
					
				
					 4 changed files with 1 additions and 59 deletions
				
			
		| 
						 | 
				
			
			@ -178,7 +178,7 @@ sub extrude_path {
 | 
			
		|||
        foreach my $line ($path->lines) {
 | 
			
		||||
            my $line_length = $line->length;
 | 
			
		||||
            $path_length += $line_length;
 | 
			
		||||
            $gcode .= $self->G1($line->b, undef, $e * unscale $line_length, $description);
 | 
			
		||||
            $gcode .= $self->G1($line->[B], undef, $e * unscale $line_length, $description);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -14,14 +14,6 @@ sub new {
 | 
			
		|||
    return $self;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub a { $_[0][0] }
 | 
			
		||||
sub b { $_[0][1] }
 | 
			
		||||
 | 
			
		||||
sub coordinates {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return ($self->a->coordinates, $self->b->coordinates);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub boost_linestring {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return Boost::Geometry::Utils::linestring($self);
 | 
			
		||||
| 
						 | 
				
			
			@ -35,27 +27,6 @@ sub coincides_with {
 | 
			
		|||
        || ($self->a->coincides_with($line->b) && $self->b->coincides_with($line->a));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub has_endpoint {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    my ($point) = @_;
 | 
			
		||||
    return $point->coincides_with($self->a) || $point->coincides_with($self->b);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub has_segment {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    my ($line) = @_;
 | 
			
		||||
    
 | 
			
		||||
    # a segment belongs to another segment if its points belong to it
 | 
			
		||||
    return Slic3r::Geometry::point_in_segment($line->[0], $self)
 | 
			
		||||
        && Slic3r::Geometry::point_in_segment($line->[1], $self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub parallel_to {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    my ($line) = @_;
 | 
			
		||||
    return Slic3r::Geometry::lines_parallel($self, $line);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub length {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return Slic3r::Geometry::line_length($self);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -23,20 +23,6 @@ sub clone {
 | 
			
		|||
    return (ref $self)->new(@$self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub cast {
 | 
			
		||||
    my $class = shift;
 | 
			
		||||
    if (ref $_[0] eq 'Slic3r::Point') {
 | 
			
		||||
        return $_[0];
 | 
			
		||||
    } else {
 | 
			
		||||
        return $class->new(@_);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub coordinates {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return @$self;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub coincides_with {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    my ($point) = @_;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -40,11 +40,6 @@ sub deserialize {
 | 
			
		|||
    return $class->new(map [ $v[2*$_], $v[2*$_+1] ], 0 .. int($#v/2));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub is_serialized {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return (reftype $self) eq 'SCALAR' ? 1 : 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub lines {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    return polyline_lines($self);
 | 
			
		||||
| 
						 | 
				
			
			@ -105,16 +100,6 @@ sub nearest_point_index_to {
 | 
			
		|||
    return Slic3r::Geometry::nearest_point_index($point, $self);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub has_segment {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    my ($line) = @_;
 | 
			
		||||
    
 | 
			
		||||
    for ($self->lines) {
 | 
			
		||||
        return 1 if $_->has_segment($line);
 | 
			
		||||
    }
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
sub clip_with_polygon {
 | 
			
		||||
    my $self = shift;
 | 
			
		||||
    my ($polygon) = @_;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue