-
Notifications
You must be signed in to change notification settings - Fork 563
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
fixes #2218 #2222
fixes #2218 #2222
Conversation
trimesh/exchange/gltf.py
Outdated
@@ -1518,7 +1518,7 @@ def _read_buffers( | |||
# indices are apparently optional and we are supposed to | |||
# do the same thing as webGL drawArrays? | |||
kwargs["faces"] = np.arange( | |||
len(kwargs["vertices"]) * 3, dtype=np.int64 | |||
np.shape(kwargs["vertices"])[0], dtype=np.int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or could we just assume it's safe to do e.g. (@mikedh) ?
kwargs["vertices"].shape[0]
Thanks for the PR! Ignoring the spurious failures that will go away when we can drop gmsh haha looks like the corpus model that fails is this one:
|
changed to using np.size(kwargs["vertices"]) (tested with |
Awesome thanks for the followup looks great!! I'll release in #2220 when that's working. Would it be possible to add a small test model that previously failed just to make sure we don't break this in the future? No worries if not, thanks for the fix! |
Turns out I was a bit quick there, it actually does not work using |
Updated code with tests (cc: @mikedh). |
See issue for details: #2218