[vtkusers] Extracting boundary points from an unstructured grid
Zoltan.Kovacs at esi-group.com
Tue Mar 5 05:52:08 EST 2019
I try to extract the boundary nodes of an unstructured grids. Based on the example
I used the following code:
vtkSmartPointer<vtkUnstructuredGrid> grid = vtkSmartPointer<vtkUnstructuredGrid>::New();
vtkSmartPointer<vtkDataSetSurfaceFilter> filter = vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
vtkSmartPointer<vtkFeatureEdges> edges = vtkSmartPointer<vtkFeatureEdges>::New();
/* load mesh into grid */
/* extract the boundary points */
vtkSmartPointer<vtkPolyData> polyData = edges->GetOutput();
When I print out the number of the points in polydata (polydata->GetNumberOfPoints()) I obtain 0, i.e.
polydata is empty. When I comment out the lines
then I get some subset of points in polydata extrated from the grid but when I visualize these points I see that some boundary points are missing and there are some inner nodes in polydata. Thus
polydata does not contain the exact set of the boundary points of the grid.
Now I am not sure if this is the correct way to extract the boundary points from an unstructured grid
and I would like to ask if there is any. Thank you very much for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers