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:
authorCasper Lamboo <c.lamboo@ultimaker.com>2022-04-20 18:00:42 +0300
committerGitHub <noreply@github.com>2022-04-20 18:00:42 +0300
commit275cc97732c0c63e48c380087429d1c5ce3ad857 (patch)
tree0e13f2b8c3612ad36f3851a5d3132e943e0029b3
parentb3123ff6350fd06dfe82ea9670baf2059b9c01e4 (diff)
Apply suggestions from code review
Co-authored-by: Jelle Spijker <j.spijker@ultimaker.com>
-rw-r--r--src/TreeSupport.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/TreeSupport.cpp b/src/TreeSupport.cpp
index 5329bab6a..157dc3eb1 100644
--- a/src/TreeSupport.cpp
+++ b/src/TreeSupport.cpp
@@ -320,9 +320,10 @@ void TreeSupport::dropNodes(std::vector<std::vector<Node*>>& contact_nodes)
}();
//Avoid collisions.
- const coord_t maximum_move_between_samples = maximum_move_distance + radius_sample_resolution + 100; //100 micron extra for rounding errors.
- Polygons avoidance = group_index == 0 ? volumes_.getAvoidance(branch_radius_node, layer_nr - 1) : volumes_.getCollision(branch_radius_node, layer_nr - 1);
- PolygonUtils::moveOutside(avoidance, next_position, radius_sample_resolution + 100, maximum_move_between_samples * maximum_move_between_samples);
+ constexpr size_t rounding_compensation = 100;
+ const coord_t maximum_move_between_samples = maximum_move_distance + radius_sample_resolution + rounding_compensation;
+ const Polygons avoidance = group_index == 0 ? volumes_.getAvoidance(branch_radius_node, layer_nr - 1) : volumes_.getCollision(branch_radius_node, layer_nr - 1);
+ PolygonUtils::moveOutside(avoidance, next_position, radius_sample_resolution + rounding_compensation, maximum_move_between_samples * maximum_move_between_samples);
Node* neighbour = nodes_per_part[group_index][neighbours[0]];
size_t new_distance_to_top = std::max(node.distance_to_top, neighbour->distance_to_top) + 1;