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
PolyCollection path closing is projected incorrectly by add_collection3d #2045
Comments
Hmmm, this has given me a different perspective on a long running issue. On Tue, May 21, 2013 at 8:37 PM, Constantine Evans <notifications@github.com
|
Ok, didn't fix as much as I was hoping to, but might be a step forward. On Tue, May 21, 2013 at 9:08 PM, Benjamin Root ben.root@ou.edu wrote:
|
closed by #3239 |
This is in reference to this StackOverflow question, where I describe the issue.
PolyCollection has a closed option, which is set to True by default. In True, the paths it uses are explicitly created with a CLOSEPATH code at the end, closing the path. If False, the path does not have this final code, and should not be closed. This works correctly for 2D.
In converting a PolyCollection to a Poly3DCollection, this option is ignored. In path_to_3d_segment, the codes of each vertex are ignored, meaning that, for closed paths, the 0,0 final vertex is interpreted as an actual vertex. Thus this only works correctly for paths that are not closed.
Then, these vertexes, after projection, are sent to Poly3DCollection.set_verts with
closed=True
. The result is that if the user sets closed=True, the Poly3DCollection has an extra point at the origin, and if the user sets closed=False, the Poly3DCollection is closed.The text was updated successfully, but these errors were encountered: