mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-19 06:41:14 -06:00
NEW: add tree_support_brim_width option
Jira: STUDIO-2921 Change-Id: Id5fddc0b6f5ffe3beb9afb0be5f81a766fc5b21e (cherry picked from commit 86d7b6016e48143aad03744a58d44042ff0a0b4c)
This commit is contained in:
parent
297e922daf
commit
3d1f61c7ed
8 changed files with 19 additions and 8 deletions
|
@ -740,7 +740,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"flush_into_infill", "flush_into_objects", "flush_into_support",
|
||||
// BBS
|
||||
"tree_support_branch_angle", "tree_support_wall_count", "tree_support_branch_distance",
|
||||
"tree_support_branch_diameter",
|
||||
"tree_support_branch_diameter","tree_support_brim_width",
|
||||
"detect_narrow_internal_solid_infill",
|
||||
"gcode_add_line_number", "enable_arc_fitting", "infill_combination", /*"adaptive_layer_height",*/
|
||||
"support_bottom_interface_spacing", "enable_overhang_speed", "overhang_1_4_speed", "overhang_2_4_speed", "overhang_3_4_speed", "overhang_4_4_speed",
|
||||
|
|
|
@ -2790,6 +2790,16 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionInt(1));
|
||||
|
||||
def = this->add("tree_support_brim_width", coFloat);
|
||||
def->label = L("Tree support brim width");
|
||||
def->category = L("Support");
|
||||
def->tooltip = L("The brim width around tree support. 0 means auto.");
|
||||
def->sidetext = L("mm");
|
||||
def->min = 0;
|
||||
def->max = 100;
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0));
|
||||
|
||||
def = this->add("nozzle_temperature", coInts);
|
||||
def->label = L("Other layers");
|
||||
def->tooltip = L("Nozzle temperature for layers after the initial one");
|
||||
|
|
|
@ -685,6 +685,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionFloat, tree_support_branch_diameter))
|
||||
((ConfigOptionFloat, tree_support_branch_angle))
|
||||
((ConfigOptionInt, tree_support_wall_count))
|
||||
((ConfigOptionFloat, tree_support_brim_width))
|
||||
((ConfigOptionBool, detect_narrow_internal_solid_infill))
|
||||
// ((ConfigOptionBool, adaptive_layer_height))
|
||||
((ConfigOptionFloat, support_bottom_interface_spacing))
|
||||
|
|
|
@ -770,6 +770,7 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "tree_support_branch_distance"
|
||||
|| opt_key == "tree_support_branch_diameter"
|
||||
|| opt_key == "tree_support_branch_angle"
|
||||
|| opt_key == "tree_support_brim_width"
|
||||
|| opt_key == "tree_support_wall_count") {
|
||||
steps.emplace_back(posSupportMaterial);
|
||||
} else if (
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue