去灰程序处理
This commit is contained in:
1 parent
b6273cb912
commit
344bab6448
2 files changed
+8
-2
No files matched your search
@@ -152,7 +152,7 @@ def get_obj_max_foot():
|
|||||||
res = requests.get(f'https://mp.api.suwa3d.com/api/footCode/deleteByPid?pid={pid}')
|
res = requests.get(f'https://mp.api.suwa3d.com/api/footCode/deleteByPid?pid={pid}')
|
||||||
os.system(f'blender -b -P fill_dm_code.py')
|
os.system(f'blender -b -P fill_dm_code.py')
|
||||||
return
|
return
|
||||||
# bpy.ops.wm.save_as_mainfile(filepath=os.path.join(workdir, f'{pid}_{order_id}', f'{pid}_{order_id}.blend'))
|
# bpy.ops.wm.save_as_mainfile(filepath=os.path.join(workdir, f'{pid}_{order_id}', f'{pid}_{order_id}.blend'))
|
||||||
active_object(bpy.data.objects['foot'])
|
active_object(bpy.data.objects['foot'])
|
||||||
foot_points = get_plane_points(bpy.data.objects['foot'])
|
foot_points = get_plane_points(bpy.data.objects['foot'])
|
||||||
# plot(get_plane_points(bpy.data.objects['foot']), 'blue')
|
# plot(get_plane_points(bpy.data.objects['foot']), 'blue')
|
||||||
@@ -163,7 +163,11 @@ def get_obj_max_foot():
|
|||||||
# bpy.ops.mesh.primitive_plane_add(size=1, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
|
# bpy.ops.mesh.primitive_plane_add(size=1, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))
|
||||||
|
|
||||||
# print(f"new_location: {bpy.data.objects['foot'].location}")
|
# print(f"new_location: {bpy.data.objects['foot'].location}")
|
||||||
|
|
||||||
|
#判断 bpy.data.objects['qr'] 是否存在
|
||||||
|
if 'qr' not in bpy.data.objects:
|
||||||
|
return
|
||||||
|
|
||||||
active_object(bpy.data.objects['qr'])
|
active_object(bpy.data.objects['qr'])
|
||||||
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')
|
bpy.ops.object.origin_set(type='ORIGIN_CENTER_OF_MASS', center='MEDIAN')
|
||||||
bpy.data.objects['qr'].rotation_euler[0] = 0
|
bpy.data.objects['qr'].rotation_euler[0] = 0
|
||||||
|
|||||||
@@ -589,6 +589,8 @@ def main(workdir, r, print_id):
|
|||||||
|
|
||||||
# 加入去灰、锐化
|
# 加入去灰、锐化
|
||||||
remove_gray_and_sharpening(jpg_path)
|
remove_gray_and_sharpening(jpg_path)
|
||||||
|
|
||||||
|
shutil.copyfile(jpg_path, os.path.join(workdir,f'{pid}_{order_id}', f"{pid}Tex1_qr.jpg"))
|
||||||
|
|
||||||
#上传脚底板文件 -》 修改为移动脚底板文件
|
#上传脚底板文件 -》 修改为移动脚底板文件
|
||||||
upload_jpg_mtl(pid, order_id, print_id)
|
upload_jpg_mtl(pid, order_id, print_id)
|
||||||
|
|||||||
Reference in new issue
Block a user