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

Update visualization.ipynb #6263

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/jupyter/visualization/visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
" lines=o3d.utility.Vector2iVector(lines),\n",
")\n",
"line_set.colors = o3d.utility.Vector3dVector(colors)\n",
"o3d.visualization.draw_geometries([line_set], zoom=0.8)"
"o3d.visualization.draw_geometries([line_set])"
Copy link
Contributor

Choose a reason for hiding this comment

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

The problem is not that LineSet doesnt support zoom parameter but that o3d.visualization.draw_geometries doesnt support zoom parameter when passed without front, lookat, and up params. More information here - https://stackoverflow.com/a/76828436/1874627 answered by me.

The code here docs/jupyter/visualization/visualization.ipynb however will work if run directly from open3d repository, since open3d jupyter notebook used a hack to override o3d.visualization.draw_geometries. See here:- https://github.com/isl-org/Open3D/blob/master/docs/jupyter/open3d_tutorial.py#L67

As a quick fix, I will still go for accepting this PR, as above stackoverflow question clearly shows users are copying code with zoom parameter.

Copy link
Contributor

@saurabheights saurabheights Aug 21, 2023

Choose a reason for hiding this comment

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

Alternative option - Remove https://github.com/isl-org/Open3D/blob/master/docs/jupyter/open3d_tutorial.py#L67 and use import correctly, i.e. open3d_tut.jupyter_draw_geometries. This shows a custom method is called that creates Open3D window as well as captures a screenshot of the window before closing.

IMO - draw_geometries method should be extended to include the functionality provided by https://github.com/isl-org/Open3D/blob/master/docs/jupyter/open3d_tutorial.py#L17C1-L62C25

]
}
],
Expand Down