Skip to content

Create cuboid boundaries in a point cloud #486

Answered by marcomusy
jkissi asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, the UGrid is not what you need here.. you may play around with this:

import vedo
import numpy as np

vedo.settings.useDepthPeeling = True # may improve rendering

points= np.array([[1, 0, 0],
                  [0, 0, 0],
                  [0, 1, 0],
                  [1, 1, 0],
])

line = vedo.Line(points, closed=True).lineWidth(5).c('red4')

wall = line.extrude(0.2)
#wall = line.sweep([0,0,0.2]) # also possbile
wall.c('blue4').alpha(0.5).lineWidth(0) # control apperance

labs = vedo.Points(points).labels('id')
#tube = vedo.Tube(points, r=.1)

vedo.show(line, wall, labs, axes=1)

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@jkissi
Comment options

@marcomusy
Comment options

@jkissi
Comment options

Answer selected by jkissi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants