isl-org / isl-org/Open3D

problem changing line_width_ or point_size_ for LineSet

Open
#6,952 5 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](https://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](https://www.open3d.org/docs/release/) and the [latest documentation](https://www.open3d.org/docs/latest/) (for `main` branch).

### Describe the issue

I cannot see any obvious change when I try to increase **line_width_** or **point_size_** for `LineSet`.

I am setting `vis.GetRenderOption().line_width_ = 10.0;` My code calls Open3D from C++ using a version I built from source in the last new weeks. The main branch minus a few of the most recent commits.

### Steps to reproduce the bug

```c++
// Test code:

void LineWidthPointSizeTest()
{
open3d::PrintOpen3DVersion();
auto lineset = std::make_shared();
lineset->points_ = {{5, 0, 0}, {-5, 0, 0}, {0, 5, 0}, {0, -5, 0}, {0, 0, 5}, {0, 0, -5}};
lineset->lines_ = {{0, 1}, {2, 3}, {4, 5}};
lineset->colors_ = {{1, 0, 0}, {0, 1, 0}, {0, 0, 1}};

auto vis = open3d::visualization::Visualizer();
vis.CreateVisualizerWindow();
vis.AddGeometry(lineset);
vis.GetRenderOption().line_width_ = 10.0;
vis.GetRenderOption().point_size_ = 20.0;
vis.Run();
}
```

### Error message

(visual problem)

### Expected behavior

I wanted thicker lines. Setting `vis.GetRenderOption().line_width_ = 10.0` made no obvious difference. I also tried setting `vis.GetRenderOption().point_size_ = 20.0` and the vertices do not appear any larger than the lines, which themselves appear no wider than the default.

Screenshot 2024-09-07 at 11 44 16 AM

### Open3D, Python and System information

```markdown
- Operating system: macOS 14.6.1
- Python version:
- Open3D version: 0.18.0+18a47ef
- System architecture: arm64
- Is this a remote workstation?: no
- How did you install Open3D?: build from source
- Compiler version (if built from source): Apple clang version 15.0.0 (clang-1500.3.9.4)
```

### Additional information

By the way, is there a way to use `open3d::PrintOpen3DVersion()` to get the exact version string "version+main_commit"? (Like: 0.18.0+18a47ef) Does this work from `open3d.__version__` in Python?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.