-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/forward kwargs #2346
Fix/forward kwargs #2346
Conversation
Thanks for the fix and great test! I think we have to do this in |
Thank you for your quick reply and immediately taking care of it ❤️ I am also wondering about a related issue which is not being fixed with the current pull-request. I put the questions along with this example that way it is probably easiest to see. If wanted, I can open a proper issue for it. import trimesh
file_name = "models/featuretype.stl"
with open(file_name, "rb") as fh:
mesh = trimesh.load_mesh(file_obj=fh, file_type="stl", process=False)
assert len(mesh.faces) == 3476
assert len(mesh.vertices) == 10428
with open(file_name, "rb") as fh:
mesh = trimesh.load_mesh(file_obj=fh, file_type="stl", process=True)
# Why is only the number of vertices being reduced but not the number of faces?
assert len(mesh.faces) == 3476
assert len(mesh.vertices) == 1722
mesh.export('./mesh_test.stl')
with open('./mesh_test.stl', 'rb') as fh:
mesh = trimesh.load_mesh(file_obj=fh, file_type="stl", process=False)
assert len(mesh.faces) == 3476
# Why is the number of vertices again 10428 even though it is from the exported reduced model?
assert len(mesh.vertices) == 10428 |
No worries! I'm going to check whether we have the same bug in the other load entrypoints before merging.
That's actually because STL just outputs a "bundle of triangles" with no indexes (hence the need for the vertex merging on load, since trimesh started as just an STL loader haha). If you use a format with indexes (OFF, OBJ*, GLB, PLY, etc) it should pass as you expect:
|
All right, got it. Thanks for the explanation. |
With the pull-request #2241,
load_mesh
does not respect the parameterprocess
anymore.With this pull-request, the
kwargs
are being forwarded inload_stl
.