]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
PAL8581. Add SmoothParametric[Object]() instead of IsParametric parameter addition
authoreap <eap@opencascade.com>
Thu, 12 May 2005 08:03:34 +0000 (08:03 +0000)
committereap <eap@opencascade.com>
Thu, 12 May 2005 08:03:34 +0000 (08:03 +0000)
idl/SMESH_Mesh.idl
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx

index 0fc7456c5a8a801e3823226be37f2b927b7d4425..c8be4aaca635a415f7680b8402f3adeaa2116bba 100644 (file)
@@ -541,15 +541,25 @@ module SMESH
                    in long_array    IDsOfFixedNodes,
                    in long          MaxNbOfIterations,
                    in double        MaxAspectRatio,
-                   in Smooth_Method Method,
-                   in boolean       IsParametric);
+                   in Smooth_Method Method);
 
     boolean SmoothObject(in SMESH_IDSource  theObject,
                         in long_array      IDsOfFixedNodes,
                         in long            MaxNbOfIterations,
                         in double          MaxAspectRatio,
-                        in Smooth_Method   Method,
-                         in boolean         IsParametric);
+                        in Smooth_Method   Method);
+
+    boolean SmoothParametric(in long_array    IDsOfElements,
+                             in long_array    IDsOfFixedNodes,
+                             in long          MaxNbOfIterations,
+                             in double        MaxAspectRatio,
+                             in Smooth_Method Method);
+
+    boolean SmoothParametricObject(in SMESH_IDSource  theObject,
+                                   in long_array      IDsOfFixedNodes,
+                                   in long            MaxNbOfIterations,
+                                   in double          MaxAspectRatio,
+                                   in Smooth_Method   Method);
 
     void RenumberNodes();
 
index 776fd0c371e1ac340d7b575ab924104f960a8e33..deb18da44c35b94d91df64aa6cde8009a3cbfa90 100644 (file)
@@ -614,6 +614,70 @@ CORBA::Boolean
   return isDone;
 }
 
+//=======================================================================
+//function : Smooth
+//purpose  : 
+//=======================================================================
+
+CORBA::Boolean
+  SMESH_MeshEditor_i::Smooth(const SMESH::long_array &              IDsOfElements,
+                             const SMESH::long_array &              IDsOfFixedNodes,
+                             CORBA::Long                            MaxNbOfIterations,
+                             CORBA::Double                          MaxAspectRatio,
+                             SMESH::SMESH_MeshEditor::Smooth_Method Method)
+{
+  return smooth( IDsOfElements, IDsOfFixedNodes, MaxNbOfIterations,
+                MaxAspectRatio, Method, false );
+}
+
+//=======================================================================
+//function : SmoothParametric
+//purpose  : 
+//=======================================================================
+
+CORBA::Boolean
+  SMESH_MeshEditor_i::SmoothParametric(const SMESH::long_array &              IDsOfElements,
+                                       const SMESH::long_array &              IDsOfFixedNodes,
+                                       CORBA::Long                            MaxNbOfIterations,
+                                       CORBA::Double                          MaxAspectRatio,
+                                       SMESH::SMESH_MeshEditor::Smooth_Method Method)
+{
+  return smooth( IDsOfElements, IDsOfFixedNodes, MaxNbOfIterations,
+                MaxAspectRatio, Method, true );
+}
+
+//=======================================================================
+//function : SmoothObject
+//purpose  : 
+//=======================================================================
+
+CORBA::Boolean
+  SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr              theObject,
+                                  const SMESH::long_array &              IDsOfFixedNodes,
+                                  CORBA::Long                            MaxNbOfIterations,
+                                  CORBA::Double                          MaxAspectRatio,
+                                  SMESH::SMESH_MeshEditor::Smooth_Method Method)
+{
+  return smoothObject (theObject, IDsOfFixedNodes, MaxNbOfIterations,
+                       MaxAspectRatio, Method, false);
+}
+
+//=======================================================================
+//function : SmoothParametricObject
+//purpose  : 
+//=======================================================================
+
+CORBA::Boolean
+  SMESH_MeshEditor_i::SmoothParametricObject(SMESH::SMESH_IDSource_ptr              theObject,
+                                  const SMESH::long_array &              IDsOfFixedNodes,
+                                  CORBA::Long                            MaxNbOfIterations,
+                                  CORBA::Double                          MaxAspectRatio,
+                                  SMESH::SMESH_MeshEditor::Smooth_Method Method)
+{
+  return smoothObject (theObject, IDsOfFixedNodes, MaxNbOfIterations,
+                       MaxAspectRatio, Method, true);
+}
+
 //=============================================================================
 /*!
  *  
@@ -621,12 +685,12 @@ CORBA::Boolean
 //=============================================================================
 
 CORBA::Boolean
-  SMESH_MeshEditor_i::Smooth(const SMESH::long_array &              IDsOfElements,
+  SMESH_MeshEditor_i::smooth(const SMESH::long_array &              IDsOfElements,
                              const SMESH::long_array &              IDsOfFixedNodes,
                              CORBA::Long                            MaxNbOfIterations,
                              CORBA::Double                          MaxAspectRatio,
                              SMESH::SMESH_MeshEditor::Smooth_Method Method,
-                             CORBA::Boolean                         IsParametric)
+                             bool                                   IsParametric)
 {
   SMESHDS_Mesh* aMesh = GetMeshDS();
 
@@ -656,7 +720,8 @@ CORBA::Boolean
                   MaxNbOfIterations, MaxAspectRatio, IsParametric );
 
   // Update Python script
-  TCollection_AsciiString str ("isDone = mesh_editor.Smooth(");
+  TCollection_AsciiString str ("isDone = mesh_editor.");
+  str += (char*) (IsParametric ? "SmoothParametric( " : "Smooth( ");
   SMESH_Gen_i::AddArray( str, IDsOfElements ) += ", ";
   SMESH_Gen_i::AddArray( str, IDsOfFixedNodes ) += ", ";
   str += (Standard_Integer) MaxNbOfIterations;
@@ -683,15 +748,15 @@ CORBA::Boolean
 //=============================================================================
 
 CORBA::Boolean
-  SMESH_MeshEditor_i::SmoothObject(SMESH::SMESH_IDSource_ptr              theObject,
+  SMESH_MeshEditor_i::smoothObject(SMESH::SMESH_IDSource_ptr              theObject,
                                   const SMESH::long_array &              IDsOfFixedNodes,
                                   CORBA::Long                            MaxNbOfIterations,
                                   CORBA::Double                          MaxAspectRatio,
                                   SMESH::SMESH_MeshEditor::Smooth_Method Method,
-                                   CORBA::Boolean                         IsParametric)
+                                   bool                                   IsParametric)
 {
   SMESH::long_array_var anElementsId = theObject->GetIDs();
-  CORBA::Boolean isDone = Smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
+  CORBA::Boolean isDone = smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
                                   MaxAspectRatio, Method, IsParametric);
 
   // Clear python line(s), created by Smooth()
@@ -702,7 +767,8 @@ CORBA::Boolean
 #endif
 
   // Update Python script
-  TCollection_AsciiString str ("isDone = mesh_editor.SmoothObject(");
+  TCollection_AsciiString str ("isDone = mesh_editor.");
+  str += (char*) (IsParametric ? "SmoothParametricObject( " : "SmoothObject( ");
   SMESH_Gen_i::AddObject( str, theObject ) += ", ";
   SMESH_Gen_i::AddArray( str, IDsOfFixedNodes ) += ", ";
   str += (Standard_Integer) MaxNbOfIterations;
index 3ee4fe514548341109f1aed26151bc637b49bf9f..2c6e18e09743becc1b7ce809b1f55702739e10ef 100644 (file)
@@ -81,14 +81,34 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
                         const SMESH::long_array &              IDsOfFixedNodes,
                         CORBA::Long                            MaxNbOfIterations,
                         CORBA::Double                          MaxAspectRatio,
-                        SMESH::SMESH_MeshEditor::Smooth_Method Method,
-                        CORBA::Boolean                         IsParametric);
+                        SMESH::SMESH_MeshEditor::Smooth_Method Method);
   CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr              theObject,
+                             const SMESH::long_array &              IDsOfFixedNodes,
+                             CORBA::Long                            MaxNbOfIterations,
+                             CORBA::Double                          MaxAspectRatio,
+                             SMESH::SMESH_MeshEditor::Smooth_Method Method);
+  CORBA::Boolean SmoothParametric(const SMESH::long_array &              IDsOfElements,
+                                  const SMESH::long_array &              IDsOfFixedNodes,
+                                  CORBA::Long                            MaxNbOfIterations,
+                                  CORBA::Double                          MaxAspectRatio,
+                                  SMESH::SMESH_MeshEditor::Smooth_Method Method);
+  CORBA::Boolean SmoothParametricObject(SMESH::SMESH_IDSource_ptr              theObject,
+                                        const SMESH::long_array &              IDsOfFixedNodes,
+                                        CORBA::Long                            MaxNbOfIterations,
+                                        CORBA::Double                          MaxAspectRatio,
+                                        SMESH::SMESH_MeshEditor::Smooth_Method Method);
+  CORBA::Boolean smooth(const SMESH::long_array &              IDsOfElements,
+                        const SMESH::long_array &              IDsOfFixedNodes,
+                        CORBA::Long                            MaxNbOfIterations,
+                        CORBA::Double                          MaxAspectRatio,
+                        SMESH::SMESH_MeshEditor::Smooth_Method Method,
+                        bool                                   IsParametric);
+  CORBA::Boolean smoothObject(SMESH::SMESH_IDSource_ptr              theObject,
                              const SMESH::long_array &              IDsOfFixedNodes,
                              CORBA::Long                            MaxNbOfIterations,
                              CORBA::Double                          MaxAspectRatio,
                              SMESH::SMESH_MeshEditor::Smooth_Method Method,
-                              CORBA::Boolean                         IsParametric);
+                              bool                                   IsParametric);
 
   void RenumberNodes();
   void RenumberElements();