X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_2smeshpy.cxx;h=f3a0a556cf1f207d763f09df3900c39a2aa20d0a;hb=7dbb2914d9aa9785661fc4ffb43358ec9a578cf9;hp=17ee75746e49b91d4e0f02b86d1e43d47f08f01d;hpb=a1920ff31054e2c882bd94d4f3c04abe53980ce0;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index 17ee75746..f3a0a556c 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -452,7 +452,7 @@ namespace { * \param theRemovedObjIDs - entries of objects whose created commands were removed * \param theHistoricalDump - true means to keep all commands, false means * to exclude commands relating to objects removed from study - * \retval TCollection_AsciiString - Convertion result + * \retval TCollection_AsciiString - Conversion result */ //================================================================================ @@ -686,6 +686,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand _AString indent = aCommand->GetIndentation(); _AString tryStr = indent + "try:"; _AString newCmd = indent + tab + ( aCommand->GetString().ToCString() + indent.Length() ); + _AString pasCmd = indent + tab + "pass"; // to keep valid if newCmd is erased _AString excStr = indent + "except:"; _AString msgStr = indent + "\tprint '"; msgStr += method + "() failed. Invalid file name?'"; @@ -693,6 +694,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand aCommand->Clear(); aCommand->GetString() = newCmd; aCommand->SetOrderNb( ++myNbCommands ); + myCommands.push_back( new _pyCommand( pasCmd, ++myNbCommands )); myCommands.push_back( new _pyCommand( excStr, ++myNbCommands )); myCommands.push_back( new _pyCommand( msgStr, ++myNbCommands )); } @@ -1334,7 +1336,7 @@ Handle(_pyHypothesis) _pyGen::FindHyp( const _pyID& theHypID ) * \brief Find algorithm able to create a hypothesis * \param theGeom - The shape ID the algorithm was created on * \param theMesh - The mesh ID that created the algorithm - * \param theHypothesis - The hypothesis the algorithm sould be able to create + * \param theHypothesis - The hypothesis the algorithm should be able to create * \retval Handle(_pyHypothesis) - The found algo */ //================================================================================ @@ -2159,7 +2161,7 @@ void _pyMesh::Flush() for ( ; m != fatherMeshes.end(); ++m ) addFatherMesh( *m ); // if ( removedGeom ) - // SetRemovedFromStudy(); // as reffered geometry not in study + // SetRemovedFromStudy(); // as referred geometry not in study } if ( myGeomNotInStudy ) return; @@ -2722,7 +2724,7 @@ bool _pyHypothesis::IsWrappable(const _pyID& theMesh) const * \brief Convert the command adding a hypothesis to mesh into a smesh command * \param theCmd - The command like mesh.AddHypothesis( geom, hypo ) * \param theAlgo - The algo that can create this hypo - * \retval bool - false if the command cant be converted + * \retval bool - false if the command can't be converted */ //================================================================================ @@ -2847,7 +2849,7 @@ void _pyHypothesis::Flush() //================================================================================ /*! - * \brief clear creation, arg and unkown commands + * \brief clear creation, arg and unknown commands */ //================================================================================ @@ -3381,7 +3383,7 @@ void _pyLayerDistributionHypo::Flush() * \brief additionally to Addition2Creation, clears SetDistrType() command * \param theCmd - AddHypothesis() command * \param theMesh - mesh to which a hypothesis is added - * \retval bool - convertion result + * \retval bool - conversion result */ //================================================================================ @@ -3463,7 +3465,7 @@ void _pyNumberOfSegmentsHyp::Flush() * into regular1D.LengthNearVertex( length, vertex ) * \param theCmd - The command like mesh.AddHypothesis( vertex, SegmentLengthAroundVertex ) * \param theMesh - The mesh needing this hypo - * \retval bool - false if the command cant be converted + * \retval bool - false if the command can't be converted */ //================================================================================ @@ -3521,7 +3523,7 @@ _pyAlgorithm::_pyAlgorithm(const Handle(_pyCommand)& theCreationCmd) * \brief Convert the command adding an algorithm to mesh * \param theCmd - The command like mesh.AddHypothesis( geom, algo ) * \param theMesh - The mesh needing this algo - * \retval bool - false if the command cant be converted + * \retval bool - false if the command can't be converted */ //================================================================================