+     * \brief Wrap a sequence of ids in a SMESH_IDSource
+     */
+    SMESH_IDSource MakeIDSource(in long_array IDsOfElements);
This commit is contained in:
eap 2010-02-26 08:15:02 +00:00
parent b2f987804d
commit c73dc0e564
3 changed files with 44 additions and 1 deletions

View File

@ -35,6 +35,11 @@ module SMESH
interface NumericalFunctor;
interface SMESH_MeshEditor
{
/*!
* \brief Wrap a sequence of ids in a SMESH_IDSource
*/
SMESH_IDSource MakeIDSource(in long_array IDsOfElements);
boolean RemoveElements(in long_array IDsOfElements);
boolean RemoveNodes(in long_array IDsOfNodes);
@ -211,6 +216,17 @@ module SMESH
long BestSplit (in long IDOfQuad,
in NumericalFunctor Criterion);
/*!
* \brief Split volumic elements into tetrahedrons
* \param elems - elements to split
* \param methodFlags - flags passing splitting method:
* 1 - split the hexahedron into 5 tetrahedrons
* 2 - split the hexahedron into 6 tetrahedrons
*/
//void SplitVolumesIntoTetra(in SMESH_IDSource elems, in short methodFlags)
//raises (SALOME::SALOME_Exception);
enum Smooth_Method { LAPLACIAN_SMOOTH, CENTROIDAL_SMOOTH };
boolean Smooth(in long_array IDsOfElements,

View File

@ -271,6 +271,27 @@ void SMESH_MeshEditor_i::initData(bool deleteSearchers)
}
}
//=======================================================================
//function : MakeIDSource
//purpose : Wrap a sequence of ids in a SMESH_IDSource
//=======================================================================
struct _IDSource : public POA_SMESH::SMESH_IDSource
{
SMESH::long_array _ids;
SMESH::long_array* GetIDs() { return & _ids; }
SMESH::long_array* GetMeshInfo() { return 0; }
};
SMESH::SMESH_IDSource_ptr SMESH_MeshEditor_i::MakeIDSource(const SMESH::long_array& ids)
{
_IDSource* anIDSource = new _IDSource;
anIDSource->_ids = ids;
SMESH::SMESH_IDSource_var anIDSourceVar = anIDSource->_this();
return anIDSourceVar._retn();
}
//=============================================================================
/*!
*

View File

@ -41,12 +41,18 @@ class SMESH_Mesh_i;
class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
{
public:
public:
SMESH_MeshEditor_i(SMESH_Mesh_i * theMesh, bool isPreview);
virtual ~ SMESH_MeshEditor_i();
// --- CORBA
/*!
* \brief Wrap a sequence of ids in a SMESH_IDSource
*/
SMESH::SMESH_IDSource_ptr MakeIDSource(const SMESH::long_array& IDsOfElements);
CORBA::Boolean RemoveElements(const SMESH::long_array & IDsOfElements);
CORBA::Boolean RemoveNodes(const SMESH::long_array & IDsOfNodes);