Ported some more methods to C++

This commit is contained in:
Alessandro Ranellucci 2014-08-08 21:48:59 +02:00
parent 678112b926
commit 5a96bad8c2
9 changed files with 61 additions and 50 deletions

View file

@ -158,21 +158,6 @@ sub _arrange {
);
}
# makes sure all objects have at least one instance
sub add_default_instances {
my ($self) = @_;
# apply a default position to all objects not having one
my $added = 0;
foreach my $object (@{$self->objects}) {
if ($object->instances_count == 0) {
$object->add_instance(offset => Slic3r::Pointf->new(0,0));
$added = 1;
}
}
return $added;
}
# this returns the bounding box of the *transformed* instances
sub bounding_box {
my $self = shift;
@ -535,16 +520,6 @@ sub unique_materials {
return sort keys %materials;
}
sub facets_count {
my $self = shift;
return sum(map $_->mesh->facets_count, grep !$_->modifier, @{$self->volumes});
}
sub needed_repair {
my $self = shift;
return (first { !$_->mesh->needed_repair } grep !$_->modifier, @{$self->volumes}) ? 0 : 1;
}
sub mesh_stats {
my $self = shift;