-
Notifications
You must be signed in to change notification settings - Fork 441
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
Wrap Trimesh #970
Wrap Trimesh #970
Conversation
Codecov Report
@@ Coverage Diff @@
## master #970 +/- ##
==========================================
+ Coverage 86.79% 87.12% +0.32%
==========================================
Files 36 36
Lines 9112 9357 +245
==========================================
+ Hits 7909 8152 +243
- Misses 1203 1205 +2 |
re #966, I was thinking it'd be convenient just in general to have the PolyData constructor assume that a two-dimensional faces array implies that every face has the same number of vertices, viz. the number of columns. Not sure how to handle backwards compatibility though -- an alternative static constructor like |
I agree that would be useful. It seems the cell types in the faces array throws folks off quite frequently. I could try implementing this support while maintaining backward compatibility. |
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.
Awesome work!
Wrap Trimesh
Given a few issues that have demonstrated the use of (or mentioned problems with)
trimesh
, I thought it was time that we wrappedtrimesh.Trimesh
instances. See issue #966. For example:I did some tests and the wrap is quite fast as it only generates a new faces array, which you can do fairly quickly. For those users used to
trimesh
, this means that we can now plot those mesh types withpyvista.plot(tmesh)
.I've also taken the liberty to update
codespell
andpydocstyle
since our versions are old and updating them didn't introduce any additional spelling or style changes.