Fixed tests
This commit is contained in:
parent
9264db7ecd
commit
21ea100d0e
4 changed files with 34 additions and 3 deletions
|
@ -67,12 +67,12 @@ use Slic3r::Test;
|
|||
{
|
||||
my $config = Slic3r::Config->new_from_defaults;
|
||||
$config->set('raft_layers', 3);
|
||||
$config->set('brim_width', 6);
|
||||
$config->set('brim_width', 0);
|
||||
$config->set('skirts', 0);
|
||||
$config->set('support_material_extruder', 2);
|
||||
$config->set('support_material_interface_extruder', 2);
|
||||
$config->set('layer_height', 0.4);
|
||||
$config->set('first_layer_height', '100%');
|
||||
$config->set('first_layer_height', 0.4);
|
||||
my $print = Slic3r::Test::init_print('overhang', config => $config);
|
||||
ok my $gcode = Slic3r::Test::gcode($print), 'no conflict between raft/support and brim';
|
||||
|
||||
|
@ -84,7 +84,7 @@ use Slic3r::Test;
|
|||
$tool = $1;
|
||||
} elsif ($info->{extruding}) {
|
||||
if ($self->Z <= ($config->raft_layers * $config->layer_height)) {
|
||||
fail 'not extruding raft/brim with support material extruder'
|
||||
fail 'not extruding raft with support material extruder'
|
||||
if $tool != ($config->support_material_extruder-1);
|
||||
} else {
|
||||
fail 'support material exceeds raft layers'
|
||||
|
|
|
@ -341,6 +341,31 @@ ExtrusionLoop::has_overhang_point(const Point &point) const
|
|||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ExtrusionLoop::is_perimeter() const
|
||||
{
|
||||
return this->paths.front().role == erPerimeter
|
||||
|| this->paths.front().role == erExternalPerimeter
|
||||
|| this->paths.front().role == erOverhangPerimeter;
|
||||
}
|
||||
|
||||
bool
|
||||
ExtrusionLoop::is_infill() const
|
||||
{
|
||||
return this->paths.front().role == erBridgeInfill
|
||||
|| this->paths.front().role == erInternalInfill
|
||||
|| this->paths.front().role == erSolidInfill
|
||||
|| this->paths.front().role == erTopSolidInfill;
|
||||
}
|
||||
|
||||
bool
|
||||
ExtrusionLoop::is_solid_infill() const
|
||||
{
|
||||
return this->paths.front().role == erBridgeInfill
|
||||
|| this->paths.front().role == erSolidInfill
|
||||
|| this->paths.front().role == erTopSolidInfill;
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
REGISTER_CLASS(ExtrusionLoop, "ExtrusionLoop");
|
||||
#endif
|
||||
|
|
|
@ -97,6 +97,9 @@ class ExtrusionLoop : public ExtrusionEntity
|
|||
void split_at(const Point &point);
|
||||
void clip_end(double distance, ExtrusionPaths* paths) const;
|
||||
bool has_overhang_point(const Point &point) const;
|
||||
bool is_perimeter() const;
|
||||
bool is_infill() const;
|
||||
bool is_solid_infill() const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
%code{% THIS->clip_end(distance, &RETVAL); %};
|
||||
bool has_overhang_point(Point* point)
|
||||
%code{% RETVAL = THIS->has_overhang_point(*point); %};
|
||||
bool is_perimeter();
|
||||
bool is_infill();
|
||||
bool is_solid_infill();
|
||||
%{
|
||||
|
||||
SV*
|
||||
|
|
Loading…
Reference in a new issue