Merge branch 'master' into overhang

This commit is contained in:
Alessandro Ranellucci 2013-05-16 18:36:11 +02:00
commit 61c1045331
7 changed files with 11 additions and 4 deletions

View file

@ -20,7 +20,7 @@ has 'polyline' => (
# height is the vertical thickness of the extrusion expressed in mm
has 'height' => (is => 'rw');
has 'flow_spacing' => (is => 'rw');
has 'flow_spacing' => (is => 'rw', required => 1);
has 'role' => (is => 'rw', required => 1);
use constant EXTR_ROLE_PERIMETER => 0;
@ -244,6 +244,7 @@ sub detect_arcs {
my $arc = Slic3r::ExtrusionPath::Arc->new(
polyline => Slic3r::Polyline->new(\@arc_points),
role => $self->role,
flow_spacing => $self->flow_spacing,
orientation => $orientation,
center => $arc_center,
radius => $arc_center->distance_to($points[$i]),
@ -253,6 +254,7 @@ sub detect_arcs {
push @paths, (ref $self)->new(
polyline => Slic3r::Polyline->new(@points[0..$i]),
role => $self->role,
flow_spacing => $self->flow_spacing,
height => $self->height,
) if $i > 0;
@ -272,6 +274,7 @@ sub detect_arcs {
push @paths, (ref $self)->new(
polyline => Slic3r::Polyline->new(\@points),
role => $self->role,
flow_spacing => $self->flow_spacing,
height => $self->height,
) if @points > 1;

View file

@ -99,7 +99,7 @@ sub _build_width {
sub _build_spacing {
my $self = shift;
my $width = $self->width;
return $width + &Slic3r::OVERLAP_FACTOR * ($width * PI / 4 - $width);
return $width - (&Slic3r::BRIDGE_OVERLAP_FACTOR * $width);
}
1;

View file

@ -699,7 +699,7 @@ sub make_brim {
# JT_SQUARE ensures no vertex is outside the given offset distance
# -0.5 because islands are not represented by their centerlines
# TODO: we need the offset inwards/offset outwards logic to avoid overlapping extrusions
push @loops, offset2(\@islands, ($i - 2) * $flow->scaled_spacing, ($i + 1.5) * $flow->scaled_spacing, undef, JT_SQUARE);
push @loops, offset2(\@islands, ($i - 1.5) * $flow->scaled_spacing, +1.0 * $flow->scaled_spacing, undef, JT_SQUARE);
}
@{$self->brim} = map Slic3r::ExtrusionLoop->pack(

View file

@ -543,6 +543,8 @@ sub get_connected_facets {
sub split_mesh {
my $self = shift;
$self->analyze;
my @meshes = ();
# loop while we have remaining facets