Skip to content
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

Fixting Stitching Bug #2160

Merged
merged 3 commits into from
Feb 23, 2024
Merged

Fixting Stitching Bug #2160

merged 3 commits into from
Feb 23, 2024

Conversation

captain-pool
Copy link
Contributor

Hi Mike,
Thanks again for sharing trimesh with the community. I noticed a tiny bug in the implementation of "stitch()". More specifically: the implementation of unitize(...)

trimesh/trimesh/util.py

Lines 128 to 129 in aa3cb56

if check_valid:
return unit[valid], valid

returns the normals after masking with valid when check_valid=True. However, in the current implementation of stitch

check = check[valid][0]
the mask is applied again on the masked results, causing it the function to break.

This PR contains a quick fix to the problem.

Thanks.
-- Adrish

@mikedh mikedh changed the base branch from main to feat/spell February 23, 2024 20:01
@mikedh
Copy link
Owner

mikedh commented Feb 23, 2024

Good catch, thanks for the fix!

@mikedh mikedh merged commit 4e7d028 into mikedh:feat/spell Feb 23, 2024
9 checks passed
@mikedh mikedh mentioned this pull request Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants