mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 21:58:03 -06:00
FIX: unsupported cantilever was not warned
1. fix unsupported cantilever was not warned. We need to set support type to stTreeAuto in is_support_necessary() to fully utilize the power of feature detection. 2. fix tree support not generated on non-first plate. Change-Id: I5b8aa827c9d62df0119db4e8e9212f33ce75ddaa (cherry picked from commit 60f21b6fcb45fe56f7fc867a7fcad433282bc055)
This commit is contained in:
parent
05595daf4c
commit
63222d50de
3 changed files with 8 additions and 3 deletions
|
@ -2629,6 +2629,7 @@ SupportNecessaryType PrintObject::is_support_necessary()
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
TreeSupport tree_support(*this, m_slicing_params);
|
TreeSupport tree_support(*this, m_slicing_params);
|
||||||
|
tree_support.support_type = SupportType::stTreeAuto; // need to set support type to fully utilize the power of feature detection
|
||||||
tree_support.detect_overhangs();
|
tree_support.detect_overhangs();
|
||||||
this->clear_support_layers();
|
this->clear_support_layers();
|
||||||
if (tree_support.has_sharp_tails)
|
if (tree_support.has_sharp_tails)
|
||||||
|
|
|
@ -699,14 +699,17 @@ TreeSupport::TreeSupport(PrintObject& object, const SlicingParameters &slicing_p
|
||||||
ipConcentric :
|
ipConcentric :
|
||||||
(m_support_params.interface_density > 0.95 ? ipRectilinear : ipSupportBase);
|
(m_support_params.interface_density > 0.95 ? ipRectilinear : ipSupportBase);
|
||||||
m_support_params.support_extrusion_width = m_object_config->support_line_width.value > 0 ? m_object_config->support_line_width : m_object_config->line_width;
|
m_support_params.support_extrusion_width = m_object_config->support_line_width.value > 0 ? m_object_config->support_line_width : m_object_config->line_width;
|
||||||
is_slim = is_tree_slim(m_object_config->support_type, m_object_config->support_style);
|
support_type = m_object_config->support_type;
|
||||||
|
is_slim = is_tree_slim(support_type, m_object_config->support_style);
|
||||||
MAX_BRANCH_RADIUS = is_slim ? 5.0 : 10.0;
|
MAX_BRANCH_RADIUS = is_slim ? 5.0 : 10.0;
|
||||||
tree_support_branch_diameter_angle = 5.0;//is_slim ? 10.0 : 5.0;
|
tree_support_branch_diameter_angle = 5.0;//is_slim ? 10.0 : 5.0;
|
||||||
// by default tree support needs no infill, unless it's tree hybrid which contains normal nodes.
|
// by default tree support needs no infill, unless it's tree hybrid which contains normal nodes.
|
||||||
with_infill = support_pattern != smpNone && support_pattern != smpDefault;
|
with_infill = support_pattern != smpNone && support_pattern != smpDefault;
|
||||||
const PrintConfig& print_config = m_object->print()->config();
|
const PrintConfig& print_config = m_object->print()->config();
|
||||||
m_machine_border.contour = get_bed_shape_with_excluded_area(print_config);
|
m_machine_border.contour = get_bed_shape_with_excluded_area(print_config);
|
||||||
m_machine_border.translate(-m_object->instances().front().shift); // align with the centered object
|
Vec3d plate_offset = m_object->print()->get_plate_origin();
|
||||||
|
// align with the centered object in current plate (may not be the 1st plate, so need to add the plate offset)
|
||||||
|
m_machine_border.translate(Point(scale_(plate_offset(0)), scale_(plate_offset(1))) - m_object->instances().front().shift);
|
||||||
#ifdef SUPPORT_TREE_DEBUG_TO_SVG
|
#ifdef SUPPORT_TREE_DEBUG_TO_SVG
|
||||||
SVG svg("SVG/machine_boarder.svg", m_object->bounding_box());
|
SVG svg("SVG/machine_boarder.svg", m_object->bounding_box());
|
||||||
if (svg.is_opened()) svg.draw(m_machine_border, "yellow");
|
if (svg.is_opened()) svg.draw(m_machine_border, "yellow");
|
||||||
|
@ -729,7 +732,7 @@ void TreeSupport::detect_overhangs()
|
||||||
|
|
||||||
|
|
||||||
const PrintObjectConfig& config = m_object->config();
|
const PrintObjectConfig& config = m_object->config();
|
||||||
SupportType stype = config.support_type.value;
|
SupportType stype = support_type;
|
||||||
const coordf_t radius_sample_resolution = g_config_tree_support_collision_resolution;
|
const coordf_t radius_sample_resolution = g_config_tree_support_collision_resolution;
|
||||||
const coordf_t extrusion_width = config.line_width.value;
|
const coordf_t extrusion_width = config.line_width.value;
|
||||||
const coordf_t extrusion_width_scaled = scale_(extrusion_width);
|
const coordf_t extrusion_width_scaled = scale_(extrusion_width);
|
||||||
|
|
|
@ -369,6 +369,7 @@ public:
|
||||||
bool has_overhangs = false;
|
bool has_overhangs = false;
|
||||||
bool has_sharp_tails = false;
|
bool has_sharp_tails = false;
|
||||||
bool has_cantilever = false;
|
bool has_cantilever = false;
|
||||||
|
SupportType support_type;
|
||||||
|
|
||||||
std::unique_ptr<FillLightning::Generator> generator;
|
std::unique_ptr<FillLightning::Generator> generator;
|
||||||
std::unordered_map<double, size_t> printZ_to_lightninglayer;
|
std::unordered_map<double, size_t> printZ_to_lightninglayer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue