mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
FIX: Checking support necessity not working
Only early stop detect_overhangs if support is disabled AND not checking support necessity. jira: STUDIO-6158 Change-Id: I2d9662231d941827d6392d57344f7d911f641e09 (cherry picked from commit b811a6031d1afe0e7b1cb73050fe6391a65411ef) (cherry picked from commit fa61ee6abdb4b04a2141b3f8ea9e2e8a789b7881)
This commit is contained in:
parent
a2e5332eef
commit
31a5f0d523
3 changed files with 17 additions and 16 deletions
|
@ -633,13 +633,9 @@ void PrintObject::generate_support_material()
|
|||
if (this->set_started(posSupportMaterial)) {
|
||||
this->clear_support_layers();
|
||||
|
||||
if ((this->has_support() && m_layers.size() > 1) || (this->has_raft() && ! m_layers.empty())) {
|
||||
m_print->set_status(50, L("Generating support"));
|
||||
|
||||
this->_generate_support_material();
|
||||
m_print->throw_if_canceled();
|
||||
} else if(!m_print->get_no_check_flag()) {
|
||||
if(!has_support() && !m_print->get_no_check_flag()) {
|
||||
// BBS: pop a warning if objects have significant amount of overhangs but support material is not enabled
|
||||
// Note: we also need to pop warning if support is disabled and only raft is enabled
|
||||
m_print->set_status(50, L("Checking support necessity"));
|
||||
typedef std::chrono::high_resolution_clock clock_;
|
||||
typedef std::chrono::duration<double, std::ratio<1> > second_;
|
||||
|
@ -669,6 +665,12 @@ void PrintObject::generate_support_material()
|
|||
#endif
|
||||
}
|
||||
|
||||
if ((this->has_support() && m_layers.size() > 1) || (this->has_raft() && !m_layers.empty())) {
|
||||
m_print->set_status(50, L("Generating support"));
|
||||
|
||||
this->_generate_support_material();
|
||||
m_print->throw_if_canceled();
|
||||
}
|
||||
this->set_done(posSupportMaterial);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -625,7 +625,7 @@ TreeSupport::TreeSupport(PrintObject& object, const SlicingParameters &slicing_p
|
|||
|
||||
|
||||
#define SUPPORT_SURFACES_OFFSET_PARAMETERS ClipperLib::jtSquare, 0.
|
||||
void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only)
|
||||
void TreeSupport::detect_overhangs(bool check_support_necessity/* = false*/)
|
||||
{
|
||||
// overhangs are already detected
|
||||
if (m_object->support_layer_count() >= m_object->layer_count())
|
||||
|
@ -636,8 +636,8 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only)
|
|||
// Clear and create Tree Support Layers
|
||||
m_object->clear_support_layers();
|
||||
m_object->clear_tree_support_preview_cache();
|
||||
create_tree_support_layers(tree_support_enable);
|
||||
if (!tree_support_enable)
|
||||
create_tree_support_layers();
|
||||
if (!tree_support_enable && !check_support_necessity)
|
||||
return;
|
||||
|
||||
const PrintObjectConfig& config = m_object->config();
|
||||
|
@ -863,9 +863,11 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only)
|
|||
); // end tbb::parallel_for
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << "max_cantilever_dist=" << max_cantilever_dist;
|
||||
if (check_support_necessity)
|
||||
return;
|
||||
|
||||
// check if the sharp tails should be extended higher
|
||||
if (is_auto(stype) && g_config_support_sharp_tails && !detect_first_sharp_tail_only) {
|
||||
if (is_auto(stype) && g_config_support_sharp_tails) {
|
||||
for (size_t layer_nr = 0; layer_nr < m_object->layer_count(); layer_nr++) {
|
||||
if (m_object->print()->canceled())
|
||||
break;
|
||||
|
@ -1104,7 +1106,7 @@ void TreeSupport::detect_overhangs(bool detect_first_sharp_tail_only)
|
|||
|
||||
// create support layers for raft and tree support
|
||||
// if support is disabled, only raft layers are created
|
||||
void TreeSupport::create_tree_support_layers(bool support_enabled)
|
||||
void TreeSupport::create_tree_support_layers()
|
||||
{
|
||||
int layer_id = 0;
|
||||
coordf_t raft_print_z = 0.f;
|
||||
|
@ -1121,9 +1123,6 @@ void TreeSupport::create_tree_support_layers(bool support_enabled)
|
|||
m_object->add_tree_support_layer(layer_id, m_slicing_params.base_raft_layer_height, raft_print_z, raft_slice_z);
|
||||
}
|
||||
|
||||
if (!support_enabled)
|
||||
return;
|
||||
|
||||
for (Layer *layer : m_object->layers()) {
|
||||
SupportLayer* ts_layer = m_object->add_tree_support_layer(layer_id++, layer->height, layer->print_z, layer->slice_z);
|
||||
if (ts_layer->id() > m_raft_layers) {
|
||||
|
|
|
@ -375,7 +375,7 @@ public:
|
|||
*/
|
||||
void generate();
|
||||
|
||||
void detect_overhangs(bool detect_first_sharp_tail_only=false);
|
||||
void detect_overhangs(bool check_support_necessity = false);
|
||||
|
||||
|
||||
int avg_node_per_layer = 0;
|
||||
|
@ -484,7 +484,7 @@ private:
|
|||
* If a node is already at that position in the layer, the nodes are merged.
|
||||
*/
|
||||
void insert_dropped_node(std::vector<SupportNode*>& nodes_layer, SupportNode* node);
|
||||
void create_tree_support_layers(bool support_enabled=true);
|
||||
void create_tree_support_layers();
|
||||
void generate_toolpaths();
|
||||
// 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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue