mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-10 00:07:52 -06:00
ENH: improve first layer tree support
First layer support can't be top interface, and
min brim width of auto mode should be larger
than 0.
Jira: STUDIO-5010
Change-Id: I02f8b017b535f8a47965387e8679f692b1966e04
(cherry picked from commit 3e7d54abe352e8ab5f9d6492b5a86a96f9067f94)
(cherry picked from commit 7efebe6bc6
)
This commit is contained in:
parent
5fb0e01943
commit
8a7cc79129
2 changed files with 6 additions and 5 deletions
|
@ -2011,7 +2011,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<SupportNode*>>& con
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (layer_nr == 0 && m_raft_layers == 0) {
|
if (layer_nr == 0 && m_raft_layers == 0) {
|
||||||
double brim_width = !config.tree_support_auto_brim ? tree_brim_width : std::max(0.0, std::min(node.radius + node.dist_mm_to_top / (scale * branch_radius) * 0.5, MAX_BRANCH_RADIUS_FIRST_LAYER) - node.radius);
|
double brim_width = !config.tree_support_auto_brim ? tree_brim_width : std::max(MIN_BRANCH_RADIUS_FIRST_LAYER, std::min(node.radius + node.dist_mm_to_top / (scale * branch_radius) * 0.5, MAX_BRANCH_RADIUS_FIRST_LAYER) - node.radius);
|
||||||
auto tmp=offset(circle, scale_(brim_width));
|
auto tmp=offset(circle, scale_(brim_width));
|
||||||
if(!tmp.empty())
|
if(!tmp.empty())
|
||||||
circle = tmp[0];
|
circle = tmp[0];
|
||||||
|
@ -2032,14 +2032,14 @@ void TreeSupport::draw_circles(const std::vector<std::vector<SupportNode*>>& con
|
||||||
has_circle_node = true;
|
has_circle_node = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node.distance_to_top < 0)
|
if (layer_nr>0 && node.distance_to_top < 0)
|
||||||
append(roof_gap_areas, area);
|
append(roof_gap_areas, area);
|
||||||
else if (node.support_roof_layers_below == 1)
|
else if (layer_nr > 0 && node.support_roof_layers_below == 1)
|
||||||
{
|
{
|
||||||
append(roof_1st_layer, area);
|
append(roof_1st_layer, area);
|
||||||
max_layers_above_roof1 = std::max(max_layers_above_roof1, node.dist_mm_to_top);
|
max_layers_above_roof1 = std::max(max_layers_above_roof1, node.dist_mm_to_top);
|
||||||
}
|
}
|
||||||
else if (node.support_roof_layers_below > 0)
|
else if (layer_nr > 0 && node.support_roof_layers_below > 0)
|
||||||
{
|
{
|
||||||
append(roof_areas, area);
|
append(roof_areas, area);
|
||||||
max_layers_above_roof = std::max(max_layers_above_roof, node.dist_mm_to_top);
|
max_layers_above_roof = std::max(max_layers_above_roof, node.dist_mm_to_top);
|
||||||
|
|
|
@ -406,8 +406,9 @@ private:
|
||||||
std::vector< std::unordered_map<Line, bool, LineHash>> m_mst_line_x_layer_contour_caches;
|
std::vector< std::unordered_map<Line, bool, LineHash>> m_mst_line_x_layer_contour_caches;
|
||||||
float DO_NOT_MOVER_UNDER_MM = 0.0;
|
float DO_NOT_MOVER_UNDER_MM = 0.0;
|
||||||
coordf_t MAX_BRANCH_RADIUS = 10.0;
|
coordf_t MAX_BRANCH_RADIUS = 10.0;
|
||||||
coordf_t MAX_BRANCH_RADIUS_FIRST_LAYER = 12.0;
|
|
||||||
coordf_t MIN_BRANCH_RADIUS = 0.5;
|
coordf_t MIN_BRANCH_RADIUS = 0.5;
|
||||||
|
coordf_t MAX_BRANCH_RADIUS_FIRST_LAYER = 12.0;
|
||||||
|
coordf_t MIN_BRANCH_RADIUS_FIRST_LAYER = 2.0;
|
||||||
float tree_support_branch_diameter_angle = 5.0;
|
float tree_support_branch_diameter_angle = 5.0;
|
||||||
coord_t m_min_radius = scale_(1); // in mm
|
coord_t m_min_radius = scale_(1); // in mm
|
||||||
bool is_strong = false;
|
bool is_strong = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue