2 #include <cpPlugins/Interface/ImplicitFunction.h>
3 #include <cpPlugins/Interface/Mesh.h>
6 #include <vtkProperty.h>
11 // -------------------------------------------------------------------------
12 cpPlugins::BasicFilters::Cutter::
16 this->_AddInput( "InputMesh" );
17 this->_AddInput( "InputFunction" );
18 this->_AddOutput< cpPlugins::Interface::Mesh >( "Output" );
21 // -------------------------------------------------------------------------
22 cpPlugins::BasicFilters::Cutter::
27 // -------------------------------------------------------------------------
28 std::string cpPlugins::BasicFilters::Cutter::
32 auto mesh = this->GetInputData( "InputMesh" );
33 auto function = this->GetInputData( "InputFunction" );
34 vtkCutter* cutter = this->_CreateVTK< vtkCutter >( );
36 cutter->SetInputData( mesh->GetVTK< vtkPolyData >( ) );
37 cutter->SetCutFunction( function->GetVTK< vtkImplicitFunction >( ) );
38 cutter->SetValue( 0, 1 );
39 cutter->GenerateTrianglesOff( );
43 auto out = this->GetOutputData( "Output" );
44 out->SetVTK( cutter->GetOutput( ) );