FIX: improve tree support generation speed

1. Improve generation speed by removing unnecessary get_avoidance.
2. Fix a bug of hybrid support's interface (Jira: STUDIO-4878,
   STUDIO-4726, Github#2614)
3. Fix a bug of tree support pass through objects (Jira: STUDIO-4252, STUDIO-4608
STUDIO-4298)
4. Fix a bug with first layer + Arachne (Jira: STUDIO-4281, Github #2423)

Change-Id: I40978c93ab93fa6964483514dad552d73a66c710
(cherry picked from commit 2ccbbe49c74d4aab4f086e79a6f8262b7fc80f15)
This commit is contained in:
Arthur
2023-10-23 15:29:16 +08:00
committed by Lane.Wei
parent f76609a2f5
commit d7a4623380
2 changed files with 50 additions and 120 deletions

View File

@@ -505,7 +505,9 @@ private:
Polygons spanning_tree_to_polygon(const std::vector<MinimumSpanningTree>& spanning_trees, Polygons layer_contours, int layer_nr);
Polygons contact_nodes_to_polygon(const std::vector<Node*>& contact_nodes, Polygons layer_contours, int layer_nr, std::vector<double>& radiis, std::vector<bool>& is_interface);
void clear_contact_nodes(std::vector<std::vector<Node*>>& contact_nodes);
// get unscaled radius of node
coordf_t calc_branch_radius(coordf_t base_radius, size_t layers_to_top, size_t tip_layers, double diameter_angle_scale_factor);
// get unscaled radius(mm) of node based on the distance mm to top
coordf_t calc_branch_radius(coordf_t base_radius, coordf_t mm_to_top, double diameter_angle_scale_factor, bool use_min_distance=true);
ExPolygons get_avoidance(coordf_t radius, size_t obj_layer_nr);
ExPolygons get_collision(coordf_t radius, size_t layer_nr);