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

Expose minimal oriented bounding box to python api #6946

Conversation

sharon-br
Copy link
Contributor

This PR exposes the minimal volume bounding box function to the python API.

  • Bug fix (non-breaking change which fixes an issue): Fixes #
  • New feature (non-breaking change which adds functionality). Resolves #
  • Breaking change (fix or feature that would cause existing functionality to not work as expected) Resolves #

Motivation and Context

Only the static function create_from_points is currently exposed to the Python API.
However, in the CPP API, another option exists which is to create a bounding box with a minimal volume that is not exposed.

Checklist:

  • I have run python util/check_style.py --apply to apply Open3D code style
    to my code.
  • This PR changes Open3D behavior or adds new functionality.
    • Both C++ (Doxygen) and Python (Sphinx / Google style) documentation is
      updated accordingly.
    • I have added or updated C++ and / or Python unit tests OR included test
      results
      (e.g. screenshots or numbers) here.
  • I will follow up and update the code if CI fails.
  • For fork PRs, I have selected Allow edits from maintainers.

Description

Copy link

update-docs bot commented Sep 3, 2024

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@sharon-br
Copy link
Contributor Author

I was unsure how to name the function - another option was create_from_points_minimal to match the CPP function name but it felt odd so I went with this. Happy to change if you have any other preference.

Also, any plans on 0.19 to include this and #6898 ?

Copy link
Member

@ssheorey ssheorey left a comment

Choose a reason for hiding this comment

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

Thanks @sharon-br ! Looks good after a rename.

@@ -83,6 +83,27 @@ The returned bounding box is an approximation to the minimal bounding box.
open3d.geometry.OrientedBoundingBox: The oriented bounding box. The
bounding box is oriented such that the axes are ordered with respect to
the principal components.
)doc")
.def_static("create_minimal_from_points",
Copy link
Member

Choose a reason for hiding this comment

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

Can we name create_from_points_minimal instead so that it matches the C++ function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Is there any timeline regarding the 0.19 release?

Copy link
Member

Choose a reason for hiding this comment

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

As soon as we can get the Python 3.12 support PR merged. There are still some test failures blocking that.

@ssheorey ssheorey merged commit 553ca86 into isl-org:main Sep 4, 2024
28 of 38 checks passed
@sharon-br sharon-br deleted the expose-minimal-oriented-bounding-box-to-python-api branch September 5, 2024 08:31
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