mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 16:30:34 +05:00
Correct bugs, connected with 0D Elements implementation (IMP 20089, BUG 21300)
This commit is contained in:
parent
05a54f24ee
commit
f4ba12e460
@ -22,7 +22,7 @@
|
||||
// SMESH SMDS : implementaion of Salome mesh data structure
|
||||
// File : SMDSAbs_ElementType.hxx
|
||||
// Module : SMESH
|
||||
//
|
||||
|
||||
#ifndef _SMDSAbs_ElementType_HeaderFile
|
||||
#define _SMDSAbs_ElementType_HeaderFile
|
||||
|
||||
@ -33,10 +33,10 @@ enum SMDSAbs_ElementType
|
||||
{
|
||||
SMDSAbs_All,
|
||||
SMDSAbs_Node,
|
||||
SMDSAbs_0DElement,
|
||||
SMDSAbs_Edge,
|
||||
SMDSAbs_Face,
|
||||
SMDSAbs_Volume,
|
||||
SMDSAbs_0DElement,
|
||||
SMDSAbs_NbElementTypes
|
||||
};
|
||||
|
||||
|
@ -100,38 +100,43 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
|
||||
myNbPolyhedrons(0)
|
||||
{
|
||||
// Number of nodes in standard element types
|
||||
// n v f e 0
|
||||
// o o a d d
|
||||
// d l c g
|
||||
// e e e
|
||||
// --------------
|
||||
// 1 *
|
||||
// n v f e 0 n
|
||||
// o o a d d o
|
||||
// d l c g d
|
||||
// e e e e
|
||||
// s
|
||||
// -----------------
|
||||
// 0 *
|
||||
// 1 . *
|
||||
// 2 *
|
||||
// 3 *
|
||||
// 4 * * *
|
||||
// 3 . *
|
||||
// 4 * . .
|
||||
// 5 *
|
||||
// 6 * *
|
||||
// 6 * .
|
||||
// 7
|
||||
// 8 * *
|
||||
// 8 * .
|
||||
// 9
|
||||
// 10 *
|
||||
// 11
|
||||
// 12
|
||||
// 11 *
|
||||
// 12 *
|
||||
// 13 *
|
||||
// 14
|
||||
// 14 *
|
||||
// 15 *
|
||||
// 16
|
||||
// 16 *
|
||||
// 17
|
||||
// 18
|
||||
// 19
|
||||
// 20 *
|
||||
//
|
||||
// So to have a unique index for each type basing on nb of nodes, we use a shift:
|
||||
myShift.resize(SMDSAbs_Volume + 1, 0);
|
||||
myShift[ SMDSAbs_Face ] = +8; // 3->11, 4->12, 6->14, 8->16
|
||||
myShift[ SMDSAbs_Edge ] = -2; // 2->0, 4->2
|
||||
myShift.resize(SMDSAbs_NbElementTypes, 0);
|
||||
|
||||
myShift[ SMDSAbs_Face ] = +8; // 3->11, 4->12, 6->14, 8->16
|
||||
myShift[ SMDSAbs_Edge ] = -2; // 2->0, 4->2
|
||||
myShift[ SMDSAbs_0DElement ] = +2; // 1->3
|
||||
|
||||
myNb.resize( index( SMDSAbs_Volume,20 ) + 1, NULL);
|
||||
|
||||
myNb[ index( SMDSAbs_Node,1 )] = & myNbNodes;
|
||||
|
||||
myNb[ index( SMDSAbs_0DElement,1 )] = & myNb0DElements;
|
||||
@ -153,11 +158,13 @@ inline SMDS_MeshInfo::SMDS_MeshInfo():
|
||||
myNb[ index( SMDSAbs_Volume, 15)] = & myNbQuadPrisms;
|
||||
myNb[ index( SMDSAbs_Volume, 20)] = & myNbQuadHexas;
|
||||
}
|
||||
|
||||
inline void // Clear
|
||||
SMDS_MeshInfo::Clear()
|
||||
{ for ( int i=0; i<myNb.size(); ++i ) if ( myNb[i] ) (*myNb[i])=0;
|
||||
myNbPolygons=myNbPolyhedrons=0;
|
||||
}
|
||||
|
||||
inline int // index
|
||||
SMDS_MeshInfo::index(SMDSAbs_ElementType type, int nbNodes) const
|
||||
{ return nbNodes + myShift[ type ]; }
|
||||
@ -237,8 +244,12 @@ SMDS_MeshInfo::NbElements(SMDSAbs_ElementType type) const
|
||||
case SMDSAbs_Edge:
|
||||
nb = myNbEdges + myNbQuadEdges;
|
||||
break;
|
||||
case SMDSAbs_0DElement:
|
||||
nb = myNb0DElements;
|
||||
break;
|
||||
case SMDSAbs_Node:
|
||||
nb = myNbNodes;
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
return nb;
|
||||
|
@ -674,8 +674,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy
|
||||
}
|
||||
int aType = (int)theGroup->GetType();
|
||||
const char* aRootNames[] = {
|
||||
"Compound Groups", "Groups of Nodes", "Group of 0D Elements",
|
||||
"Groups of Edges", "Groups of Faces", "Groups of Volumes" };
|
||||
"Compound Groups", "Groups of Nodes", "Groups of Edges",
|
||||
"Groups of Faces", "Groups of Volumes", "Groups of 0D Elements" };
|
||||
|
||||
// Currently, groups with heterogenous content are not supported
|
||||
if ( aType != SMESH::ALL ) {
|
||||
|
Loading…
Reference in New Issue
Block a user