mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-30 20:21:12 -06:00 
			
		
		
		
	#7011 - Follow-up of 3ee259b602 - Modified volumes' indices rebase
				
					
				
			This commit is contained in:
		
							parent
							
								
									3ee259b602
								
							
						
					
					
						commit
						80f28538c5
					
				
					 1 changed files with 9 additions and 4 deletions
				
			
		|  | @ -1915,16 +1915,21 @@ namespace Slic3r { | |||
| 
 | ||||
|             int min_id = faces.front()[0]; | ||||
|             int max_id = faces.front()[0]; | ||||
|             for (Vec3i& face : faces) { | ||||
|                 for (int& tri_id : face) { | ||||
|             for (const Vec3i& face : faces) { | ||||
|                 for (const int tri_id : face) { | ||||
|                     if (tri_id < 0 || tri_id >= geometry.vertices.size()) { | ||||
|                         add_error("Found invalid vertex id"); | ||||
|                         return false; | ||||
|                     } | ||||
|                     min_id = std::min(min_id, tri_id); | ||||
|                     max_id = std::max(max_id, tri_id); | ||||
|                     // rebase index to the current vertices list
 | ||||
|                     tri_id -= processed_vertices_max_id; | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|             // rebase indices to the current vertices list
 | ||||
|             for (Vec3i& face : faces) { | ||||
|                 for (int& tri_id : face) { | ||||
|                     tri_id -= min_id; | ||||
|                 } | ||||
|             } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 enricoturri1966
						enricoturri1966