Skip to content

[Quick question]How to select a group cells in a mesh? #748

Discussion options

You must be logged in to vote

Dear Marco,@marcomusy
I should explain my problem more clearly with the following codes:

"""Manually build a mesh from points and faces"""
from vedo import Mesh, show

verts = [(50,50,50), (70,40,50), (50,40,80), (80,70,50)]
faces = [(0,1,2), (2,1,3), (1,0,3)]
''' (the first triangle face is formed by vertex 0, 1 and 2)
Build the polygonal Mesh object:'''
mesh = Mesh([verts, faces])
mesh.backcolor('violet').linecolor('tomato').linewidth(2)
labs = mesh.labels('id').c('black')
#-----------------------------------------------------

My problem is: How to show the first triangle only, but keep the codes above the dashed line UNCHANGED

show(mesh, labs, __doc__, viewup='z', axes=1).close()

Plea…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@ZiguoAtGitHub
Comment options

Comment options

You must be logged in to vote
6 replies
@marcomusy
Comment options

@ZiguoAtGitHub
Comment options

@ZiguoAtGitHub
Comment options

@marcomusy
Comment options

@ZiguoAtGitHub
Comment options

Answer selected by marcomusy

This comment has been hidden.

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