Hi simple-3dviz Team,
Thank you for your work on this Python module. I try to load an obj file using code:
"from simple_3dviz.renderables.mesh import Mesh
raw_mesh = Mesh.from_file("./s__1005.obj")"
then gives the following error which is similar to the previous issue :
File "/home/ubuntu/anaconda3/envs/atiss/lib/python3.8/site-packages/simple_3dviz/io/mesh.py", line 147, in extract_uv
return int(face.split("/")[1])-1
ValueError: invalid literal for int() with base 10: ''
I guess that because in the obj file, the "f" property is about
"f 66//64 73//71 75//68 69//65
f 69//65 75//68 72//67 67//66
f 79//74 88//87 90//86 82//75
f 82//75 90//86 87//85 80//78
f 67//66 79//74 84//77 70//63
f 81//80 65//60 70//63 84//77
f 88//87 72//67 77//70 91//84
f 91//84 77//70 74//73 86//81
f 93//88 102//99 104//98 96//89
f 96//89 104//98 101//97 94//91"
which uses "//" to divide the numbers rather than uses "/", I think this problem lead to the error.
But if I replace "//" with "/", the obj file can not be previewed as a jpg in pycharm with Wavefront OBJ module.
The obj file is as follows, could you please help me out?
s__1005.zip
Hi simple-3dviz Team, Thank you for your work on this Python module. I try to load an obj file using code: "from simple_3dviz.renderables.mesh import Mesh raw_mesh = Mesh.from_file("./s__1005.obj")"
then gives the following error which is similar to the previous issue : File "/home/ubuntu/anaconda3/envs/atiss/lib/python3.8/site-packages/simple_3dviz/io/mesh.py", line 147, in extract_uv return int(face.split("/")[1])-1 ValueError: invalid literal for int() with base 10: ''
I guess that because in the obj file, the "f" property is about "f 66//64 73//71 75//68 69//65 f 69//65 75//68 72//67 67//66 f 79//74 88//87 90//86 82//75 f 82//75 90//86 87//85 80//78 f 67//66 79//74 84//77 70//63 f 81//80 65//60 70//63 84//77 f 88//87 72//67 77//70 91//84 f 91//84 77//70 74//73 86//81 f 93//88 102//99 104//98 96//89 f 96//89 104//98 101//97 94//91" which uses "//" to divide the numbers rather than uses "/", I think this problem lead to the error. But if I replace "//" with "/", the obj file can not be previewed as a jpg in pycharm with Wavefront OBJ module.
The obj file is as follows, could you please help me out? s__1005.zip
Regards, Xuan