Hi,
I’d like to select the vertices of a polydata, and their associated triangles, based on a condition using an implicit function. So it would be something like select my vertice if its position satisfies an inequality corresponding to the implicit function.
For example, I would define an ellipsoid and extract all the vertices of a polydata within that ellipsoid.
I went through a lot of examples but I couldn’t find a way to achieve what I want.
How could I do that?
Thanks for your help
Ludovic
vtkExtractPoints will extrrack points within an impliicut function:
https://lorensen.github.io/VTKExamples/site/Cxx/Points/ExtractPointsDemo/
It does not extract the corresponding polydata.
Bill
Another approach.
1)Use vtkSampleFunction to great a volume from an implicit function
2) Probe that volume with your polydata
3) Use vtkThreshold to extract cells that are less than the isovalue
defining the surface on the implicit function.
Another, probably the best:
Use vtkSelectEnclosedPoints
Hi Bill,
Wow 3 different solutions thanks!
By following linked filters, I found https://vtk.org/doc/nightly/html/classvtkExtractPolyDataGeometry.html.
I think this is probably what I’m looking for.
What do you think?
That looks like the best approach.
I just added an example: https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/CellsInsideObject/
that selects cells inside a closed surface (not an implicit function).
Bill
Thanks Bill,
That’s definitively something useful to know how to do.