using namespace cpPlugins::Interface;
Parameters::TUint dim = this->m_Parameters.GetValueAsUint( "Dimension" );
std::string r = "MeshReader: Mesh dimension not supported.";
- if( dim == 3 )
+ if( dim == 2 )
+ r = this->_GD0< 2 >( );
+ else if( dim == 3 )
r = this->_GD0< 3 >( );
return( r );
}
this->m_Reader = pdr;
pdr->SetFileName( fname.c_str( ) );
pdr->Update( );
- this->m_Outputs[ 0 ]->SetVTKDataObject( pdr->GetOutput( ) );
+
+ cpPlugins::Interface::Mesh* out =
+ this->_Output< cpPlugins::Interface::Mesh >( 0 );
+ if( out != NULL )
+ out->SetVTKMesh( pdr->GetOutput( ) );
+ else
+ return( "MeshReader: output not correctly created." );
return( "" );
}