X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers_I%2FStdMeshers_ProjectionSource1D_i.cxx;fp=src%2FStdMeshers_I%2FStdMeshers_ProjectionSource1D_i.cxx;h=2e17b43f2fc01adc2e96e8131fe6f349e397e8bb;hp=6067de55bd7116ce39f241a40dbdfb2cb1742a9d;hb=0e9eae4ed4e7d8f7bd40a0e49bc9a43c84eace67;hpb=a2e43e2ea850da3884a19783b79f3a0862fd6a6c diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx index 6067de55b..2e17b43f2 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx @@ -300,3 +300,46 @@ void StdMeshers_ProjectionSource1D_i::LoadFrom( const char* theStream ) str >> myShapeEntries[ i ]; } +//================================================================================ +/*! + * \brief Return geometry this hypothesis depends on. Return false if there is no geometry parameter + */ +//================================================================================ + +bool +StdMeshers_ProjectionSource1D_i::getObjectsDependOn( std::vector< std::string > & entryArray, + std::vector< int > & subIDArray ) const +{ + for ( int i = 0; i < NB_SHAPES; ++i ) + entryArray.push_back( myShapeEntries[ i ]); + + return true; +} + +//================================================================================ +/*! + * \brief Set new geometry instead of that returned by getObjectsDependOn() + */ +//================================================================================ + +bool +StdMeshers_ProjectionSource1D_i::setObjectsDependOn( std::vector< std::string > & entryArray, + std::vector< int > & subIDArray ) +{ + TopoDS_Shape shapes[ NB_SHAPES ]; + for ( int i = 0; i < NB_SHAPES; ++i ) + { + myShapeEntries[ i ] = entryArray[ i ]; + shapes[ i ] = StdMeshers_ObjRefUlils::EntryToShape( entryArray[ i ]); + } + + try { + GetImpl()->SetSourceEdge ( shapes[ SRC_EDGE ] ); + GetImpl()->SetVertexAssociation( shapes[ SRC_VERTEX ], + shapes[ TGT_VERTEX ]); + } + catch (...) { + return false; + } + return true; +}