mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 13:10:36 +05:00
PAL13639 (EDF PAL 317 : SMESH : Create "0D Hypothesis")
enable submeshes on vertices
This commit is contained in:
parent
2aab1df9bb
commit
331304764c
@ -210,12 +210,18 @@ CORBA::Long SMESH_subMesh_i::GetNumberOfNodes(CORBA::Boolean all)
|
|||||||
for ( ; sm != smList.end(); ++sm )
|
for ( ; sm != smList.end(); ++sm )
|
||||||
{
|
{
|
||||||
SMDS_ElemIteratorPtr eIt = (*sm)->GetElements();
|
SMDS_ElemIteratorPtr eIt = (*sm)->GetElements();
|
||||||
|
if ( eIt->more() ) {
|
||||||
while ( eIt->more() ) {
|
while ( eIt->more() ) {
|
||||||
const SMDS_MeshElement* anElem = eIt->next();
|
const SMDS_MeshElement* anElem = eIt->next();
|
||||||
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
||||||
while ( nIt->more() )
|
while ( nIt->more() )
|
||||||
nodeIds.insert( nIt->next()->GetID() );
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SMDS_NodeIteratorPtr nIt = (*sm)->GetNodes();
|
||||||
|
while ( nIt->more() )
|
||||||
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nodeIds.size();
|
return nodeIds.size();
|
||||||
}
|
}
|
||||||
@ -225,12 +231,18 @@ CORBA::Long SMESH_subMesh_i::GetNumberOfNodes(CORBA::Boolean all)
|
|||||||
|
|
||||||
if ( all ) { // all nodes of submesh elements
|
if ( all ) { // all nodes of submesh elements
|
||||||
SMDS_ElemIteratorPtr eIt = aSubMeshDS->GetElements();
|
SMDS_ElemIteratorPtr eIt = aSubMeshDS->GetElements();
|
||||||
|
if ( eIt->more() ) {
|
||||||
while ( eIt->more() ) {
|
while ( eIt->more() ) {
|
||||||
const SMDS_MeshElement* anElem = eIt->next();
|
const SMDS_MeshElement* anElem = eIt->next();
|
||||||
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
||||||
while ( nIt->more() )
|
while ( nIt->more() )
|
||||||
nodeIds.insert( nIt->next()->GetID() );
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SMDS_NodeIteratorPtr nIt = aSubMeshDS->GetNodes();
|
||||||
|
while ( nIt->more() )
|
||||||
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
|
}
|
||||||
return nodeIds.size();
|
return nodeIds.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,12 +329,18 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle
|
|||||||
if ( theElemType == SMESH::NODE )
|
if ( theElemType == SMESH::NODE )
|
||||||
{
|
{
|
||||||
SMDS_ElemIteratorPtr eIt = (*sm)->GetElements();
|
SMDS_ElemIteratorPtr eIt = (*sm)->GetElements();
|
||||||
|
if ( eIt->more() ) {
|
||||||
while ( eIt->more() ) {
|
while ( eIt->more() ) {
|
||||||
const SMDS_MeshElement* anElem = eIt->next();
|
const SMDS_MeshElement* anElem = eIt->next();
|
||||||
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
||||||
while ( nIt->more() )
|
while ( nIt->more() )
|
||||||
nodeIds.insert( nIt->next()->GetID() );
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SMDS_NodeIteratorPtr nIt = (*sm)->GetNodes();
|
||||||
|
while ( nIt->more() )
|
||||||
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -340,12 +358,18 @@ SMESH::long_array* SMESH_subMesh_i::GetElementsByType( SMESH::ElementType theEle
|
|||||||
if ( theElemType == SMESH::NODE && aSubMeshDS )
|
if ( theElemType == SMESH::NODE && aSubMeshDS )
|
||||||
{
|
{
|
||||||
SMDS_ElemIteratorPtr eIt = aSubMeshDS->GetElements();
|
SMDS_ElemIteratorPtr eIt = aSubMeshDS->GetElements();
|
||||||
|
if ( eIt->more() ) {
|
||||||
while ( eIt->more() ) {
|
while ( eIt->more() ) {
|
||||||
const SMDS_MeshElement* anElem = eIt->next();
|
const SMDS_MeshElement* anElem = eIt->next();
|
||||||
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
SMDS_ElemIteratorPtr nIt = anElem->nodesIterator();
|
||||||
while ( nIt->more() )
|
while ( nIt->more() )
|
||||||
nodeIds.insert( nIt->next()->GetID() );
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
SMDS_NodeIteratorPtr nIt = aSubMeshDS->GetNodes();
|
||||||
|
while ( nIt->more() )
|
||||||
|
nodeIds.insert( nIt->next()->GetID() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( theElemType == SMESH::NODE )
|
if ( theElemType == SMESH::NODE )
|
||||||
|
Loading…
Reference in New Issue
Block a user