mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-11-02 20:51:23 -07:00 
			
		
		
		
	Fixed #1244 - c++ part
This commit is contained in:
		
							parent
							
								
									51cf964b51
								
							
						
					
					
						commit
						025fdc1359
					
				
					 3 changed files with 9 additions and 0 deletions
				
			
		| 
						 | 
					@ -988,6 +988,11 @@ const TriangleMesh& ModelVolume::get_convex_hull() const
 | 
				
			||||||
    return m_convex_hull;
 | 
					    return m_convex_hull;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					TriangleMesh& ModelVolume::get_convex_hull()
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    return m_convex_hull;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ModelVolume::Type ModelVolume::type_from_string(const std::string &s)
 | 
					ModelVolume::Type ModelVolume::type_from_string(const std::string &s)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    // Legacy support
 | 
					    // Legacy support
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -196,6 +196,7 @@ public:
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    void calculate_convex_hull();
 | 
					    void calculate_convex_hull();
 | 
				
			||||||
    const TriangleMesh& get_convex_hull() const;
 | 
					    const TriangleMesh& get_convex_hull() const;
 | 
				
			||||||
 | 
					    TriangleMesh& get_convex_hull();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // Helpers for loading / storing into AMF / 3MF files.
 | 
					    // Helpers for loading / storing into AMF / 3MF files.
 | 
				
			||||||
    static Type         type_from_string(const std::string &s);
 | 
					    static Type         type_from_string(const std::string &s);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1235,7 +1235,10 @@ void load_part(	ModelObject* model_object,
 | 
				
			||||||
				part_names.Add(new_volume->name);
 | 
									part_names.Add(new_volume->name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (delta != Vec3d::Zero())
 | 
					                if (delta != Vec3d::Zero())
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
                    new_volume->mesh.translate((float)delta(0), (float)delta(1), (float)delta(2));
 | 
					                    new_volume->mesh.translate((float)delta(0), (float)delta(1), (float)delta(2));
 | 
				
			||||||
 | 
					                    new_volume->get_convex_hull().translate((float)delta(0), (float)delta(1), (float)delta(2));
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                // set a default extruder value, since user can't add it manually
 | 
					                // set a default extruder value, since user can't add it manually
 | 
				
			||||||
                new_volume->config.set_key_value("extruder", new ConfigOptionInt(0));
 | 
					                new_volume->config.set_key_value("extruder", new ConfigOptionInt(0));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue