mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 19:28:14 -06:00
Feature Ironing Inset added (#7969)
This commit is contained in:
parent
ac80575b28
commit
7834f78c90
7 changed files with 26 additions and 6 deletions
|
@ -1109,6 +1109,7 @@ void Layer::make_ironing()
|
|||
double height;
|
||||
double speed;
|
||||
double angle;
|
||||
double inset;
|
||||
|
||||
bool operator<(const IroningParams &rhs) const {
|
||||
if (this->extruder < rhs.extruder)
|
||||
|
@ -1135,12 +1136,16 @@ void Layer::make_ironing()
|
|||
return true;
|
||||
if (this->angle > rhs.angle)
|
||||
return false;
|
||||
if (this->inset < rhs.inset)
|
||||
return true;
|
||||
if (this->inset > rhs.inset)
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool operator==(const IroningParams &rhs) const {
|
||||
return this->extruder == rhs.extruder && this->just_infill == rhs.just_infill &&
|
||||
this->line_spacing == rhs.line_spacing && this->height == rhs.height && this->speed == rhs.speed && this->angle == rhs.angle && this->pattern == rhs.pattern;
|
||||
this->line_spacing == rhs.line_spacing && this->height == rhs.height && this->speed == rhs.speed && this->angle == rhs.angle && this->pattern == rhs.pattern && this->inset == rhs.inset;
|
||||
}
|
||||
|
||||
LayerRegion *layerm = nullptr;
|
||||
|
@ -1184,6 +1189,7 @@ void Layer::make_ironing()
|
|||
//TODO just_infill is currently not used.
|
||||
ironing_params.just_infill = false;
|
||||
ironing_params.line_spacing = config.ironing_spacing;
|
||||
ironing_params.inset = config.ironing_inset;
|
||||
ironing_params.height = default_layer_height * 0.01 * config.ironing_flow;
|
||||
ironing_params.speed = config.ironing_speed;
|
||||
ironing_params.angle = (config.ironing_angle >= 0 ? config.ironing_angle : config.infill_direction) * M_PI / 180.;
|
||||
|
@ -1274,7 +1280,9 @@ void Layer::make_ironing()
|
|||
polys = union_safety_offset(polys);
|
||||
}
|
||||
// Trim the top surfaces with half the nozzle diameter.
|
||||
ironing_areas = intersection_ex(polys, offset(this->lslices, - float(scale_(0.5 * nozzle_dmr))));
|
||||
// BBS: ironing inset
|
||||
double ironing_areas_offset = ironing_params.inset == 0 ? float(scale_(0.5 * nozzle_dmr)) : scale_(ironing_params.inset);
|
||||
ironing_areas = intersection_ex(polys, offset(this->lslices, - ironing_areas_offset));
|
||||
}
|
||||
|
||||
// Create the filler object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue