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)
- stack overflow when computing delaunay_2d on bigger point clouds
- Allow reading of files from remote file stores such as S3 [willing to contribute a PR!] HOT 5
- Unable to show true whites/blacks in grayscale images due to linear interpolation
- Property `point_normals` does not return active normals HOT 1
- Is it possible to return the coordinate data of the shadow area?
- Changing focal point of plotter when pressing 'f' doesnt work when plotting UnstructuredGrid and editting it.
- Backface rendering parameters not working in interactive plots HOT 4
- Mesh duplication
- OSError when import pyvista HOT 5
- how to stabilize rotation during interaction?
- Parallel projection spoils plot
- Error reading large VTK XLM-files ( e.g. vtu-files) HOT 3
- `extract_points` and `extract_cells` modify input data arrays
- `PolyData` initializes verts as faces and does not raise error (and may crash Python) HOT 7
- Bug with non-default center and direction for capsule with VTK<9.3
- `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
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.