X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_2smeshpy.cxx;h=c6bc91e8d5264fe152bde2c1d1e2ef1bd7093f44;hp=dfb378f245374942c3cbcde707e2a473220d9af9;hb=10363c830c5bc84c9a9a5d3378eeef687297d119;hpb=da229a770c169c29152f55e141913ef596893707 diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index dfb378f24..c6bc91e8d 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -247,7 +247,8 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand // SMESH_Mesh method? map< _pyID, Handle(_pyMesh) >::iterator id_mesh = myMeshes.find( objID ); - if ( id_mesh != myMeshes.end() ) { + if ( id_mesh != myMeshes.end() ) + { // check for mesh editor object if ( aCommand->GetMethod() == "GetMeshEditor" ) { // MeshEditor creation _pyID editorID = aCommand->GetResultValue(); @@ -268,7 +269,8 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand // SMESH_MeshEditor method? map< _pyID, Handle(_pyMeshEditor) >::iterator id_editor = myMeshEditors.find( objID ); - if ( id_editor != myMeshEditors.end() ) { + if ( id_editor != myMeshEditors.end() ) + { id_editor->second->Process( aCommand ); TCollection_AsciiString processedCommand = aCommand->GetString(); // some commands of SMESH_MeshEditor create meshes @@ -277,6 +279,15 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand aCommand->GetString() = processedCommand; // discard changes made by _pyMesh myMeshes.insert( make_pair( mesh->GetID(), mesh )); } + if ( aCommand->GetMethod() == "MakeBoundaryMesh") { + _pyID meshID = aCommand->GetResultValue(0); + if ( !myMeshes.count( meshID ) ) + { + Handle(_pyMesh) mesh = new _pyMesh( aCommand, meshID ); + aCommand->GetString() = processedCommand; // discard changes made by _pyMesh + myMeshes.insert( make_pair( meshID, mesh )); + } + } return aCommand; } // SMESH_Hypothesis method? @@ -352,7 +363,7 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand ) myMeshes.insert( make_pair( mesh->GetID(), mesh )); return; } - if ( method == "CreateMeshesFromUNV" || method == "CreateMeshesFromSTL") + if ( method == "CreateMeshesFromUNV" || method == "CreateMeshesFromSTL" || method == "CopyMesh" ) { Handle(_pyMesh) mesh = new _pyMesh( theCommand, theCommand->GetResultValue() ); myMeshes.insert( make_pair( mesh->GetID(), mesh )); @@ -1125,7 +1136,7 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand) "SewBorderToSide","SewSideElements","ChangeElemNodes","GetLastCreatedNodes", "GetLastCreatedElems", "MirrorMakeMesh","MirrorObjectMakeMesh","TranslateMakeMesh", - "TranslateObjectMakeMesh","RotateMakeMesh","RotateObjectMakeMesh" + "TranslateObjectMakeMesh","RotateMakeMesh","RotateObjectMakeMesh","MakeBoundaryMesh" ,"" }; // <- mark of the end sameMethods.Insert( names ); }