NEW: add tree_support_brim_width option

Jira: STUDIO-2921

Change-Id: Id5fddc0b6f5ffe3beb9afb0be5f81a766fc5b21e
(cherry picked from commit 86d7b6016e48143aad03744a58d44042ff0a0b4c)
This commit is contained in:
Arthur 2023-05-16 14:55:50 +08:00 committed by Lane.Wei
parent 297e922daf
commit 3d1f61c7ed
8 changed files with 19 additions and 8 deletions

View file

@ -33,8 +33,6 @@
namespace Slic3r
{
#define unscale_(val) ((val) * SCALING_FACTOR)
#define FIRST_LAYER_EXPANSION 1.2
inline unsigned int round_divide(unsigned int dividend, unsigned int divisor) //!< Return dividend divided by divisor rounded to the nearest integer
{
@ -2020,7 +2018,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
const bool with_lightning_infill = m_support_params.base_fill_pattern == ipLightning;
coordf_t support_extrusion_width = m_support_params.support_extrusion_width;
const size_t wall_count = config.tree_support_wall_count.value;
const float tree_brim_width = config.tree_support_brim_width.value;
const PrintObjectConfig& object_config = m_object->config();
BOOST_LOG_TRIVIAL(info) << "draw_circles for object: " << m_object->model_object()->name;
@ -2110,7 +2108,7 @@ void TreeSupport::draw_circles(const std::vector<std::vector<Node*>>& contact_no
}
}
if (layer_nr == 0 && m_raft_layers == 0) {
double brim_width = layers_to_top * layer_height / (scale * branch_radius) * 0.5;
double brim_width = tree_brim_width > 0 ? tree_brim_width : layers_to_top * layer_height / (scale * branch_radius) * 0.5;
circle = offset(circle, scale_(brim_width))[0];
}
area.emplace_back(ExPolygon(circle));