8000 Added DisabledFaceTest by Kushal-Shah-03 · Pull Request #908 · elalish/manifold · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added DisabledFaceTest #908

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 8000 occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 2, 2024
Merged

Conversation

Kushal-Shah-03
Copy link
Contributor

I added the narrowed down version (12 points) of the test case 101213.stl. It is a case where one of the halfEdge in the list of halfEdges has a disabled face. This case caused a segfault before, and it's a good check to identify if disabled faces are handled correctly. Thanks, @elalish for suggesting this. Let me know if I should change anything.

Copy link
codecov bot commented Sep 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.69%. Compa 8000 ring base (d437097) to head (177eebc).
Report is 82 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #908      +/-   ##
==========================================
- Coverage   91.84%   89.69%   -2.15%     
==========================================
  Files          37       66      +29     
  Lines        4976     9775    +4799     
  Branches        0     1061    +1061     
==========================================
+ Hits         4570     8768    +4198     
- Misses        406     1007     +601     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner
@elalish elalish left a comment

Choose a reason for hiding this comment

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

Thanks!

ExportMesh("disabledFaceTest.glb", hull.GetMesh(), {});
}
#endif
EXPECT_TRUE(isMeshConvex(hull));
Copy link
Owner

Choose a reason for hiding this comment

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

Does isMeshConvex return true for an empty mesh? If so, we should probably also expect !hull.isEmpty() too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah it does. I have added that as well. Thanks for pointing that out.

@@ -197,4 +197,29 @@ TEST(Hull, FailingTest2) {
}
#endif
EXPECT_TRUE(isMeshConvex(hull, 2.13966e-05));
}

TEST(Hull, DisabledFaceTest) {
Copy link
Owner

Choose a reason for hiding this comment

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

When you say it has a disabled face, do you mean during the coarse of the algorithm it disables a face? Did you verify this test fails if you revert whatever the fix was?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, and that disabled face is linked to one of the halfEdge returned after the CreateConvexHalfedgeMesh function call. The algorithm doesn't remove them during computation to reduce time. But, we need to filter those at the end.

Yes, I verified that the test fails without the fix.

@elalish elalish merged commit d0d5106 into elalish:master Sep 2, 2024
22 checks passed
@elalish
Copy link
Owner
elalish commented Sep 2, 2024

Thanks! Have you had a chance to look at Hull.Tictac yet? Any idea where it's losing that vert?

@Kushal-Shah-03
Copy link
Contributor Author

To be honest I still don't understand why is that considered an error. Isn't it possible that it drops some verts that lie outside or on the surface of the hull?

@elalish
Copy link
Owner
elalish commented Sep 3, 2024

It's because it is two axis-aligned spheres. If you drop the n down to, say 12, and look at the result, I think it'll become clear. To be fair though, getting a repro of that windows problem is a higher priority.

@elalish elalish mentioned this pull request Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0