long_array elementConnectivities;
types_array elementTypes; };
+ interface SMESH_Mesh;
+
interface SMESH_IDSource
{
/*!
* Returns types of elements it contains
*/
array_of_ElementType GetTypes();
+
+ /*!
+ * Returns the mesh
+ */
+ SMESH_Mesh GetMesh();
};
interface SMESH_Group;
struct _IDSource : public POA_SMESH::SMESH_IDSource
{
- SMESH::long_array _ids;
- SMESH::ElementType _type;
+ SMESH::long_array _ids;
+ SMESH::ElementType _type;
+ SMESH::SMESH_Mesh_ptr _mesh;
SMESH::long_array* GetIDs() { return new SMESH::long_array( _ids ); }
SMESH::long_array* GetMeshInfo() { return 0; }
+ SMESH::SMESH_Mesh_ptr GetMesh() { return SMESH::SMESH_Mesh::_duplicate( _mesh ); }
SMESH::array_of_ElementType* GetTypes()
{
SMESH::array_of_ElementType_var types = new SMESH::array_of_ElementType;
_IDSource* anIDSource = new _IDSource;
anIDSource->_ids = ids;
anIDSource->_type = type;
+ anIDSource->_mesh = myMesh_i->_this();
SMESH::SMESH_IDSource_var anIDSourceVar = anIDSource->_this();
return anIDSourceVar._retn();
return types._retn();
}
+//=======================================================================
+//function : GetMesh
+//purpose : Returns self
+//=======================================================================
+
+SMESH::SMESH_Mesh_ptr SMESH_Mesh_i::GetMesh()
+{
+ return SMESH::SMESH_Mesh::_duplicate( _this() );
+}
+
//=============================================================================
/*!
* \brief Returns statistic of mesh elements
// =========================
virtual SMESH::long_array* GetIDs();
-
/*!
* Returns statistic of mesh elements
* Result array of number enityties
* Inherited from SMESH_IDSource
*/
virtual SMESH::long_array* GetMeshInfo();
-
/*!
* Returns types of elements it contains
*/
virtual SMESH::array_of_ElementType* GetTypes();
+ /*!
+ * Returns self
+ */
+ virtual SMESH::SMESH_Mesh_ptr GetMesh();
std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
}
return types._retn();
}
+
+//=======================================================================
+//function : GetMesh
+//purpose : interface SMESH_IDSource
+//=======================================================================
+
+SMESH::SMESH_Mesh_ptr SMESH_subMesh_i::GetMesh()
+{
+ return GetFather();
+}
SALOME_MED::FAMILY_ptr GetFamily()
throw (SALOME::SALOME_Exception);
- virtual SMESH::long_array* GetIDs();
+ // =========================
+ // interface SMESH_IDSource
+ // =========================
+ /*!
+ * Returns a sequence of all element IDs
+ */
+ virtual SMESH::long_array* GetIDs();
/*!
* Returns statistic of mesh elements
* Result array of number enityties
* Inherited from SMESH_IDSource
*/
virtual SMESH::long_array* GetMeshInfo();
-
/*!
* Returns types of elements it contains
*/
virtual SMESH::array_of_ElementType* GetTypes();
+ /*!
+ * Returns the mesh
+ */
+ SMESH::SMESH_Mesh_ptr GetMesh();
SMESH_Mesh_i* _mesh_i; //NRI