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

Minor: documentation on navis.Volume #105

Open
mwinding opened this issue Nov 9, 2022 · 1 comment
Open

Minor: documentation on navis.Volume #105

mwinding opened this issue Nov 9, 2022 · 1 comment

Comments

@mwinding
Copy link

mwinding commented Nov 9, 2022

I spent a bit of time confirming the coordinates of a bounding box for a navis.Volume object. I think the documentation could be a bit more verbose, so others don't have to do the same.

Specifically here: https://navis.readthedocs.io/en/latest/source/tutorials/generated/navis.Volume.html#navis.Volume

All that is mentioned about the bounding box:
Attributes
bbox: Bounding box of this volume.

Something describing the structure would be nice. For example, the bbox array is:

array([[minimum X, minimum Y, minimum Z],
       [maximum X, maximum Y, maximum Z]])

@schlegelp
Copy link
Collaborator

Thanks for reporting Michael!

A navis.Volume is a subclass of trimesh.Trimesh and most of what you see in those docs is simply carried over from trimesh. I never really looked at it but is a bit confusing - especially with that additional layer of navis.Volume on top of it.

These summary tables only ever show a one-liner but in theory you should be able to click on e.g. bounds to get the full signature. Something's not working correct here and I will need to look into it.

You can always ask for the full docstring in an interactive Python session (terminal or Jupyter):

>>> vol.bounds?
Type:        property
String form: <property object at 0x13025ed10>
Docstring:  
The axis aligned bounds of the faces of the mesh.

Returns
-----------
bounds : (2, 3) float or None
  Bounding box with [min, max] coordinates
  If mesh is empty will return None

That docstring is not exactly what you had in mind but at least a bit better. I'll see if trimesh would accept a PR to clarify.

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

No branches or pull requests

2 participants