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< cpPlugins::Interface::Mesh >( "InputMesh" );
34 this->GetInputData< cpPlugins::Interface::ImplicitFunction >(
37 vtkCutter* cutter = this->_CreateVTK< vtkCutter >( );
39 cutter->SetInputData( mesh->GetVTK< vtkPolyData >( ) );
40 cutter->SetCutFunction( function->GetVTK< vtkImplicitFunction >( ) );
41 cutter->SetValue( 0, 1 );
42 cutter->GenerateTrianglesOff( );
46 auto out = this->GetOutputData< cpPlugins::Interface::Mesh >( "Output" );
47 out->SetVTK( cutter->GetOutput( ) );