Skip to content

Commit

Permalink
Ported PrintObject::detect_surfaces_type() to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
alranel committed Nov 26, 2018
1 parent f2e2c9a commit 1cc8a8d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
12 changes: 0 additions & 12 deletions lib/Slic3r/Print/Object.pm
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ sub support_layers {
return [ map $self->get_support_layer($_), 0..($self->support_layer_count - 1) ];
}

# This will assign a type (top/bottom/internal) to $layerm->slices
# and transform $layerm->fill_surfaces from expolygon
# to typed top/bottom/internal surfaces;
sub detect_surfaces_type {
my ($self) = @_;

# prerequisites
$self->slice;

$self->_detect_surfaces_type;
}

sub prepare_infill {
my ($self) = @_;

Expand Down
5 changes: 4 additions & 1 deletion xs/src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,11 +329,14 @@ PrintObject::has_support_material() const
|| this->config.support_material_enforce_layers > 0;
}

// This will assign a type (top/bottom/internal) to layerm->slices
// and transform layerm->fill_surfaces from expolygon
// to typed top/bottom/internal surfaces;
void
PrintObject::detect_surfaces_type()
{
// prerequisites
// this->slice();
this->slice();

if (this->state.is_done(posDetectSurfaces)) return;
this->state.set_started(posDetectSurfaces);
Expand Down
2 changes: 1 addition & 1 deletion xs/xsp/Print.xsp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ _constant()
void set_step_started(PrintObjectStep step)
%code%{ THIS->state.set_started(step); %};

%name{_detect_surfaces_type} void detect_surfaces_type();
void detect_surfaces_type();
void process_external_surfaces();
void bridge_over_infill();
void combine_infill();
Expand Down

0 comments on commit 1cc8a8d

Please sign in to comment.