Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/CuraEngine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemco Burema <r.burema@ultimaker.com>2022-05-12 10:42:36 +0300
committerRemco Burema <r.burema@ultimaker.com>2022-05-12 10:42:36 +0300
commit6a7c0749b8b0dbbddae40369cd174a9be1be37c4 (patch)
tree9c3a42f25a9d89ba0f50f91ba983aad577dc7093
parentd26020e5ffbd02c5c930759d75398669dc8e10ef (diff)
Define 'too long' line segments as twice the lenght of smallest.
Should fix microsegemtns for occurrences of 'line segments slightly longer than the minimum' and 'small line segments but longer than 5 micron' occurring together often. Which in turn should fix those microsegments that still cause blobs at least on UM printers.
-rw-r--r--src/utils/ExtrusionLine.cpp2
-rw-r--r--src/utils/polygon.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/ExtrusionLine.cpp b/src/utils/ExtrusionLine.cpp
index 6523b4428..cdfb5ce90 100644
--- a/src/utils/ExtrusionLine.cpp
+++ b/src/utils/ExtrusionLine.cpp
@@ -136,7 +136,7 @@ void ExtrusionLine::simplify(const coord_t smallest_line_segment_squared, const
&& height_2 <= allowed_error_distance_squared) // Removing the junction (vertex) doesn't introduce too much error.
{
const coord_t next_length2 = vSize2(current - next);
- if (next_length2 > smallest_line_segment_squared)
+ if (next_length2 > 4 * smallest_line_segment_squared)
{
// Special case; The next line is long. If we were to remove this, it could happen that we get quite noticeable artifacts.
// We should instead move this point to a location where both edges are kept and then remove the previous point that we wanted to keep.
diff --git a/src/utils/polygon.cpp b/src/utils/polygon.cpp
index 9b2fbc83f..1e68fab49 100644
--- a/src/utils/polygon.cpp
+++ b/src/utils/polygon.cpp
@@ -540,7 +540,7 @@ void PolygonRef::_simplify(const coord_t smallest_line_segment_squared, const co
&& height_2 <= allowed_error_distance_squared) // removing the vertex doesn't introduce too much error.)
{
const coord_t next_length2 = vSize2(current - next);
- if (next_length2 > smallest_line_segment_squared)
+ if (next_length2 > 4 * smallest_line_segment_squared)
{
// Special case; The next line is long. If we were to remove this, it could happen that we get quite noticeable artifacts.
// We should instead move this point to a location where both edges are kept and then remove the previous point that we wanted to keep.