mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 04:31:15 -06:00 
			
		
		
		
	FIX: WipeTowerIntegration::append_tcr error when slicing
Change-Id: I8055c7c8586fec3dbdc757daf18b740835ce4b13 (cherry picked from commit 5bf6f1b9d5c1ce376bee149df0110d1e44f1d343)
This commit is contained in:
		
							parent
							
								
									82325973f8
								
							
						
					
					
						commit
						aa1bd63d61
					
				
					 7 changed files with 13 additions and 11 deletions
				
			
		|  | @ -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__; | ||||
| 
 | ||||
|  |  | |||
|  | @ -636,7 +636,7 @@ PRINT_CONFIG_CLASS_DEFINE( | |||
|     ((ConfigOptionFloat,               support_speed)) | ||||
|     ((ConfigOptionEnum<SupportMaterialStyle>, 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<TimelapseType>,    timelapse_type)) | ||||
| 
 | ||||
|     // BBS: move from PrintObjectConfig
 | ||||
|     ((ConfigOptionBool, independent_support_layer_height)) | ||||
| ) | ||||
| 
 | ||||
| // This object is mapped to Perl as Slic3r::Config::Full.
 | ||||
|  |  | |||
|  | @ -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" | ||||
|  |  | |||
|  | @ -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; | ||||
|  |  | |||
|  | @ -1839,7 +1839,7 @@ static inline std::pair<PrintObjectSupportMaterial::MyLayer*, PrintObjectSupport | |||
|         bottom_z = (layer_id == 1) ? slicing_params.object_print_z_min : layer.lower_layer->lower_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::pair<PrintObjectSupportMaterial::MyLayer*, PrintObjectSupport | |||
|                 bridging_height += region->region().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::pair<PrintObjectSupportMaterial::MyLayer*, PrintObjectSupport | |||
|                     } else { | ||||
|                         // BBS: if independent_support_layer_height is not enabled, the support layer_height should be the same as layer height.
 | ||||
|                         // Note that for this case, adaptive layer height must be disabled.
 | ||||
|                         bridging_layer->height = 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.
 | ||||
|  |  | |||
|  | @ -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.
 | ||||
|  |  | |||
|  | @ -2818,8 +2818,9 @@ void TreeSupport::adjust_layer_heights(std::vector<std::vector<Node*>>& 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<Node*>& curr_layer_nodes = contact_nodes[layer_nr]; | ||||
|             for (Node* node : curr_layer_nodes) { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 zhimin.zeng
						zhimin.zeng