分布式处理和脚底板文件

This commit is contained in:
dongchangxi committed 2023-11-09 11:27:00 +08:00
1 parent f4254f0051
commit 2c036235a6
19 files changed
+1932 -56

No files matched your search

+17 -15
View File
@@ -24,6 +24,10 @@ def make3d(pid):
if get_rcver() == 1: # old version
#修改重建区域的大小
common.change_rcbox_s(pid,"0.999")
#获取影棚id
# psid = libs.getPSid(pid)
# if int(psid) == 80:
# change_rcbox_deepth(str(pid),0.03)
simplify_value = 1000000 * libs.getHeadCount(pid)
add_photo3 = ' '
@@ -112,21 +116,6 @@ def make3d(pid):
cmd = shlex.split(cmd)
res = subprocess.run(cmd)
#阻塞判断是否导出完成
while True:
#判断 output 目录下是否存在 三个文件
files = os.listdir(os.path.join(config.workdir, pid, "output"))
if len(files) >= 3:
break
#2023-10-27为了解决老版本使用step1 的 重建区域框的问题,这里加入了 -set "sfmEnableCameraPrior=True" -align -set "sfmEnableCameraPrior=False" align 使相机的对齐线统一向下后,再进行重建区域的设置
# cmd = f'{config.rcbin} {config.r1["init"]} -load "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -update \
# -set "sfmEnableCameraPrior=True" -align -set "sfmEnableCameraPrior=False" -align -setReconstructionRegion "{os.path.join(config.workdir, pid, f"{pid}.rcbox")}" \
# -mvs -modelSelectMaximalConnectedComponent -renameModel {pid} -modelInvertSelection -modelRemoveSelectedTriangles -closeHoles -clean -simplify {simplify_value} -smooth -unwrap -calculateTexture -save "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" -exportModel "{pid}" "{os.path.join(config.workdir, pid, "output", f"{pid}.obj")}" "d:\\make2\\config\\ModelExportParams102.xml" -quit'
# print(cmd)
# cmd = shlex.split(cmd)
# res = subprocess.run(cmd)
else: # new version
@@ -135,6 +124,11 @@ def make3d(pid):
calulate_type = 'calculateHighModel'
else:
calulate_type = 'calculateNormalModel'
#创建指定文件夹
if not os.path.exists(os.path.join(config.workdir, pid, "output")):
os.makedirs(os.path.join(config.workdir, pid, "output"))
cmd = f'{config.rcbin} {config.r2["init"]} -setInstanceName {pid} \
-load "{os.path.join(config.workdir, pid, f"{pid}.rcproj")}" \
-{calulate_type} \
@@ -145,6 +139,14 @@ def make3d(pid):
cmd = shlex.split(cmd)
res = subprocess.run(cmd)
#阻塞判断是否导出完成
while True:
#判断 output 目录下是否存在 三个文件
files = os.listdir(os.path.join(config.workdir, pid, "output"))
if len(files) >= 3:
break
def step2(pid,task_distributed_id=""):
print(f'{time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())} pid: {pid} 开始建模任务step2')