Comments (6)
remove_cells
may be a good alternative to extract_cells
. It has a PolyData to PolyData mapping. Though, the indices provided to these filters are kind of the inverse of each other. An alternative is to use vtkRemovePolyData
for this purpose, this is what the connectivity
filter currently uses under the hood for some cases.
Or, even using extract_surface
would work, as suggested in #3009.
Not sure which implementation would be better to use. Some methods may alter the topology so probably whichever one best preserves the input data (e.g. correct cell winding, preserves orientation of the normals, ordering of cell ids, etc.
Having a PolyData to PolyData mapping for filters more generally is probably a good thing to add. It would eliminate the need to always cast the output back to PolyData if this kind of behavior was made standard for all DataSetFilters.
For example it would resolve this issue #5613.
Other filters such as extract_values
, which also uses extract_cells
under the hood and returns an UnstructuredGrid, would also benefit. E.g. #5968 uses extract_values
but then has to call remove_cells
to effectively cast the output back to PolyData. It would be nice to just get the PolyData output directly.
from pyvista.
it's always irked me that PolyData.extract_cells
returns an UnstructuredGrid
. Big +1 on fixing that if it's possible
from pyvista.
#6060 was recently patched into version 0.43.8
, not sure if that affected the output. @kalingibbons do you get this same bug with 0.43.7
?
from pyvista.
I was actually on 0.43.3 when I first ran into it, then updated to see if it was fixed before submitting the issue.
from pyvista.
Ah ok thanks for checking, I guess this bug has been there for a while then.
from pyvista.
when doing crinkle clip, it uses extract_cells
under the hood. This is the reason that it returns UnstructuredGrid
. I wonder if If should detect PolyData
input and then cast appropriately.
from pyvista.
Related Issues (20)
- `cast_to_unstructured_grid` not working for `PointSet`
- Inconsistent rendering of ChartMPL plots HOT 2
- Plotting in Jupyter returns AttributeError: 'NoneType' object has no attribute 'has_capabilities' HOT 7
- Fix failing doc image tests HOT 3
- Need to fix warning of `tests/core/test_dataset_filters.py` HOT 2
- Error loading mesh while using Pyvista with vtk-egl HOT 4
- Point labels do not show properly in interactive documentation. HOT 3
- Opaque regions in RGBA images render partially transparent no matter what HOT 13
- UnstructuredGrid.clean modifies cell faces in-place HOT 2
- Fix `ImageData` transformations
- Connectivity filter crashes kernel, works on computers with older package/ python versions HOT 7
- Merging UnstructuredGrid with lines into another UnstructuredGrid HOT 9
- Error while using Pyvista with vtk-osmesa HOT 6
- Text from `add_text()` is not rendered in docs interactive scenes HOT 3
- number_labels in add_ruler not working as expected; similar for show_bounds HOT 4
- subdivide_tetra() results in faulty/negative cell volumes
- Labeled volumes for MultiBlock with voxelize_volume and voxelize HOT 2
- Allow reshaping of plotter
- Return type hint in plotting/plotter.py HOT 1
- `sample` filter crashes python without scalar data HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyvista.