]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH_I/SMESH_2smeshpy.cxx
Salome HOME
Merge from PortingMED3 07Apr11
[modules/smesh.git] / src / SMESH_I / SMESH_2smeshpy.cxx
index 4a42fdfd2bd3cf17f6efe71b489b3cd3539148b1..6f4798448ffdf4e5c903131e866c7ce9618dfce2 100644 (file)
@@ -1160,7 +1160,7 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
   bool isPyMeshMethod = sameMethods.Contains( method );
   if ( !isPyMeshMethod )
   {
-    //Replace SMESH_MeshEditor "MakeGroups" functions on the Mesh 
+    //Replace SMESH_MeshEditor "MakeGroups" functions by the Mesh 
     //functions with the flag "theMakeGroups = True" like:
     //SMESH_MeshEditor.CmdMakeGroups => Mesh.Cmd(...,True)
     int pos = method.Search("MakeGroups");
@@ -1197,13 +1197,28 @@ void _pyMeshEditor::Process( const Handle(_pyCommand)& theCommand)
   // DoubleNodeGroupNew() -> DoubleNodeGroup()
   // DoubleNodeGroupsNew() -> DoubleNodeGroups()
   // DoubleNodeElemGroupsNew() -> DoubleNodeElemGroups()
-  if ( !isPyMeshMethod && ( method == "DoubleNodeElemGroupNew" || method == "DoubleNodeElemGroupsNew" ||
-                            method == "DoubleNodeGroupNew"     || method == "DoubleNodeGroupsNew"))
+  if ( !isPyMeshMethod && ( method == "DoubleNodeElemGroupNew"  ||
+                            method == "DoubleNodeElemGroupsNew" ||
+                            method == "DoubleNodeGroupNew"      ||
+                            method == "DoubleNodeGroupsNew"))
   {
     isPyMeshMethod=true;
     theCommand->SetMethod( method.SubString( 1, method.Length()-3));
     theCommand->SetArg(theCommand->GetNbArgs()+1,"True");
   }
+  // ConvertToQuadraticObject(bool,obj) -> ConvertToQuadratic(bool,obj)
+  // ConvertFromQuadraticObject(obj) -> ConvertFromQuadratic(obj)
+  if ( !isPyMeshMethod && ( method == "ConvertToQuadraticObject" ||
+                            method == "ConvertFromQuadraticObject" ))
+  {
+    isPyMeshMethod=true;
+    theCommand->SetMethod( method.SubString( 1, method.Length()-6));
+    // prevent moving creation of the converted sub-mesh to the end of the script
+    bool isFromQua = ( method.Value( 8 ) == 'F' );
+    Handle(_pySubMesh) sm = theGen->FindSubMesh( theCommand->GetArg( isFromQua ? 1 : 2 ));
+    if ( !sm.IsNull() )
+      sm->Process( theCommand );
+  }
 
   // meshes made by *MakeMesh() methods are not wrapped by _pyMesh,
   // so let _pyMesh care of it (TMP?)
@@ -2510,7 +2525,7 @@ void _pySubMesh::Process( const Handle(_pyCommand)& theCommand )
 
 //================================================================================
 /*!
- * \brief Clear creatin command if no commands invoked
+ * \brief Clear creation command if no commands invoked
  */
 //================================================================================