-
-
Notifications
You must be signed in to change notification settings - Fork 639
Open
Description
Describe the issue
In NumPy 2, numpy_num_face_vertices() are wrong on some mixed-arity meshes.
It's not clear whether this is related to #401 which describes a different problem with different arrays with NumPy 2, or to #400 which describes a different problem with this array in NumPy 1.21.1.
To Reproduce
from tinyobjloader import ObjReader, ObjReaderConfig
reader = ObjReader()
config = ObjReaderConfig()
config.triangulate = False
reader.ParseFromString(mesh_string, "", config)Load the following mesh:
v 0 1 1
v 0 2 2
v 0 3 3
v 0 4 4
v 0 5 5
f 1 2 3 4
f 1 4 5
Expected behavior
Observed:
(Pdb) reader.GetShapes()[0].mesh.num_face_vertices
[4, 3]
(Pdb) reader.GetShapes()[0].mesh.numpy_num_face_vertices()
array([4, 4], dtype=uint8)
Expected:
(Pdb) reader.GetShapes()[0].mesh.numpy_num_face_vertices()
array([4, 3], dtype=uint8)
Environment
- TinyObjLoader version 2.0.0rc12
- OS: Linux and Mac
- Compiler Wheels from PyPI
- Other environment Python 3.11 or 3.12, NumPy 2.4.2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels