trimesh icon indicating copy to clipboard operation
trimesh copied to clipboard

Update obj.py to support quad faces with texture coordinates

Open zhou-wb opened this issue 1 year ago • 2 comments

Support quad faces for obj file with texture coordinates and/or face normals

the support for 8 and 12 columns for quads can be easily done by make tiny changes, I have done some tests and it works properly.

zhou-wb avatar Jan 06 '24 07:01 zhou-wb

Thanks for the PR! Looks like tests are failing, I think you want to change the check from columns == 6 or 8 to columns in (6, 8):

In [1]: columns = 10

In [2]: columns == 6 or 8
Out[2]: 8

In [3]: columns in (6, 8)
Out[3]: False

mikedh avatar Jan 08 '24 21:01 mikedh

Thanks for the reply. Oh, I actually want to check if the columns == 6 (for triangle facet with one attribute, vn or vt) or columns == 8 (for quad facet with both attributes vn and vt)

zhou-wb avatar Jan 09 '24 02:01 zhou-wb