diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index 73da62d38..0c95d1d24 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -1424,7 +1424,7 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_ update_apply_status(this->invalidate_step(psGCodeExport)); - if (full_config_diff.empty()) { + if (!full_config_diff.empty()) { //BBS: previous empty BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: full_config_diff previous empty, need to apply now.")%__LINE__; diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index d3f7ee2de..78ea46620 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -636,7 +636,7 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionFloat, support_speed)) ((ConfigOptionEnum, support_style)) // BBS - ((ConfigOptionBool, independent_support_layer_height)) + //((ConfigOptionBool, independent_support_layer_height)) ((ConfigOptionBool, thick_bridges)) // Overhang angle threshold. ((ConfigOptionInt, support_threshold_angle)) @@ -902,7 +902,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionBool, has_prime_tower)) ((ConfigOptionFloat, nozzle_volume)) ((ConfigOptionEnum, timelapse_type)) - + // BBS: move from PrintObjectConfig + ((ConfigOptionBool, independent_support_layer_height)) ) // This object is mapped to Perl as Slic3r::Config::Full. diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 775f27484..eec4e5663 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -738,7 +738,7 @@ bool PrintObject::invalidate_state_by_config_options( || opt_key == "support_style" || opt_key == "support_object_xy_distance" || opt_key == "support_base_pattern_spacing" - || opt_key == "independent_support_layer_height" // BBS + //|| opt_key == "independent_support_layer_height" // BBS || opt_key == "support_threshold_angle" || opt_key == "raft_expansion" || opt_key == "raft_first_layer_density" diff --git a/src/libslic3r/Slicing.cpp b/src/libslic3r/Slicing.cpp index 1fb78a180..58bc4b150 100644 --- a/src/libslic3r/Slicing.cpp +++ b/src/libslic3r/Slicing.cpp @@ -119,7 +119,7 @@ SlicingParameters SlicingParameters::create_from_config( if (params.gap_object_support <= 0) params.gap_object_support = params.gap_support_object; - if (!object_config.independent_support_layer_height) { + if (!print_config.independent_support_layer_height) { params.gap_raft_object = std::round(params.gap_raft_object / object_config.layer_height + EPSILON) * object_config.layer_height; params.gap_object_support = std::round(params.gap_object_support / object_config.layer_height + EPSILON) * object_config.layer_height; params.gap_support_object = std::round(params.gap_support_object / object_config.layer_height + EPSILON) * object_config.layer_height; diff --git a/src/libslic3r/SupportMaterial.cpp b/src/libslic3r/SupportMaterial.cpp index 11305cfc7..fbbecdb45 100644 --- a/src/libslic3r/SupportMaterial.cpp +++ b/src/libslic3r/SupportMaterial.cpp @@ -1839,7 +1839,7 @@ static inline std::pairlower_layer->print_z; } else { print_z = layer.bottom_z() - slicing_params.gap_support_object; - height = object_config.independent_support_layer_height ? 0. : object_config.layer_height; + height = print_config.independent_support_layer_height ? 0. : object_config.layer_height; bottom_z = print_z - height; // Ignore this contact area if it's too low. // Don't want to print a layer below the first layer height as it may not stick well. @@ -1870,7 +1870,7 @@ static inline std::pairregion().bridging_height_avg(print_config); bridging_height /= coordf_t(layer.regions().size()); // BBS: align bridging height - if (!object_config.independent_support_layer_height) + if (!print_config.independent_support_layer_height) bridging_height = std::ceil(bridging_height / object_config.layer_height - EPSILON) * object_config.layer_height; coordf_t bridging_print_z = layer.print_z - bridging_height - slicing_params.gap_support_object; if (bridging_print_z >= min_print_z) { @@ -1890,7 +1890,7 @@ static inline std::pairheight = object_config.independent_support_layer_height ? 0. : object_config.layer_height; + bridging_layer->height = print_config.independent_support_layer_height ? 0. : object_config.layer_height; // Don't know the height yet. bridging_layer->bottom_z = bridging_print_z - bridging_layer->height; } @@ -2423,7 +2423,7 @@ static inline PrintObjectSupportMaterial::MyLayer* detect_bottom_contacts( // top shapes so this can be done here //FIXME calculate layer height based on the actual thickness of the layer: // If the layer is extruded with no bridging flow, support just the normal extrusions. - layer_new.height = slicing_params.soluble_interface || !object.config().independent_support_layer_height ? + layer_new.height = slicing_params.soluble_interface || !object.print()->config().independent_support_layer_height ? // Align the interface layer with the object's layer height. layer.upper_layer->height : // Place a bridge flow interface layer or the normal flow interface layer over the top surface. diff --git a/src/libslic3r/SupportMaterial.hpp b/src/libslic3r/SupportMaterial.hpp index 7bb60dd53..fd378d93b 100644 --- a/src/libslic3r/SupportMaterial.hpp +++ b/src/libslic3r/SupportMaterial.hpp @@ -161,7 +161,7 @@ public: bool has_support() const { return m_object_config->enable_support.value || m_object_config->enforce_support_layers; } bool build_plate_only() const { return this->has_support() && m_object_config->support_on_build_plate_only.value; } // BBS - bool synchronize_layers() const { return /*m_slicing_params.soluble_interface && */!m_object_config->independent_support_layer_height.value; } + bool synchronize_layers() const { return /*m_slicing_params.soluble_interface && */!m_print_config->independent_support_layer_height.value; } bool has_contact_loops() const { return m_object_config->support_interface_loop_pattern.value; } // Generate support material for the object. diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index 01374902e..1450ec4db 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -2818,8 +2818,9 @@ void TreeSupport::adjust_layer_heights(std::vector>& contact_ if (contact_nodes.empty()) return; + const PrintConfig& print_config = m_object->print()->config(); const PrintObjectConfig& config = m_object->config(); - if (!config.independent_support_layer_height) { + if (!print_config.independent_support_layer_height) { for (int layer_nr = 0; layer_nr < contact_nodes.size(); layer_nr++) { std::vector& curr_layer_nodes = contact_nodes[layer_nr]; for (Node* node : curr_layer_nodes) {