The Wayback Machine - https://web.archive.org/web/20210912170651/https://github.com/matplotlib/matplotlib/pull/9927
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

WIP: internal_faces option for axes3d voxels #9927

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

@WeatherGod
Copy link
Member

@WeatherGod WeatherGod commented Dec 4, 2017

Can only get 5 of the 6 faces, though... Must have done something wrong.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
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

This comment has been minimized.

@WeatherGod

WeatherGod Dec 4, 2017
Author Member

whoops, should be 2.2, not 2.1.

@WeatherGod
Copy link
Member Author

@WeatherGod WeatherGod commented Dec 4, 2017

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)

This comment has been minimized.

@eric-wieser

eric-wieser Dec 11, 2017
Contributor

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>

@eric-wieser
Copy link
Contributor

@eric-wieser eric-wieser commented Dec 11, 2017

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.

@eric-wieser
Copy link
Contributor

@eric-wieser eric-wieser commented Dec 11, 2017

Perhaps cull_internal_faces=True? In general, it's better for bool flags to be verbs.

@jklymak jklymak marked this pull request as draft Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants