Use support material layer height for raft layer instead of object layer height. #2723
This commit is contained in:
parent
d8ee9dd5f5
commit
8654537e55
@ -57,7 +57,16 @@ sub slice {
|
||||
# plus the extra distance required by the support material logic
|
||||
my $first_layer_height = $self->config->get_value('first_layer_height');
|
||||
$print_z += $first_layer_height;
|
||||
$print_z += $self->config->layer_height * ($self->config->raft_layers - 1);
|
||||
|
||||
# use a large height
|
||||
my $support_material_layer_height;
|
||||
{
|
||||
my @nozzle_diameters = (
|
||||
map $self->print->config->get_at('nozzle_diameter', $_), @{$self->print->support_material_extruders}
|
||||
);
|
||||
$support_material_layer_height = 0.75 * min(@nozzle_diameters);
|
||||
}
|
||||
$print_z += $support_material_layer_height * ($self->config->raft_layers - 1);
|
||||
|
||||
# compute the average of all nozzles used for printing the object
|
||||
my $nozzle_diameter;
|
||||
|
@ -322,11 +322,10 @@ Print::object_extruders() const
|
||||
|
||||
// returns 0-based indices of used extruders
|
||||
std::set<size_t>
|
||||
Print::extruders() const
|
||||
Print::support_material_extruders() const
|
||||
{
|
||||
std::set<size_t> extruders = this->object_extruders();
|
||||
std::set<size_t> extruders;
|
||||
|
||||
// add support material extruder(s)
|
||||
FOREACH_OBJECT(this, object) {
|
||||
if ((*object)->has_support_material()) {
|
||||
extruders.insert((*object)->config.support_material_extruder - 1);
|
||||
@ -337,6 +336,18 @@ Print::extruders() const
|
||||
return extruders;
|
||||
}
|
||||
|
||||
// returns 0-based indices of used extruders
|
||||
std::set<size_t>
|
||||
Print::extruders() const
|
||||
{
|
||||
std::set<size_t> extruders = this->object_extruders();
|
||||
|
||||
std::set<size_t> s_extruders = this->support_material_extruders();
|
||||
extruders.insert(s_extruders.begin(), s_extruders.end());
|
||||
|
||||
return extruders;
|
||||
}
|
||||
|
||||
void
|
||||
Print::_simplify_slices(double distance)
|
||||
{
|
||||
|
@ -199,6 +199,7 @@ class Print
|
||||
Flow skirt_flow() const;
|
||||
|
||||
std::set<size_t> object_extruders() const;
|
||||
std::set<size_t> support_material_extruders() const;
|
||||
std::set<size_t> extruders() const;
|
||||
void _simplify_slices(double distance);
|
||||
double max_allowed_layer_height() const;
|
||||
|
@ -169,6 +169,14 @@ _constant()
|
||||
RETVAL.push_back(*e);
|
||||
}
|
||||
%};
|
||||
std::vector<int> support_material_extruders()
|
||||
%code%{
|
||||
std::set<size_t> extruders = THIS->support_material_extruders();
|
||||
RETVAL.reserve(extruders.size());
|
||||
for (std::set<size_t>::const_iterator e = extruders.begin(); e != extruders.end(); ++e) {
|
||||
RETVAL.push_back(*e);
|
||||
}
|
||||
%};
|
||||
std::vector<int> extruders()
|
||||
%code%{
|
||||
std::set<size_t> extruders = THIS->extruders();
|
||||
|
Loading…
Reference in New Issue
Block a user