From: eap Date: Wed, 27 Apr 2005 06:04:31 +0000 (+0000) Subject: PAL8581. Add IsParametric parameter to Smooth() X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a29cea0f7d07596c34a26bf06d86cc7c39b1971a;p=modules%2Fsmesh.git PAL8581. Add IsParametric parameter to Smooth() --- diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index 78ecc771e..0fc7456c5 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -541,13 +541,15 @@ module SMESH in long_array IDsOfFixedNodes, in long MaxNbOfIterations, in double MaxAspectRatio, - in Smooth_Method Method); + in Smooth_Method Method, + in boolean IsParametric); boolean SmoothObject(in SMESH_IDSource theObject, in long_array IDsOfFixedNodes, in long MaxNbOfIterations, in double MaxAspectRatio, - in Smooth_Method Method); + in Smooth_Method Method, + in boolean IsParametric); void RenumberNodes(); diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 3b9dccf9d..776fd0c37 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -625,7 +625,8 @@ CORBA::Boolean const SMESH::long_array & IDsOfFixedNodes, CORBA::Long MaxNbOfIterations, CORBA::Double MaxAspectRatio, - SMESH::SMESH_MeshEditor::Smooth_Method Method) + SMESH::SMESH_MeshEditor::Smooth_Method Method, + CORBA::Boolean IsParametric) { SMESHDS_Mesh* aMesh = GetMeshDS(); @@ -651,7 +652,8 @@ CORBA::Boolean method = ::SMESH_MeshEditor::CENTROIDAL; ::SMESH_MeshEditor anEditor( _myMesh ); - anEditor.Smooth( elements, fixedNodes, method, MaxNbOfIterations, MaxAspectRatio ); + anEditor.Smooth(elements, fixedNodes, method, + MaxNbOfIterations, MaxAspectRatio, IsParametric ); // Update Python script TCollection_AsciiString str ("isDone = mesh_editor.Smooth("); @@ -661,9 +663,11 @@ CORBA::Boolean str += ", "; str += (Standard_Real) MaxAspectRatio; if ( method == ::SMESH_MeshEditor::CENTROIDAL ) - str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH )"; + str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH, "; else - str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH )"; + str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH, "; + str += IsParametric; + str += " )"; SMESH_Gen_i::AddToCurrentPyScript( str ); #ifdef _DEBUG_ SMESH_Gen_i::AddToCurrentPyScript( "print \"Smooth: \", isDone" ); @@ -683,11 +687,12 @@ CORBA::Boolean const SMESH::long_array & IDsOfFixedNodes, CORBA::Long MaxNbOfIterations, CORBA::Double MaxAspectRatio, - SMESH::SMESH_MeshEditor::Smooth_Method Method) + SMESH::SMESH_MeshEditor::Smooth_Method Method, + CORBA::Boolean IsParametric) { SMESH::long_array_var anElementsId = theObject->GetIDs(); - CORBA::Boolean isDone = Smooth - (anElementsId, IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method); + CORBA::Boolean isDone = Smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations, + MaxAspectRatio, Method, IsParametric); // Clear python line(s), created by Smooth() SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); @@ -703,10 +708,12 @@ CORBA::Boolean str += (Standard_Integer) MaxNbOfIterations; str += ", "; str += (Standard_Real) MaxAspectRatio; - if ( Method == SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH ) - str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH )"; + if ( Method == ::SMESH_MeshEditor::CENTROIDAL ) + str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH, "; else - str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH )"; + str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH, "; + str += IsParametric; + str += " )"; SMESH_Gen_i::AddToCurrentPyScript( str ); #ifdef _DEBUG_ SMESH_Gen_i::AddToCurrentPyScript( "print \"SmoothObject: \", isDone" ); diff --git a/src/SMESH_I/SMESH_MeshEditor_i.hxx b/src/SMESH_I/SMESH_MeshEditor_i.hxx index 38694d9fc..3ee4fe514 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.hxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.hxx @@ -81,13 +81,14 @@ 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); + SMESH::SMESH_MeshEditor::Smooth_Method Method, + CORBA::Boolean 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); - + SMESH::SMESH_MeshEditor::Smooth_Method Method, + CORBA::Boolean IsParametric); void RenumberNodes(); void RenumberElements();