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 Merge manifoldness issues #481

Merged
merged 6 commits into from
Jul 7, 2023
Merged

Fix Merge manifoldness issues #481

merged 6 commits into from
Jul 7, 2023

Conversation

elalish
Copy link
Owner

@elalish elalish commented Jul 6, 2023

Following on from #474, I was still surprised how infrequently I could create a manifold from seemingly-solid input meshes. Turns out there were two major problems I've fixed here:

  1. When vertices are merged together, this often results in two triangles being degenerate (not geometrically, but topologically - actually referencing the same vert twice). This was causing the mesh to be marked as non-manifold. The fix is to simply remove those triangles, which allows many input meshes to show up manifold that weren't before.
  2. I finally found the problem with the Khronos-DragonAttenuation model. It was infinite-looping in the decimator. Turns out it was because of a pinched vertex (often called a non-manifold vertex - think two cones that share the same tip vert). I added a function to remove these, as they will also mess up the Genus calculation.

I also discovered how to debug Manifold right in Chrome, which actually works really well. I added instructions to the README.

@elalish elalish self-assigned this Jul 6, 2023
@codecov
Copy link

codecov bot commented Jul 7, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.04 🎉

Comparison is base (4b65ff3) 90.27% compared to head (37cb2be) 90.31%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #481      +/-   ##
==========================================
+ Coverage   90.27%   90.31%   +0.04%     
==========================================
  Files          35       35              
  Lines        4318     4338      +20     
==========================================
+ Hits         3898     3918      +20     
  Misses        420      420              
Impacted Files Coverage Δ
src/manifold/src/impl.h 72.72% <ø> (ø)
src/manifold/src/edge_op.cpp 98.04% <100.00%> (+0.09%) ⬆️
src/manifold/src/impl.cpp 95.42% <100.00%> (+0.05%) ⬆️
src/manifold/src/properties.cpp 84.81% <100.00%> (+0.09%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@elalish elalish merged commit 96c57c0 into master Jul 7, 2023
@elalish elalish deleted the ignoreDegenerates branch July 7, 2023 16:40
@elalish elalish mentioned this pull request Nov 3, 2023
cartesian-theatrics pushed a commit to SovereignShop/manifold that referenced this pull request Mar 11, 2024
* test passes

* fixed merge properly

* fixed relation

* fixed pinched verts

* added WASM debug instructions
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.

1 participant