diff --git a/post_pro/merge_obj.py b/post_pro/merge_obj.py index 45c21e8..89c68ca 100644 --- a/post_pro/merge_obj.py +++ b/post_pro/merge_obj.py @@ -292,6 +292,17 @@ class MergeObj: def merge_grid_obj(self, grid_points: Dict[tuple, pd.DataFrame], translations: Dict[tuple, tuple]): """合并所有网格的OBJ模型""" + if len(grid_points) == 1: + grid_id = list(grid_points.keys())[0] + shutil.copytree(os.path.join(self.output_dir, + f"grid_{grid_id[0]}_{grid_id[1]}", + "project", + "odm_texturing"), + os.path.join(self.output_dir, "texturing")) + os.rename(os.path.join(self.output_dir, "texturing", "odm_textured_model_geo.obj"), + os.path.join(self.output_dir, "texturing", "textured_model.obj")) + return + try: # 创建输出目录 output_model_dir = os.path.join(self.output_dir, "texturing")