This commit is contained in:
papush! 2022-03-14 14:30:11 +01:00
parent 62e4cd1629
commit 52fc7bd32e
2 changed files with 6 additions and 1 deletions

View File

@ -12,6 +12,7 @@ set(VTK_COMPONENTS
VTK::IOGeometry
VTK::IOXML
VTK::FiltersModeling
VTK::FiltersPoints
VTK::vtksys)
set(ENABLE_VIEWER OFF CACHE BOOL "Enable the 3D viewer, depends on Qt.")
if(ENABLE_VIEWER)

View File

@ -15,6 +15,7 @@
#include <vtkXMLUnstructuredGridReader.h>
#include <vtkXMLUnstructuredGridWriter.h>
#include <vtksys/SystemTools.hxx>
#include <vtkPointSmoothingFilter.h>
#ifdef USE_VIEWER
#include <vtkCamera.h>
@ -82,8 +83,11 @@ int main(int argc, char **argv) {
vtkNew<DihedralAnglesFilter> dihedralAnglesFilter;
dihedralAnglesFilter->SetInputConnection(project->GetOutputPort());
vtkNew<vtkPointSmoothingFilter> pointSmoothingFilter;
pointSmoothingFilter->SetInputConnection(dihedralAnglesFilter->GetOutputPoort());
vtkNew<vtkXMLUnstructuredGridWriter> writer;
writer->SetInputConnection(dihedralAnglesFilter->GetOutputPort());
writer->SetInputConnection(pointSmoothingFilter->GetOutputPort());
writer->SetDataModeToAscii();
writer->SetFileName("out.vtu");
writer->Write();