Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Arc.pm « ExtrusionPath « Slic3r « lib - github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 59c65c75c21d50a5058a216410b6f955af05fa41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package Slic3r::ExtrusionPath::Arc;
use Moo;

extends 'Slic3r::ExtrusionPath';

has 'center' => (is => 'ro', required => 1);
has 'radius' => (is => 'ro', required => 1);
has 'orientation' => (is => 'ro', required => 1);  # cw/ccw

use Slic3r::Geometry qw(PI angle3points);

sub angle {
    my $self = shift;
    return angle3points($self->center, @{$self->points});
}

sub length {
    my $self = shift;
    
    return $self->radius * $self->angle;
}

1;