mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-11-15 10:08:34 +05:00
0020746: EDF 1274 SMESH : MergeAllNodesButNodesFromGroup feature
+ /*! + * Returns types of elements it contains + */ + virtual SMESH::array_of_ElementType* GetTypes();
This commit is contained in:
parent
d1d0bb638c
commit
e38b448770
@ -2206,6 +2206,21 @@ SMESH::long_array* ::Filter_i::GetMeshInfo()
|
|||||||
return aRes._retn();
|
return aRes._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//================================================================================
|
||||||
|
/*!
|
||||||
|
* \brief Return GetElementType() within an array
|
||||||
|
* Implement SMESH_IDSource interface
|
||||||
|
*/
|
||||||
|
//================================================================================
|
||||||
|
|
||||||
|
SMESH::array_of_ElementType* Filter_i::GetTypes()
|
||||||
|
{
|
||||||
|
SMESH::array_of_ElementType_var types = new SMESH::array_of_ElementType;
|
||||||
|
types->length( 1 );
|
||||||
|
types[0] = GetElementType();
|
||||||
|
return types._retn();
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
// name : getCriteria
|
// name : getCriteria
|
||||||
// Purpose : Retrieve criterions from predicate
|
// Purpose : Retrieve criterions from predicate
|
||||||
|
@ -790,6 +790,10 @@ namespace SMESH
|
|||||||
SMESH::long_array*
|
SMESH::long_array*
|
||||||
GetMeshInfo();
|
GetMeshInfo();
|
||||||
|
|
||||||
|
virtual
|
||||||
|
SMESH::array_of_ElementType*
|
||||||
|
GetTypes();
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
GetElementsId( Predicate_i*,
|
GetElementsId( Predicate_i*,
|
||||||
|
@ -426,17 +426,6 @@ SMESH::SMESH_Mesh_ptr SMESH_GroupBase_i::GetMesh()
|
|||||||
return aMesh._retn();
|
return aMesh._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=============================================================================
|
|
||||||
/*!
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
//=============================================================================
|
|
||||||
SMESH::long_array* SMESH_GroupBase_i::GetIDs()
|
|
||||||
{
|
|
||||||
SMESH::long_array_var aResult = GetListOfID();
|
|
||||||
return aResult._retn();
|
|
||||||
}
|
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GetShape
|
//function : GetShape
|
||||||
//purpose :
|
//purpose :
|
||||||
@ -543,3 +532,28 @@ SMESH::long_array* SMESH_GroupBase_i::GetMeshInfo()
|
|||||||
SMESH_Mesh_i::CollectMeshInfo( aGrpDS->GetElements(), aRes);
|
SMESH_Mesh_i::CollectMeshInfo( aGrpDS->GetElements(), aRes);
|
||||||
return aRes._retn();
|
return aRes._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetIDs
|
||||||
|
//purpose : Returns ids of members
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMESH::long_array* SMESH_GroupBase_i::GetIDs()
|
||||||
|
{
|
||||||
|
SMESH::long_array_var aResult = GetListOfID();
|
||||||
|
return aResult._retn();
|
||||||
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetTypes
|
||||||
|
//purpose : Returns types of elements it contains
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMESH::array_of_ElementType* SMESH_GroupBase_i::GetTypes()
|
||||||
|
{
|
||||||
|
SMESH::array_of_ElementType_var types = new SMESH::array_of_ElementType;
|
||||||
|
types->length( 1 );
|
||||||
|
types[0] = GetType();
|
||||||
|
return types._retn();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,12 @@ class SMESH_I_EXPORT SMESH_GroupBase_i:
|
|||||||
// Inherited from SMESH_IDSource interface
|
// Inherited from SMESH_IDSource interface
|
||||||
virtual SMESH::long_array* GetIDs();
|
virtual SMESH::long_array* GetIDs();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Returns types of elements it contains
|
||||||
|
* Inherited from SMESH_IDSource interface
|
||||||
|
*/
|
||||||
|
virtual SMESH::array_of_ElementType* GetTypes();
|
||||||
|
|
||||||
// Internal C++ interface
|
// Internal C++ interface
|
||||||
int GetLocalID() const { return myLocalID; }
|
int GetLocalID() const { return myLocalID; }
|
||||||
SMESH_Mesh_i* GetMeshServant() const { return myMeshServant; }
|
SMESH_Mesh_i* GetMeshServant() const { return myMeshServant; }
|
||||||
|
@ -655,6 +655,8 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetSubMesh(GEOM::GEOM_Object_ptr aSubShap
|
|||||||
//Get or Create the SMESH_subMesh object implementation
|
//Get or Create the SMESH_subMesh object implementation
|
||||||
|
|
||||||
int subMeshId = _impl->GetMeshDS()->ShapeToIndex( myLocSubShape );
|
int subMeshId = _impl->GetMeshDS()->ShapeToIndex( myLocSubShape );
|
||||||
|
if ( !subMeshId )
|
||||||
|
THROW_SALOME_CORBA_EXCEPTION("not sub-shape of the main shape", SALOME::BAD_PARAM);
|
||||||
subMesh = getSubMesh( subMeshId );
|
subMesh = getSubMesh( subMeshId );
|
||||||
|
|
||||||
// create a new subMesh object servant if there is none for the shape
|
// create a new subMesh object servant if there is none for the shape
|
||||||
@ -3548,6 +3550,30 @@ SMESH::string_array* SMESH_Mesh_i::GetLastParameters()
|
|||||||
return aResult._retn();
|
return aResult._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetTypes
|
||||||
|
//purpose : Returns types of elements it contains
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMESH::array_of_ElementType* SMESH_Mesh_i::GetTypes()
|
||||||
|
{
|
||||||
|
SMESH::array_of_ElementType_var types = new SMESH::array_of_ElementType;
|
||||||
|
|
||||||
|
types->length( 4 );
|
||||||
|
int nbTypes = 0;
|
||||||
|
if (_impl->NbEdges())
|
||||||
|
types[nbTypes++] = SMESH::EDGE;
|
||||||
|
if (_impl->NbFaces())
|
||||||
|
types[nbTypes++] = SMESH::FACE;
|
||||||
|
if (_impl->NbVolumes())
|
||||||
|
types[nbTypes++] = SMESH::VOLUME;
|
||||||
|
if (_impl->Nb0DElements())
|
||||||
|
types[nbTypes++] = SMESH::ELEM0D;
|
||||||
|
types->length( nbTypes );
|
||||||
|
|
||||||
|
return types._retn();
|
||||||
|
}
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
/*!
|
||||||
* \brief Returns statistic of mesh elements
|
* \brief Returns statistic of mesh elements
|
||||||
|
@ -373,8 +373,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void CheckGeomGroupModif();
|
void CheckGeomGroupModif();
|
||||||
|
|
||||||
virtual SMESH::long_array* GetIDs();
|
|
||||||
|
|
||||||
CORBA::LongLong GetMeshPtr();
|
CORBA::LongLong GetMeshPtr();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -502,14 +500,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
SMESH::string_array* GetLastParameters();
|
SMESH::string_array* GetLastParameters();
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Returns statistic of mesh elements
|
|
||||||
* Result array of number enityties
|
|
||||||
* Inherited from SMESH_IDSource
|
|
||||||
*/
|
|
||||||
virtual SMESH::long_array* GetMeshInfo();
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Collect statistic of mesh elements given by iterator
|
* Collect statistic of mesh elements given by iterator
|
||||||
*/
|
*/
|
||||||
@ -526,6 +516,25 @@ public:
|
|||||||
virtual ::CORBA::Boolean SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray);
|
virtual ::CORBA::Boolean SetMeshOrder(const SMESH::submesh_array_array& theSubMeshArray);
|
||||||
|
|
||||||
|
|
||||||
|
// =========================
|
||||||
|
// SMESH_IDSource interface
|
||||||
|
// =========================
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
|
||||||
std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
|
std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
|
||||||
std::map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
|
std::map<int, ::SMESH_subMesh*> _mapSubMesh; //NRI
|
||||||
|
|
||||||
|
@ -545,3 +545,26 @@ SMESH::long_array* SMESH_subMesh_i::GetMeshInfo()
|
|||||||
|
|
||||||
return aRes._retn();
|
return aRes._retn();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : GetTypes
|
||||||
|
//purpose : Returns types of elements it contains
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
SMESH::array_of_ElementType* SMESH_subMesh_i::GetTypes()
|
||||||
|
{
|
||||||
|
SMESH::array_of_ElementType_var types = new SMESH::array_of_ElementType;
|
||||||
|
types->length( 1 );
|
||||||
|
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
|
||||||
|
switch ( ::SMESH_Gen::GetShapeDim( aSubMesh->GetSubShape() ))
|
||||||
|
{
|
||||||
|
case 0: types[0] = SMESH::ELEM0D; break;
|
||||||
|
case 1: types[0] = SMESH::EDGE; break;
|
||||||
|
case 2: types[0] = SMESH::FACE; break;
|
||||||
|
case 3: types[0] = SMESH::VOLUME; break;
|
||||||
|
default:
|
||||||
|
types->length(0);
|
||||||
|
}
|
||||||
|
return types._retn();
|
||||||
|
}
|
||||||
|
@ -94,6 +94,12 @@ public:
|
|||||||
*/
|
*/
|
||||||
virtual SMESH::long_array* GetMeshInfo();
|
virtual SMESH::long_array* GetMeshInfo();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Returns types of elements it contains
|
||||||
|
*/
|
||||||
|
virtual SMESH::array_of_ElementType* GetTypes();
|
||||||
|
|
||||||
|
|
||||||
SMESH_Mesh_i* _mesh_i; //NRI
|
SMESH_Mesh_i* _mesh_i; //NRI
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
Loading…
Reference in New Issue
Block a user