mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
PAL8581. Add IsParametric parameter to Smooth()
This commit is contained in:
parent
618529fa9f
commit
a29cea0f7d
@ -541,13 +541,15 @@ module SMESH
|
|||||||
in long_array IDsOfFixedNodes,
|
in long_array IDsOfFixedNodes,
|
||||||
in long MaxNbOfIterations,
|
in long MaxNbOfIterations,
|
||||||
in double MaxAspectRatio,
|
in double MaxAspectRatio,
|
||||||
in Smooth_Method Method);
|
in Smooth_Method Method,
|
||||||
|
in boolean IsParametric);
|
||||||
|
|
||||||
boolean SmoothObject(in SMESH_IDSource theObject,
|
boolean SmoothObject(in SMESH_IDSource theObject,
|
||||||
in long_array IDsOfFixedNodes,
|
in long_array IDsOfFixedNodes,
|
||||||
in long MaxNbOfIterations,
|
in long MaxNbOfIterations,
|
||||||
in double MaxAspectRatio,
|
in double MaxAspectRatio,
|
||||||
in Smooth_Method Method);
|
in Smooth_Method Method,
|
||||||
|
in boolean IsParametric);
|
||||||
|
|
||||||
void RenumberNodes();
|
void RenumberNodes();
|
||||||
|
|
||||||
|
@ -625,7 +625,8 @@ CORBA::Boolean
|
|||||||
const SMESH::long_array & IDsOfFixedNodes,
|
const SMESH::long_array & IDsOfFixedNodes,
|
||||||
CORBA::Long MaxNbOfIterations,
|
CORBA::Long MaxNbOfIterations,
|
||||||
CORBA::Double MaxAspectRatio,
|
CORBA::Double MaxAspectRatio,
|
||||||
SMESH::SMESH_MeshEditor::Smooth_Method Method)
|
SMESH::SMESH_MeshEditor::Smooth_Method Method,
|
||||||
|
CORBA::Boolean IsParametric)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh* aMesh = GetMeshDS();
|
SMESHDS_Mesh* aMesh = GetMeshDS();
|
||||||
|
|
||||||
@ -651,7 +652,8 @@ CORBA::Boolean
|
|||||||
method = ::SMESH_MeshEditor::CENTROIDAL;
|
method = ::SMESH_MeshEditor::CENTROIDAL;
|
||||||
|
|
||||||
::SMESH_MeshEditor anEditor( _myMesh );
|
::SMESH_MeshEditor anEditor( _myMesh );
|
||||||
anEditor.Smooth( elements, fixedNodes, method, MaxNbOfIterations, MaxAspectRatio );
|
anEditor.Smooth(elements, fixedNodes, method,
|
||||||
|
MaxNbOfIterations, MaxAspectRatio, IsParametric );
|
||||||
|
|
||||||
// Update Python script
|
// Update Python script
|
||||||
TCollection_AsciiString str ("isDone = mesh_editor.Smooth(");
|
TCollection_AsciiString str ("isDone = mesh_editor.Smooth(");
|
||||||
@ -661,9 +663,11 @@ CORBA::Boolean
|
|||||||
str += ", ";
|
str += ", ";
|
||||||
str += (Standard_Real) MaxAspectRatio;
|
str += (Standard_Real) MaxAspectRatio;
|
||||||
if ( method == ::SMESH_MeshEditor::CENTROIDAL )
|
if ( method == ::SMESH_MeshEditor::CENTROIDAL )
|
||||||
str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH )";
|
str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH, ";
|
||||||
else
|
else
|
||||||
str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH )";
|
str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH, ";
|
||||||
|
str += IsParametric;
|
||||||
|
str += " )";
|
||||||
SMESH_Gen_i::AddToCurrentPyScript( str );
|
SMESH_Gen_i::AddToCurrentPyScript( str );
|
||||||
#ifdef _DEBUG_
|
#ifdef _DEBUG_
|
||||||
SMESH_Gen_i::AddToCurrentPyScript( "print \"Smooth: \", isDone" );
|
SMESH_Gen_i::AddToCurrentPyScript( "print \"Smooth: \", isDone" );
|
||||||
@ -683,11 +687,12 @@ CORBA::Boolean
|
|||||||
const SMESH::long_array & IDsOfFixedNodes,
|
const SMESH::long_array & IDsOfFixedNodes,
|
||||||
CORBA::Long MaxNbOfIterations,
|
CORBA::Long MaxNbOfIterations,
|
||||||
CORBA::Double MaxAspectRatio,
|
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();
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
CORBA::Boolean isDone = Smooth
|
CORBA::Boolean isDone = Smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
|
||||||
(anElementsId, IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method);
|
MaxAspectRatio, Method, IsParametric);
|
||||||
|
|
||||||
// Clear python line(s), created by Smooth()
|
// Clear python line(s), created by Smooth()
|
||||||
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen();
|
||||||
@ -703,10 +708,12 @@ CORBA::Boolean
|
|||||||
str += (Standard_Integer) MaxNbOfIterations;
|
str += (Standard_Integer) MaxNbOfIterations;
|
||||||
str += ", ";
|
str += ", ";
|
||||||
str += (Standard_Real) MaxAspectRatio;
|
str += (Standard_Real) MaxAspectRatio;
|
||||||
if ( Method == SMESH::SMESH_MeshEditor::CENTROIDAL_SMOOTH )
|
if ( Method == ::SMESH_MeshEditor::CENTROIDAL )
|
||||||
str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH )";
|
str += ", SMESH.SMESH_MeshEditor.CENTROIDAL_SMOOTH, ";
|
||||||
else
|
else
|
||||||
str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH )";
|
str += ", SMESH.SMESH_MeshEditor.LAPLACIAN_SMOOTH, ";
|
||||||
|
str += IsParametric;
|
||||||
|
str += " )";
|
||||||
SMESH_Gen_i::AddToCurrentPyScript( str );
|
SMESH_Gen_i::AddToCurrentPyScript( str );
|
||||||
#ifdef _DEBUG_
|
#ifdef _DEBUG_
|
||||||
SMESH_Gen_i::AddToCurrentPyScript( "print \"SmoothObject: \", isDone" );
|
SMESH_Gen_i::AddToCurrentPyScript( "print \"SmoothObject: \", isDone" );
|
||||||
|
@ -81,13 +81,14 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
const SMESH::long_array & IDsOfFixedNodes,
|
const SMESH::long_array & IDsOfFixedNodes,
|
||||||
CORBA::Long MaxNbOfIterations,
|
CORBA::Long MaxNbOfIterations,
|
||||||
CORBA::Double MaxAspectRatio,
|
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,
|
CORBA::Boolean SmoothObject(SMESH::SMESH_IDSource_ptr theObject,
|
||||||
const SMESH::long_array & IDsOfFixedNodes,
|
const SMESH::long_array & IDsOfFixedNodes,
|
||||||
CORBA::Long MaxNbOfIterations,
|
CORBA::Long MaxNbOfIterations,
|
||||||
CORBA::Double MaxAspectRatio,
|
CORBA::Double MaxAspectRatio,
|
||||||
SMESH::SMESH_MeshEditor::Smooth_Method Method);
|
SMESH::SMESH_MeshEditor::Smooth_Method Method,
|
||||||
|
CORBA::Boolean IsParametric);
|
||||||
|
|
||||||
void RenumberNodes();
|
void RenumberNodes();
|
||||||
void RenumberElements();
|
void RenumberElements();
|
||||||
|
Loading…
Reference in New Issue
Block a user