-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
WIP: internal_faces option for axes3d voxels #9927
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
base: main
Are you sure you want to change the base?
Conversation
Can only get 5 of the 6 faces, though...
By default, only exposed faces of a voxel are rendered, | ||
but you can force the rendering of all faces of the voxels | ||
by setting this keyword argument to True. | ||
.. versionadded:: 2.1 |
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.
whoops, should be 2.2, not 2.1.
closes #9745 |
voxel_faces[i1].append(p2 + square_rot) | ||
elif not filled[i1] and filled[i2]: | ||
elif (internal_faces or not filled[i1]) and filled[i2]: | ||
voxel_faces[i2].append(p2 + square_rot) |
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.
I think this will fix your bug, since right now the if
and else
are mutually exclusive:
if internal_faces:
voxel_faces[i1].append(p2 + square_rot)
voxel_faces[i2].append(p2 + square_rot)
el<the existing if>
Drawing both faces on every border is likely to lead to z-fighting, isn't it? Unless the faces are one-sided, in which case you'll be alright. |
Perhaps |
@WeatherGod what do you want to do about this PR? |
Since this Pull Request has not been updated in 60 days, it has been marked "inactive." This does not mean that it will be closed, though it may be moved to a "Draft" state. This helps maintainers prioritize their reviewing efforts. You can pick the PR back up anytime - please ping us if you need a review or guidance to move the PR forward! If you do not plan on continuing the work, please let us know so that we can either find someone to take the PR over, or close it. |
By default matplotlib will cull internal voxels even if the surrounding voxels have transparency. This change adds an extra "internal_faces" parameter to the ax.voxel() method which, when set, ensures internal voxels are still rendered. This change is based on the following upstream WIP PR: matplotlib/matplotlib#9927
By default matplotlib will cull internal voxels even if the surrounding voxels have transparency. This change adds an extra "internal_faces" parameter to the ax.voxel() method which, when set, ensures internal voxels are still rendered. This change is based on the following upstream WIP PR: matplotlib/matplotlib#9927
Can only get 5 of the 6 faces, though... Must have done something wrong.
PR Summary
PR Checklist