| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -12,10 +12,11 @@ import os | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					保存id到 ../name_list.txt | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					''' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					def get_valid_ids(): | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					def get_valid_ids(check_pt_exists=False): | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    # 定义路径 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    mesh_dir = "../gt_mesh_" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    mesh_dir = "../gt_mesh" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    point_dir = "../gt_point" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    pt_dir = "../output_data" | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    # 获取所有可能的ID | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    obj_files = [f for f in os.listdir(mesh_dir) if f.endswith('.obj')] | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -28,14 +29,14 @@ def get_valid_ids(): | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        has_obj = os.path.exists(os.path.join(mesh_dir, f"{id}.obj")) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        has_xyz = os.path.exists(os.path.join(point_dir, f"{id}_50k.xyz")) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        has_ptangle = os.path.exists(os.path.join(point_dir, f"{id}.ptangle")) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					         | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if has_obj and has_xyz and has_ptangle: | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        has_pt = not check_pt_exists or os.path.exists(os.path.join(pt_dir, f"{id}.pt")) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        if has_obj and has_xyz and has_ptangle and has_pt: | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            valid_ids.append(id) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    return valid_ids | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					if __name__ == "__main__": | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    valid_ids = get_valid_ids() | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    valid_ids = get_valid_ids(check_pt_exists=True) | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    print(f"找到 {len(valid_ids)} 个有效ID:") | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					     | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    # 保存到文件 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |