Skip to content

Commit

Permalink
UPDATE: save_meshes_dir
Browse files Browse the repository at this point in the history
  • Loading branch information
jungtaekkim committed Nov 9, 2020
1 parent 32d6b4a commit 33791dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src_rendering/save_meshes_dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@

def save_meshes(str_source, str_meshes, str_files):
for str_file in str_files:
print('Creating {}'.format(str_file[:-4]))
str_brick = os.path.join(str_source, str_file)
str_meshes_ = os.path.join(str_meshes, str_file[:-4])

if not os.path.exists(str_meshes_):
os.mkdir(str_meshes_)
else:
continue

print('Creating {}'.format(str_file[:-4]))
str_save = os.path.join(str_meshes_, str_file)
str_save = str_save[:-4] + '_{}.ply'

Expand Down Expand Up @@ -87,7 +89,7 @@ def save_meshes(str_source, str_meshes, str_files):
if not os.path.exists(str_meshes_):
os.mkdir(str_meshes_)

str_save = os.path.join(str_meshes_, 'single_brick_1.ply')
o3d.io.write_triangle_mesh(str_save, mesh_brick, write_ascii=True)
str_save = os.path.join(str_meshes_, 'single_brick_1.ply')
o3d.io.write_triangle_mesh(str_save, mesh_brick, write_ascii=True)

save_meshes(constants.PATH_DATASET, constants.PATH_MESHES, str_files_dataset)

0 comments on commit 33791dd

Please sign in to comment.