-
Notifications
You must be signed in to change notification settings - Fork 235
feat(v2): display mesh and pointcloud #1113
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
Changes from 1 commit
943d636
e9acd12
c91ab6c
e979c32
21fb8ab
75b33d8
7890194
0129c3a
322a718
05d8461
0244816
255795c
db42712
dca04ce
788f834
57fb1e1
3a8dc5e
38f771d
8c31318
bbef411
b376ddd
c623f9c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Signed-off-by: anna-charlotte <[email protected]>
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -59,8 +59,9 @@ class MyDoc(BaseDocument): | |
|
|
||
| def display(self) -> None: | ||
| """ | ||
| Plot mesh in notebook from url. | ||
| Plot mesh from url. | ||
| This loads the Trimesh instance of the 3D mesh, and then displays it. | ||
| To use this you need to install trimesh[easy]: `pip install 'trimesh[easy]'`. | ||
| """ | ||
| from IPython.display import display | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what ahppened if we are not inside IPython ?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think for mesh and point cloud it would still open a pyglet window and display it, but for the other IPython displays it would just print something like '< IPython.display.Audio obj >'. |
||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
url.displayfeels a bit weird to me, because in this case it doesn't really display the url, it displays the thing the url points to.And to do that, it has to load from that url under the hood.
So is it necessary to expose this? Why not
url.load().display()?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i see your point, but its not quite the same, when displaying it from url as it is now, we can display it with color because we just call
.show()on the trimesh instance. Forurl.load().display()we extract the vertices and faces information but as of right now there is no way to extract the color information. Therefore this displays without colors. I think it would be nice to keep the color display if url content includes this information.What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this is true that it is weird to display some data (the color) that we cannot load in our tools
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes true, can be a bit misleading or confusing, too. do u suggest to remove it then for the url, and do the
url.load().display()if someone doesn't want to load it into the tensors? I think this won't change on trimesh side any time soon, to easily extract color information.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me think about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so what's the conclusion here? keep it as it is? I see the point of being able to show colors, so I don't have a strong opinion anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anna-charlotte what did you decided ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep it like this, for the colors and also to have the display method for all urls