X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FStdMeshers_I%2FStdMeshers_ProjectionSource1D_i.cxx;h=78c9c56b98bb1c8cbf64a19b823b7895907ba9af;hb=a274ade365bd0f0e19d56c577acc4a13aa1972a7;hp=7b4048662ec682fe71197117b45b25ab1952af9c;hpb=d5029840731bccaa1718e65f0abf3b19198c7293;p=modules%2Fsmesh.git diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx index 7b4048662..78c9c56b9 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -74,7 +74,6 @@ StdMeshers_ProjectionSource1D_i::~StdMeshers_ProjectionSource1D_i() //============================================================================= void StdMeshers_ProjectionSource1D_i::SetSourceEdge(GEOM::GEOM_Object_ptr edge) - throw ( SALOME::SALOME_Exception ) { ASSERT( myBaseImpl ); try { @@ -98,7 +97,6 @@ void StdMeshers_ProjectionSource1D_i::SetSourceEdge(GEOM::GEOM_Object_ptr edge) void StdMeshers_ProjectionSource1D_i::SetVertexAssociation(GEOM::GEOM_Object_ptr sourceVertex, GEOM::GEOM_Object_ptr targetVertex) - throw ( SALOME::SALOME_Exception ) { ASSERT( myBaseImpl ); try { @@ -124,7 +122,6 @@ void StdMeshers_ProjectionSource1D_i::SetVertexAssociation(GEOM::GEOM_Object_ptr //============================================================================= void StdMeshers_ProjectionSource1D_i::SetSourceMesh(SMESH::SMESH_Mesh_ptr theMesh) - throw ( SALOME::SALOME_Exception ) { ASSERT( myBaseImpl ); @@ -298,3 +295,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; +}