Salome HOME
+ /*!
authoreap <eap@opencascade.com>
Fri, 26 Feb 2010 08:15:02 +0000 (08:15 +0000)
committereap <eap@opencascade.com>
Fri, 26 Feb 2010 08:15:02 +0000 (08:15 +0000)
+     * \brief Wrap a sequence of ids in a SMESH_IDSource
+     */
+    SMESH_IDSource MakeIDSource(in long_array IDsOfElements);

idl/SMESH_MeshEditor.idl
src/SMESH_I/SMESH_MeshEditor_i.cxx
src/SMESH_I/SMESH_MeshEditor_i.hxx

index 62623567a5dbede64566b3cb6e3c47ba47870377..eb2715b4ed407e58b8d81e182cca97e76d7a5949 100644 (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,
index 000bc95e84c79b38ceecd757025d65c5e847562e..7ea5df70b9e997245db42cfb380f57f22b37d060 100644 (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();
+}
+
 //=============================================================================
 /*!
  *
index 5c4dd85ca809f8618684659336e155dbdcc88c11..bf0a3540be2d404c289ca16d87c7dabfd15e33e7 100644 (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);