vtk unstructured grid 转 polydata

将unstructured grid 转 polydata有两种方法,可用vtkDataSetSurfaceFilter和vtkGeometryFilter。
vtkDataSetSurfaceFilter示例:

 vtkSmartPointer<vtkUnstructuredGrid> unstructuredGrid = 
    vtkSmartPointer<vtkUnstructuredGrid>::New();

  vtkSmartPointer<vtkDataSetSurfaceFilter> surfaceFilter = 
    vtkSmartPointer<vtkDataSetSurfaceFilter>::New();
  surfaceFilter->SetInputData(unstructuredGrid);
  surfaceFilter->Update(); 

  vtkPolyData* polydata = surfaceFilter->GetOutput();

 

已标记关键词 清除标记
相关推荐
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页