Difference between revisions of "VTK/Examples/Cxx/PolyData/CleanPolyData"

From KitwarePublic
< VTK‎ | Examples‎ | Cxx
Jump to navigationJump to search
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
==CleanPolyData.cxx==
+
= '''See [https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/CleanPolyData CleanPolyData] on the new [https://lorensen.github.io/VTKExamples/site/ VTKExamples website].''' =
<source lang="cpp">
 
#include <vtkSmartPointer.h>
 
#include <vtkCubeSource.h>
 
#include <vtkPolyData.h>
 
#include <vtkCleanPolyData.h>
 
 
 
int main(int, char *[])
 
{
 
  vtkSmartPointer<vtkCubeSource> cubeSource =
 
    vtkSmartPointer<vtkCubeSource>::New();
 
  cubeSource->Update();
 
 
 
  std::cout << "Input cube has " << cubeSource->GetOutput()->GetNumberOfPoints()
 
    << " vertices." << std::endl;
 
   
 
  vtkSmartPointer<vtkCleanPolyData> cleanPolyData =
 
      vtkSmartPointer<vtkCleanPolyData>::New();
 
  cleanPolyData->SetInputConnection(cubeSource->GetOutputPort());
 
  cleanPolyData->Update();
 
 
 
  std::cout << "Cleaned cube has " << cleanPolyData->GetOutput()->GetNumberOfPoints()
 
    << " vertices." << std::endl;
 
 
 
  return EXIT_SUCCESS;
 
}
 
 
 
</source>
 
 
 
==CMakeLists.txt==
 
<source lang="cmake">
 
cmake_minimum_required(VERSION 2.6)
 
PROJECT(CleanPolyData)
 
 
 
FIND_PACKAGE(VTK REQUIRED)
 
INCLUDE(${VTK_USE_FILE})
 
 
 
ADD_EXECUTABLE(CleanPolyData CleanPolyData.cxx)
 
TARGET_LINK_LIBRARIES(CleanPolyData vtkHybrid)
 
 
 
 
 
</source>
 
 
 
[http://www.resumesplanet.com resume writing service]
 

Latest revision as of 15:29, 9 September 2019