mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-10 23:38:41 -07:00
Preparing to add curled extrusions identification
This commit is contained in:
parent
7346d3ef42
commit
f30a18d658
4 changed files with 22 additions and 8 deletions
|
|
@ -4529,7 +4529,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
std::vector<ProcessedPoint> new_points {};
|
std::vector<ProcessedPoint> new_points {};
|
||||||
|
|
||||||
if (m_config.enable_overhang_speed && !m_config.overhang_speed_classic && !this->on_first_layer() &&
|
if (m_config.enable_overhang_speed && !m_config.overhang_speed_classic && !this->on_first_layer() &&
|
||||||
is_perimeter(path.role())) {
|
(is_bridge(path.role()) || is_perimeter(path.role()))) {
|
||||||
double out_wall_ref_speed = m_config.get_abs_value("outer_wall_speed");
|
double out_wall_ref_speed = m_config.get_abs_value("outer_wall_speed");
|
||||||
ConfigOptionPercents overhang_overlap_levels({75, 50, 25, 13, 12.99, 0});
|
ConfigOptionPercents overhang_overlap_levels({75, 50, 25, 13, 12.99, 0});
|
||||||
ConfigOptionFloatsOrPercents dynamic_overhang_speeds(
|
ConfigOptionFloatsOrPercents dynamic_overhang_speeds(
|
||||||
|
|
@ -4545,13 +4545,8 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||||
(m_config.get_abs_value("overhang_4_4_speed") < 0.5) ?
|
(m_config.get_abs_value("overhang_4_4_speed") < 0.5) ?
|
||||||
FloatOrPercent{100, true} :
|
FloatOrPercent{100, true} :
|
||||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed") * 100 / out_wall_ref_speed, true},
|
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed") * 100 / out_wall_ref_speed, true},
|
||||||
(m_config.get_abs_value("overhang_4_4_speed") < 0.5) ?
|
FloatOrPercent{m_config.get_abs_value("bridge_speed") * 100 / out_wall_ref_speed, true},
|
||||||
FloatOrPercent{100, true} :
|
FloatOrPercent{m_config.get_abs_value("bridge_speed") * 100 / out_wall_ref_speed, true}});
|
||||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed") * 100 / out_wall_ref_speed, true},
|
|
||||||
(m_config.get_abs_value("overhang_4_4_speed") < 0.5) ?
|
|
||||||
FloatOrPercent{100, true} :
|
|
||||||
FloatOrPercent{m_config.get_abs_value("overhang_4_4_speed") * 100 / out_wall_ref_speed, true}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (out_wall_ref_speed == 0)
|
if (out_wall_ref_speed == 0)
|
||||||
out_wall_ref_speed = EXTRUDER_CONFIG(filament_max_volumetric_speed) / _mm3_per_mm;
|
out_wall_ref_speed = EXTRUDER_CONFIG(filament_max_volumetric_speed) / _mm3_per_mm;
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,8 @@ class ExtrusionQualityEstimator
|
||||||
{
|
{
|
||||||
std::unordered_map<const PrintObject *, AABBTreeLines::LinesDistancer<Linef>> prev_layer_boundaries;
|
std::unordered_map<const PrintObject *, AABBTreeLines::LinesDistancer<Linef>> prev_layer_boundaries;
|
||||||
std::unordered_map<const PrintObject *, AABBTreeLines::LinesDistancer<Linef>> next_layer_boundaries;
|
std::unordered_map<const PrintObject *, AABBTreeLines::LinesDistancer<Linef>> next_layer_boundaries;
|
||||||
|
std::unordered_map<const PrintObject *, AABBTreeLines::LinesDistancer<CurledLine>> prev_curled_extrusions;
|
||||||
|
std::unordered_map<const PrintObject *, AABBTreeLines::LinesDistancer<CurledLine>> next_curled_extrusions;
|
||||||
const PrintObject *current_object;
|
const PrintObject *current_object;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -258,6 +260,8 @@ public:
|
||||||
const PrintObject *object = obj;
|
const PrintObject *object = obj;
|
||||||
prev_layer_boundaries[object] = next_layer_boundaries[object];
|
prev_layer_boundaries[object] = next_layer_boundaries[object];
|
||||||
next_layer_boundaries[object] = AABBTreeLines::LinesDistancer<Linef>{to_unscaled_linesf(layer->lslices)};
|
next_layer_boundaries[object] = AABBTreeLines::LinesDistancer<Linef>{to_unscaled_linesf(layer->lslices)};
|
||||||
|
prev_curled_extrusions[object] = next_curled_extrusions[object];
|
||||||
|
next_curled_extrusions[object] = AABBTreeLines::LinesDistancer<CurledLine>{layer->curled_lines};
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<ProcessedPoint> estimate_extrusion_quality(const ExtrusionPath &path,
|
std::vector<ProcessedPoint> estimate_extrusion_quality(const ExtrusionPath &path,
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,9 @@ public:
|
||||||
coordf_t height; // layer height in unscaled coordinates
|
coordf_t height; // layer height in unscaled coordinates
|
||||||
coordf_t bottom_z() const { return this->print_z - this->height; }
|
coordf_t bottom_z() const { return this->print_z - this->height; }
|
||||||
|
|
||||||
|
//Extrusions estimated to be seriously malformed, estimated during "Estimating curled extrusions" step. These lines should be avoided during fast travels.
|
||||||
|
CurledLines curled_lines;
|
||||||
|
|
||||||
// BBS
|
// BBS
|
||||||
mutable ExPolygons sharp_tails;
|
mutable ExPolygons sharp_tails;
|
||||||
mutable ExPolygons cantilevers;
|
mutable ExPolygons cantilevers;
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,18 @@ public:
|
||||||
double a_width, b_width;
|
double a_width, b_width;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CurledLine : public Line
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CurledLine() : curled_height(0.0f) {}
|
||||||
|
CurledLine(const Point& a, const Point& b) : Line(a, b), curled_height(0.0f) {}
|
||||||
|
CurledLine(const Point& a, const Point& b, float curled_height) : Line(a, b), curled_height(curled_height) {}
|
||||||
|
|
||||||
|
float curled_height;
|
||||||
|
};
|
||||||
|
|
||||||
|
using CurledLines = std::vector<CurledLine>;
|
||||||
|
|
||||||
class Line3
|
class Line3
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue