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

Fix vertex order in prim_tetrahedron #571

Merged
merged 1 commit into from Apr 12, 2022
Merged

Fix vertex order in prim_tetrahedron #571

merged 1 commit into from Apr 12, 2022

Conversation

rkharsan
Copy link
Contributor

Currently, 2 of the faces returned by primitive.prim_tetrahedron() have the vertices in incorrect order. This leads to incorrect normals being calculated, and the two faces in question appear invisible from the outside.

Current version: Note the missing faces!
Screenshot from 2022-04-12 20-58-20

Fixed version: All faces are now visible from the outside.
Screenshot from 2022-04-12 20-57-33

Minimal reproducible example:

from fury import utils, window, primitive

v, f = primitive.prim_tetrahedron()

# Uncomment to see the fix
# f[1][1], f[1][2] = f[1][2], f[1][1]
# f[3][1], f[3][2] = f[3][2], f[3][1]

a = utils.get_actor_from_primitive(v, f)

scene = window.Scene()
scene.add(a)
window.show(scene)

@codecov
Copy link

codecov bot commented Apr 12, 2022

Codecov Report

Merging #571 (77f18ee) into master (f1ee5f8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #571   +/-   ##
=======================================
  Coverage   88.55%   88.55%           
=======================================
  Files          55       55           
  Lines       10979    10979           
  Branches     1083     1083           
=======================================
  Hits         9723     9723           
  Misses        959      959           
  Partials      297      297           

Copy link
Contributor

@skoudoro skoudoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you and good catch @rkharsan,

That is strange... I wonder when we introduce this issue and we did not see it.

Anyway, thanks and merging

@skoudoro skoudoro merged commit 17f00a1 into fury-gl:master Apr 12, 2022
@skoudoro skoudoro added the type:Bug Fix Something isn't working label Apr 12, 2022
@rkharsan rkharsan deleted the fix-tetrahedron branch April 12, 2022 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:Bug Fix Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants