mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	Fixed conversion from/to imperial units for objects with parts/modifiers
This commit is contained in:
		
							parent
							
								
									d8f45ff1d8
								
							
						
					
					
						commit
						0f9faeda98
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -1050,6 +1050,7 @@ void ModelObject::convert_units(ModelObjectPtrs& new_objects, bool from_imperial | |||
| 
 | ||||
|             ModelVolume* vol = new_object->add_volume(mesh); | ||||
|             vol->name = volume->name; | ||||
|             vol->set_type(volume->type()); | ||||
|             // Don't copy the config's ID.
 | ||||
|             vol->config.assign_config(volume->config); | ||||
|             assert(vol->config.id().valid()); | ||||
|  | @ -1060,7 +1061,7 @@ void ModelObject::convert_units(ModelObjectPtrs& new_objects, bool from_imperial | |||
|             if (volume_idxs.empty() ||  | ||||
|                 std::find(volume_idxs.begin(), volume_idxs.end(), vol_idx) != volume_idxs.end()) { | ||||
|                 vol->scale_geometry_after_creation(versor); | ||||
|                 vol->set_offset(versor.cwiseProduct(vol->get_offset())); | ||||
|                 vol->set_offset(versor.cwiseProduct(volume->get_offset())); | ||||
|             } | ||||
|             else | ||||
|                 vol->set_offset(volume->get_offset()); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 YuSanka
						YuSanka