Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9769e54fb | ||
|
|
66884a071d | ||
|
|
587eb4bbcc | ||
|
|
2358b9e02b | ||
|
|
b8b9846ddb |
No files matched your search
@@ -55,6 +55,7 @@ def reload_obj(pid, action):
|
||||
|
||||
def cal_weight(obj, size):
|
||||
# 统一缩放到9cm标准尺寸
|
||||
print(f"obj.dimensions.z === {obj.dimensions.z}")
|
||||
scale = size / obj.dimensions.z
|
||||
obj.scale = (scale, scale, scale)
|
||||
bpy.ops.object.transform_apply(scale=True)
|
||||
@@ -69,6 +70,7 @@ def cal_weight(obj, size):
|
||||
return model_info["weight"]
|
||||
|
||||
def main(action, pid, sizes,orderId=0):
|
||||
print(f"下载{pid},{action}")
|
||||
libs.down_obj_from_oss(config.workdir, pid, action)
|
||||
obj = reload_obj(pid, action)
|
||||
|
||||
@@ -163,7 +165,7 @@ if __name__ == '__main__':
|
||||
|
||||
sizes = []
|
||||
#根据真实身高计算不同的比例的高度
|
||||
arrBiLie = [["1/4",1/4],["1/6",1/6],["1/8",1/8],["1/10",1/10],["1/12",1/12],["1/16",1/16],["1/18",1/18],["1/24",1/24],["1/32",1/32],["1/43",1/43],["1/64",1/64]]
|
||||
arrBiLie = [["1/4",1/4],["1/6",1/6],["1/8",1/8],["1/10",1/10],["1/12",1/12],["1/14",1/14],["1/16",1/16],["1/18",1/18],["1/24",1/24],["1/32",1/32],["1/43",1/43],["1/64",1/64]]
|
||||
for biLieV in arrBiLie:
|
||||
biLie = biLieV[1]
|
||||
if biLie == 1/43:
|
||||
@@ -184,4 +186,4 @@ if __name__ == '__main__':
|
||||
|
||||
print(sizes)
|
||||
# break
|
||||
main("print", pid, sizes)
|
||||
main("print", str(pid), sizes)
|
||||
Binary file not shown.
Reference in new issue
Block a user