|
@@ -9,8 +9,6 @@ has 'layer_height' => (is => 'ro', default => sub { $Slic3r::Config->layer_
|
|
|
|
|
|
has 'width' => (is => 'rwp', builder => 1);
|
|
|
has 'spacing' => (is => 'lazy');
|
|
|
-has 'bridge_width' => (is => 'lazy');
|
|
|
-has 'bridge_spacing' => (is => 'lazy');
|
|
|
has 'scaled_width' => (is => 'lazy');
|
|
|
has 'scaled_spacing' => (is => 'lazy');
|
|
|
|
|
@@ -73,25 +71,32 @@ sub clone {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
-sub _build_bridge_width {
|
|
|
+sub _build_scaled_width {
|
|
|
my $self = shift;
|
|
|
- return sqrt($Slic3r::Config->bridge_flow_ratio * ($self->nozzle_diameter**2));
|
|
|
+ return scale $self->width;
|
|
|
}
|
|
|
|
|
|
-sub _build_bridge_spacing {
|
|
|
+sub _build_scaled_spacing {
|
|
|
my $self = shift;
|
|
|
- my $width = $self->bridge_width;
|
|
|
- return $width + &Slic3r::OVERLAP_FACTOR * ($width * PI / 4 - $width);
|
|
|
+ return scale $self->spacing;
|
|
|
}
|
|
|
|
|
|
-sub _build_scaled_width {
|
|
|
+
|
|
|
+package Slic3r::Flow::Bridge;
|
|
|
+use Moo;
|
|
|
+extends 'Slic3r::Flow';
|
|
|
+
|
|
|
+use Slic3r::Geometry qw(PI);
|
|
|
+
|
|
|
+sub _build_width {
|
|
|
my $self = shift;
|
|
|
- return scale $self->width;
|
|
|
+ return sqrt($Slic3r::Config->bridge_flow_ratio * ($self->nozzle_diameter**2));
|
|
|
}
|
|
|
|
|
|
-sub _build_scaled_spacing {
|
|
|
+sub _build_spacing {
|
|
|
my $self = shift;
|
|
|
- return scale $self->spacing;
|
|
|
+ my $width = $self->width;
|
|
|
+ return $width + &Slic3r::OVERLAP_FACTOR * ($width * PI / 4 - $width);
|
|
|
}
|
|
|
|
|
|
1;
|