AttributeError with mesh isobands
See original GitHub issueHi there!
I’m getting this error when I try to use the isobands()
mesh method:
<vedo.plotter.Plotter object at 0x7f6a45f44590>
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/jonathancorcutt/anaconda3/envs/wellplan/lib/python3.7/site-packages/vedo/mesh.py", line 1814, in isobands
bcf.GetOutput().GetCellData().GetScalars().SetName("IsoBands")
AttributeError: 'NoneType' object has no attribute 'SetName'
I’m loading in a (n, 3) array of vertices and creating a (flat surface) mesh with:
mesh = vedo.delaunay2D(vertices)
There’s 233,358 vertices and when plotted with:
vedo.show(mesh)
They look like this:
But I’d like to shade this surface like this:
It’d also be nice to make the surface a bit smoother.
Any suggeestions? 😃
Jonny
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
vedo.mesh API documentation
Return a new Mesh representing the isobands of the active scalars. This is a new mesh where the scalar is now associated to...
Read more >Getting an Attribute Error : 'Mesh' object has no attribute 'ufl_cell'
My code is as follows import dolfinx import meshio def create_mesh(mesh, cell_type, prune_z=False): cells = mesh.get_cells_type(cell_type) ...
Read more >How to fix 'AttributeError: 'Mesh' object has no attribute ...
Show activity on this post. The mesh is not a collection and has no active_index, hence the error.
Read more >AttributeError: 'MeshPlotter' object has no attribute 'tk'
I have the following script, which uses Tkinter. class MeshPlotter(tk.Frame): def __init__(self, parent, filename): ...
Read more >Script not working : AttributeError - ParaView Support
AttributeError : Attribute PartArrayStatus does not exist. This class does not allow ... AttributeError: 'NoneType' object has no attribute 'MeshParts'
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great, thank you!
I keep learning more and more stuff I can do with this excellent library!
just realized i forgot to answer this
you can assign any number of arrays to points or cells of a mesh with
mymesh.addPointArray(arr, "arrname")
and/ormymesh.addCellArray(arr, "arrname")
Also
mymesh.cmap("jet", arr, on="points", arrayName="arrname")
will automatically add it when setting the colormap.