Fixed wrong countours for multipart objects in cut dialog 3D view

This commit is contained in:
Enrico Turri 2018-04-25 15:16:39 +02:00
parent 1a4827ba33
commit 8096ef6844

View File

@ -227,12 +227,14 @@ sub _update {
push @objects, $self->{model_object}; push @objects, $self->{model_object};
} }
my $z_cut = $z + $self->{model_object}->bounding_box->z_min;
# get section contour # get section contour
my @expolygons = (); my @expolygons = ();
foreach my $volume (@{$self->{model_object}->volumes}) { foreach my $volume (@{$self->{model_object}->volumes}) {
next if !$volume->mesh; next if !$volume->mesh;
next if $volume->modifier; next if $volume->modifier;
my $expp = $volume->mesh->slice([ $z + $volume->mesh->bounding_box->z_min ])->[0]; my $expp = $volume->mesh->slice([ $z_cut ])->[0];
push @expolygons, @$expp; push @expolygons, @$expp;
} }
foreach my $expolygon (@expolygons) { foreach my $expolygon (@expolygons) {