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

Adds new function in MeshManager for performing convex decomposition #585

Merged
merged 8 commits into from
Mar 14, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Mar 14, 2024

🎉 New feature

replaces #583

Summary

Adds function for doing convex decomposition using the header only library V-HACD.

The new function take a submesh and returns a vector of decomposed submeshes. Currently a couple of parameters are exposed:

  • _maxConvexHulls: max number of convex hulls to produce
    • value: 16 (default in V-HACD: 64)
  • _voxelResolution: resolution of voxels to use when decomposing the submesh
    • value: 200000 (default in V-HACD: 400000)

These default values for these parameters are lower than the default values provided in V-HACD for a faster convex decomposition process as the process with original values could take quite some time for complex meshes.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@iche033 iche033 requested a review from marcoag as a code owner March 14, 2024 01:46
@iche033 iche033 changed the title Convex decomposition 6 Adds new function in MeshManager for performing convex decomposition Mar 14, 2024
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Copy link

codecov bot commented Mar 14, 2024

Codecov Report

Attention: Patch coverage is 84.48276% with 9 lines in your changes are missing coverage. Please review.

Project coverage is 80.47%. Comparing base (e390fff) to head (d92687c).

Files Patch % Lines
graphics/src/MeshManager.cc 84.48% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #585      +/-   ##
==========================================
- Coverage   83.66%   80.47%   -3.19%     
==========================================
  Files          79       80       +1     
  Lines       10264    13542    +3278     
==========================================
+ Hits         8587    10898    +2311     
- Misses       1677     2644     +967     

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

graphics/src/VHACD.h Outdated Show resolved Hide resolved
graphics/include/gz/common/MeshManager.hh Outdated Show resolved Hide resolved
graphics/include/gz/common/MeshManager.hh Outdated Show resolved Hide resolved
graphics/src/MeshManager.cc Outdated Show resolved Hide resolved
graphics/src/MeshManager.cc Outdated Show resolved Hide resolved
graphics/src/MeshManager.cc Outdated Show resolved Hide resolved
graphics/src/MeshManager.cc Outdated Show resolved Hide resolved
graphics/src/MeshManager.cc Outdated Show resolved Hide resolved
Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

LGTM!

graphics/src/MeshManager.cc Show resolved Hide resolved
Signed-off-by: Ian Chen <[email protected]>
@iche033 iche033 requested a review from azeey March 14, 2024 21:42
@iche033 iche033 merged commit 691a087 into main Mar 14, 2024
9 of 10 checks passed
@iche033 iche033 deleted the convex_decomposition_6 branch March 14, 2024 22:06
iche033 added a commit that referenced this pull request Apr 8, 2024
iche033 added a commit that referenced this pull request Apr 8, 2024
mjcarroll added a commit that referenced this pull request Apr 11, 2024
* Various Bazel adjustments for linting (#582)

Signed-off-by: Michael Carroll <[email protected]>

* Prepare for 5.5.1 (#586)

Signed-off-by: Addisu Z. Taddese <[email protected]>

* Adds new function in MeshManager for performing convex decomposition (#585)


Signed-off-by: Ian Chen <[email protected]>

* Add new function in MeshManager to merge all submeshes of a mesh into one (#588)



---------

Signed-off-by: Ian Chen <[email protected]>

* Fix bazel build (#592)

Signed-off-by: Shameek Ganguly <[email protected]>

* Remove pessimizing move (#593)

Signed-off-by: Shameek Ganguly <[email protected]>
Signed-off-by: Michael Carroll <[email protected]>
Co-authored-by: Shameek Ganguly <[email protected]>

---------

Signed-off-by: Michael Carroll <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Ian Chen <[email protected]>
Signed-off-by: Shameek Ganguly <[email protected]>
Co-authored-by: Addisu Z. Taddese <[email protected]>
Co-authored-by: Ian Chen <[email protected]>
Co-authored-by: shameekganguly <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants