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

Overlap on inside of Tube #1143

Open
Linus-Foley opened this issue Jun 19, 2024 · 1 comment
Open

Overlap on inside of Tube #1143

Linus-Foley opened this issue Jun 19, 2024 · 1 comment

Comments

@Linus-Foley
Copy link
Contributor

Linus-Foley commented Jun 19, 2024

When constructing a Tube from a set of points, an overlapping section can appear in the Tube on tight corners:

image
image

Ideally the Tube should just consist of the surface.

@marcomusy
Copy link
Owner

Hi, unfortunately VTK doesn't seem to be able to avoid self intersections in many cases.. ( I also tried a different class called vtkTubeBender which also does not work well).
Another option which is much slower and less precise is https://vedo.embl.es/autodocs/content/vedo/vedo/pointcloud.html#Points.generate_surface_halo
Eg:

from vedo import *
np.random.seed(1)
s = Spline(np.random.randn(10,3), res=200)
# tube = Tube(s, r=0.1)
tube = s.generate_surface_halo(res=(100,100,100))
tube.smooth()
tube.alpha(0.5).lw(1)
show(s, tube, axes=1)
Screenshot 2024-06-20 at 00 45 26

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