Ported Layer::merge_slices() to XS

This commit is contained in:
Alessandro Ranellucci 2015-04-16 20:44:55 +02:00
parent 1f8ef2a63c
commit be2f46ca68
4 changed files with 10 additions and 5 deletions

View File

@ -32,11 +32,6 @@ sub regions {
return [ map $self->get_region($_), 0..($self->region_count-1) ];
}
sub merge_slices {
my ($self) = @_;
$_->merge_slices for @{$self->regions};
}
sub make_perimeters {
my $self = shift;
Slic3r::debugf "Making perimeters for layer %d\n", $self->id;

View File

@ -126,6 +126,14 @@ Layer::make_slices()
}
}
void
Layer::merge_slices()
{
FOREACH_LAYERREGION(this, layerm) {
(*layerm)->merge_slices();
}
}
template <class T>
bool
Layer::any_internal_region_slice_contains(const T &item) const

View File

@ -95,6 +95,7 @@ class Layer {
LayerRegion* add_region(PrintRegion* print_region);
void make_slices();
void merge_slices();
template <class T> bool any_internal_region_slice_contains(const T &item) const;
template <class T> bool any_bottom_region_slice_contains(const T &item) const;

View File

@ -71,6 +71,7 @@
%code%{ RETVAL = (int)(intptr_t)THIS; %};
void make_slices();
void merge_slices();
bool any_internal_region_slice_contains_polyline(Polyline* polyline)
%code%{ RETVAL = THIS->any_internal_region_slice_contains(*polyline); %};
bool any_bottom_region_slice_contains_polyline(Polyline* polyline)