mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-14 02:30:33 +05:00
PAL8581. Add SmoothParametric[Object]() instead of IsParametric parameter addition
This commit is contained in:
parent
32c49c2db1
commit
bc108308ca
@ -541,15 +541,25 @@ 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);
|
|
||||||
|
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();
|
void RenumberNodes();
|
||||||
|
|
||||||
|
@ -614,6 +614,70 @@ CORBA::Boolean
|
|||||||
return isDone;
|
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
|
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,
|
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)
|
bool IsParametric)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh* aMesh = GetMeshDS();
|
SMESHDS_Mesh* aMesh = GetMeshDS();
|
||||||
|
|
||||||
@ -656,7 +720,8 @@ CORBA::Boolean
|
|||||||
MaxNbOfIterations, MaxAspectRatio, IsParametric );
|
MaxNbOfIterations, MaxAspectRatio, IsParametric );
|
||||||
|
|
||||||
// Update Python script
|
// 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, IDsOfElements ) += ", ";
|
||||||
SMESH_Gen_i::AddArray( str, IDsOfFixedNodes ) += ", ";
|
SMESH_Gen_i::AddArray( str, IDsOfFixedNodes ) += ", ";
|
||||||
str += (Standard_Integer) MaxNbOfIterations;
|
str += (Standard_Integer) MaxNbOfIterations;
|
||||||
@ -683,15 +748,15 @@ CORBA::Boolean
|
|||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
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,
|
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)
|
bool IsParametric)
|
||||||
{
|
{
|
||||||
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
SMESH::long_array_var anElementsId = theObject->GetIDs();
|
||||||
CORBA::Boolean isDone = Smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
|
CORBA::Boolean isDone = smooth (anElementsId, IDsOfFixedNodes, MaxNbOfIterations,
|
||||||
MaxAspectRatio, Method, IsParametric);
|
MaxAspectRatio, Method, IsParametric);
|
||||||
|
|
||||||
// Clear python line(s), created by Smooth()
|
// Clear python line(s), created by Smooth()
|
||||||
@ -702,7 +767,8 @@ CORBA::Boolean
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Update Python script
|
// 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::AddObject( str, theObject ) += ", ";
|
||||||
SMESH_Gen_i::AddArray( str, IDsOfFixedNodes ) += ", ";
|
SMESH_Gen_i::AddArray( str, IDsOfFixedNodes ) += ", ";
|
||||||
str += (Standard_Integer) MaxNbOfIterations;
|
str += (Standard_Integer) MaxNbOfIterations;
|
||||||
|
@ -81,14 +81,34 @@ 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,
|
||||||
|
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,
|
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);
|
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,
|
||||||
|
bool IsParametric);
|
||||||
|
|
||||||
void RenumberNodes();
|
void RenumberNodes();
|
||||||
void RenumberElements();
|
void RenumberElements();
|
||||||
|
Loading…
Reference in New Issue
Block a user