mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 03:30:36 +05:00
bos #20256: avoid clash with FromIdType() from MEDCOUPLING
This commit is contained in:
parent
6674d6ef0c
commit
1b4fc3dee2
@ -4178,7 +4178,7 @@ void ElementsOnSurface::process()
|
|||||||
if ( !myMeshModifTracer.GetMesh() )
|
if ( !myMeshModifTracer.GetMesh() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int nbElems = FromIdType<int>( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
|
int nbElems = FromSmIdType<int>( myMeshModifTracer.GetMesh()->GetMeshInfo().NbElements( myType ));
|
||||||
if ( nbElems > 0 )
|
if ( nbElems > 0 )
|
||||||
myIds.ReSize( nbElems );
|
myIds.ReSize( nbElems );
|
||||||
|
|
||||||
|
@ -551,7 +551,7 @@ namespace
|
|||||||
vector<smIdType> idVec( ids[0] );
|
vector<smIdType> idVec( ids[0] );
|
||||||
for ( int i = 0; i < ids[0]; ++i )
|
for ( int i = 0; i < ids[0]; ++i )
|
||||||
idVec[ i ] = (smIdType) ids[ i + 1];
|
idVec[ i ] = (smIdType) ids[ i + 1];
|
||||||
return mesh->AddPolygonalFaceWithID( idVec, ToIdType(ID) );
|
return mesh->AddPolygonalFaceWithID( idVec, ID );
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef SMDS_MeshElement* (* PAddElemFun) (cgsize_t* ids, SMESHDS_Mesh* mesh, int ID);
|
typedef SMDS_MeshElement* (* PAddElemFun) (cgsize_t* ids, SMESHDS_Mesh* mesh, int ID);
|
||||||
|
@ -285,8 +285,8 @@ Driver_Mesh::Status DriverCGNS_Write::Perform()
|
|||||||
else if ( meshDim == 2 )
|
else if ( meshDim == 2 )
|
||||||
nbCells = myMesh->NbFaces();
|
nbCells = myMesh->NbFaces();
|
||||||
|
|
||||||
cgsize_t size[9] = { FromIdType<cgsize_t>( myMesh->NbNodes() ),
|
cgsize_t size[9] = { FromSmIdType<cgsize_t>( myMesh->NbNodes() ),
|
||||||
FromIdType<cgsize_t>( nbCells ),
|
FromSmIdType<cgsize_t>( nbCells ),
|
||||||
/*NBoundVertex=*/0, 0,0,0,0,0,0 };
|
/*NBoundVertex=*/0, 0,0,0,0,0,0 };
|
||||||
int iZone;
|
int iZone;
|
||||||
if ( cg_zone_write( _fn, iBase, "SMESH_Mesh", size,
|
if ( cg_zone_write( _fn, iBase, "SMESH_Mesh", size,
|
||||||
|
@ -429,7 +429,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
|
|||||||
};
|
};
|
||||||
for ( int i = 0; i < 4; ++i )
|
for ( int i = 0; i < 4; ++i )
|
||||||
{
|
{
|
||||||
int gmfKwd = FromIdType<int>( kes[i][0] );
|
int gmfKwd = FromSmIdType<int>( kes[i][0] );
|
||||||
SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
|
SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
|
||||||
smIdType shift = kes[i][2];
|
smIdType shift = kes[i][2];
|
||||||
if ( int nb = GmfStatKwd(meshID, gmfKwd))
|
if ( int nb = GmfStatKwd(meshID, gmfKwd))
|
||||||
@ -472,7 +472,7 @@ Driver_Mesh::Status DriverGMF_Read::Perform()
|
|||||||
};
|
};
|
||||||
for ( int i = 0; i < 7; ++i )
|
for ( int i = 0; i < 7; ++i )
|
||||||
{
|
{
|
||||||
int gmfKwd = FromIdType<int>( kes[i][0] );
|
int gmfKwd = FromSmIdType<int>( kes[i][0] );
|
||||||
SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
|
SMDSAbs_ElementType entity = (SMDSAbs_ElementType) kes[i][1];
|
||||||
smIdType shift = kes[i][2];
|
smIdType shift = kes[i][2];
|
||||||
if ( int nb = GmfStatKwd(meshID, gmfKwd))
|
if ( int nb = GmfStatKwd(meshID, gmfKwd))
|
||||||
|
@ -270,7 +270,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
|||||||
aNodeIds.assign( aBallInfo->myConn->begin(), aBallInfo->myConn->end());
|
aNodeIds.assign( aBallInfo->myConn->begin(), aBallInfo->myConn->end());
|
||||||
|
|
||||||
// allocate array of diameters
|
// allocate array of diameters
|
||||||
vtkIdType maxID = FromIdType<vtkIdType>(myMesh->MaxElementID() + aNbBalls);
|
vtkIdType maxID = FromSmIdType<vtkIdType>(myMesh->MaxElementID() + aNbBalls);
|
||||||
if ( anIsElemNum && !aBallInfo->myElemNum->empty() )
|
if ( anIsElemNum && !aBallInfo->myElemNum->empty() )
|
||||||
maxID = *std::max_element( aBallInfo->myElemNum->begin(),
|
maxID = *std::max_element( aBallInfo->myElemNum->begin(),
|
||||||
aBallInfo->myElemNum->end() );
|
aBallInfo->myElemNum->end() );
|
||||||
@ -356,7 +356,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
|||||||
#endif
|
#endif
|
||||||
if ( anIsElemNum ) {
|
if ( anIsElemNum ) {
|
||||||
TInt anElemId = aPolygoneInfo->GetElemNum( iElem );
|
TInt anElemId = aPolygoneInfo->GetElemNum( iElem );
|
||||||
anElement = (myMesh->*addPolyWithID)( aNodeIds, ToIdType(anElemId) );
|
anElement = (myMesh->*addPolyWithID)( aNodeIds, ToSmIdType(anElemId) );
|
||||||
}
|
}
|
||||||
if ( !anElement ) {
|
if ( !anElement ) {
|
||||||
aNodes.resize( aNbConn );
|
aNodes.resize( aNbConn );
|
||||||
@ -437,7 +437,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
|
|||||||
#endif
|
#endif
|
||||||
if(anIsElemNum){
|
if(anIsElemNum){
|
||||||
TInt anElemId = aPolyedreInfo->GetElemNum(iElem);
|
TInt anElemId = aPolyedreInfo->GetElemNum(iElem);
|
||||||
anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,ToIdType(anElemId));
|
anElement = myMesh->AddPolyhedralVolumeWithID(aNodeIds,aQuantities,ToSmIdType(anElemId));
|
||||||
}
|
}
|
||||||
if(!anElement){
|
if(!anElement){
|
||||||
vector<const SMDS_MeshNode*> aNodes(aNbNodes);
|
vector<const SMDS_MeshNode*> aNodes(aNbNodes);
|
||||||
|
@ -548,7 +548,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
const EBooleen theIsElemNames = eFAUX;
|
const EBooleen theIsElemNames = eFAUX;
|
||||||
const EConnectivite theConnMode = eNOD;
|
const EConnectivite theConnMode = eNOD;
|
||||||
|
|
||||||
TInt aNbNodes = FromIdType<TInt>( myMesh->NbNodes() );
|
TInt aNbNodes = FromSmIdType<TInt>( myMesh->NbNodes() );
|
||||||
PNodeInfo aNodeInfo = myMed->CrNodeInfo(aMeshInfo, aNbNodes,
|
PNodeInfo aNodeInfo = myMed->CrNodeInfo(aMeshInfo, aNbNodes,
|
||||||
theMode, theSystem, theIsElemNum, theIsElemNames);
|
theMode, theSystem, theIsElemNum, theIsElemNames);
|
||||||
|
|
||||||
@ -568,7 +568,7 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
aTCoordSlice[2] = 0.;
|
aTCoordSlice[2] = 0.;
|
||||||
|
|
||||||
// node number
|
// node number
|
||||||
TInt aNodeID = FromIdType<TInt>( aCoordHelperPtr->GetID() );
|
TInt aNodeID = FromSmIdType<TInt>( aCoordHelperPtr->GetID() );
|
||||||
aNodeInfo->SetElemNum( iNode, aNodeID );
|
aNodeInfo->SetElemNum( iNode, aNodeID );
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
aNodeIdMap.insert( aNodeIdMap.end(), make_pair( aNodeID, iNode+1 ));
|
aNodeIdMap.insert( aNodeIdMap.end(), make_pair( aNodeID, iNode+1 ));
|
||||||
@ -634,66 +634,66 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
#endif
|
#endif
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eBALL,
|
eBALL,
|
||||||
FromIdType<TInt>(nbElemInfo.NbBalls()),
|
FromSmIdType<TInt>(nbElemInfo.NbBalls()),
|
||||||
SMDSAbs_Ball));
|
SMDSAbs_Ball));
|
||||||
#ifdef _ELEMENTS_BY_DIM_
|
#ifdef _ELEMENTS_BY_DIM_
|
||||||
anEntity = eARETE;
|
anEntity = eARETE;
|
||||||
#endif
|
#endif
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eSEG2,
|
eSEG2,
|
||||||
FromIdType<TInt>(nbElemInfo.NbEdges( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbEdges( ORDER_LINEAR )),
|
||||||
SMDSAbs_Edge));
|
SMDSAbs_Edge));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eSEG3,
|
eSEG3,
|
||||||
FromIdType<TInt>(nbElemInfo.NbEdges( ORDER_QUADRATIC )),
|
FromSmIdType<TInt>(nbElemInfo.NbEdges( ORDER_QUADRATIC )),
|
||||||
SMDSAbs_Edge));
|
SMDSAbs_Edge));
|
||||||
#ifdef _ELEMENTS_BY_DIM_
|
#ifdef _ELEMENTS_BY_DIM_
|
||||||
anEntity = eFACE;
|
anEntity = eFACE;
|
||||||
#endif
|
#endif
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eTRIA3,
|
eTRIA3,
|
||||||
FromIdType<TInt>(nbElemInfo.NbTriangles( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbTriangles( ORDER_LINEAR )),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eTRIA6,
|
eTRIA6,
|
||||||
FromIdType<TInt>(nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
|
FromSmIdType<TInt>(nbElemInfo.NbTriangles( ORDER_QUADRATIC ) -
|
||||||
nbElemInfo.NbBiQuadTriangles()),
|
nbElemInfo.NbBiQuadTriangles()),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eTRIA7,
|
eTRIA7,
|
||||||
FromIdType<TInt>(nbElemInfo.NbBiQuadTriangles()),
|
FromSmIdType<TInt>(nbElemInfo.NbBiQuadTriangles()),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eQUAD4,
|
eQUAD4,
|
||||||
FromIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_LINEAR )),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eQUAD8,
|
eQUAD8,
|
||||||
FromIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
|
FromSmIdType<TInt>(nbElemInfo.NbQuadrangles( ORDER_QUADRATIC ) -
|
||||||
nbElemInfo.NbBiQuadQuadrangles()),
|
nbElemInfo.NbBiQuadQuadrangles()),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eQUAD9,
|
eQUAD9,
|
||||||
FromIdType<TInt>(nbElemInfo.NbBiQuadQuadrangles()),
|
FromSmIdType<TInt>(nbElemInfo.NbBiQuadQuadrangles()),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
if ( polyTypesSupported ) {
|
if ( polyTypesSupported ) {
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYGONE,
|
ePOLYGONE,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
// we need one more loop on poly elements to count nb of their nodes
|
// we need one more loop on poly elements to count nb of their nodes
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYGONE,
|
ePOLYGONE,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_LINEAR )),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYGON2,
|
ePOLYGON2,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
|
FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
// we need one more loop on QUAD poly elements to count nb of their nodes
|
// we need one more loop on QUAD poly elements to count nb of their nodes
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYGON2,
|
ePOLYGON2,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
|
FromSmIdType<TInt>(nbElemInfo.NbPolygons( ORDER_QUADRATIC )),
|
||||||
SMDSAbs_Face));
|
SMDSAbs_Face));
|
||||||
}
|
}
|
||||||
#ifdef _ELEMENTS_BY_DIM_
|
#ifdef _ELEMENTS_BY_DIM_
|
||||||
@ -701,58 +701,58 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
#endif
|
#endif
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eTETRA4,
|
eTETRA4,
|
||||||
FromIdType<TInt>(nbElemInfo.NbTetras( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbTetras( ORDER_LINEAR )),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eTETRA10,
|
eTETRA10,
|
||||||
FromIdType<TInt>(nbElemInfo.NbTetras( ORDER_QUADRATIC )),
|
FromSmIdType<TInt>(nbElemInfo.NbTetras( ORDER_QUADRATIC )),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePYRA5,
|
ePYRA5,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPyramids( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbPyramids( ORDER_LINEAR )),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePYRA13,
|
ePYRA13,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPyramids( ORDER_QUADRATIC )),
|
FromSmIdType<TInt>(nbElemInfo.NbPyramids( ORDER_QUADRATIC )),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePENTA6,
|
ePENTA6,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPrisms( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbPrisms( ORDER_LINEAR )),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePENTA15,
|
ePENTA15,
|
||||||
FromIdType<TInt>(nbElemInfo.NbQuadPrisms()),
|
FromSmIdType<TInt>(nbElemInfo.NbQuadPrisms()),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePENTA18,
|
ePENTA18,
|
||||||
FromIdType<TInt>(nbElemInfo.NbBiQuadPrisms()),
|
FromSmIdType<TInt>(nbElemInfo.NbBiQuadPrisms()),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eHEXA8,
|
eHEXA8,
|
||||||
FromIdType<TInt>(nbElemInfo.NbHexas( ORDER_LINEAR )),
|
FromSmIdType<TInt>(nbElemInfo.NbHexas( ORDER_LINEAR )),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eHEXA20,
|
eHEXA20,
|
||||||
FromIdType<TInt>(nbElemInfo.NbHexas( ORDER_QUADRATIC )-
|
FromSmIdType<TInt>(nbElemInfo.NbHexas( ORDER_QUADRATIC )-
|
||||||
nbElemInfo.NbTriQuadHexas()),
|
nbElemInfo.NbTriQuadHexas()),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eHEXA27,
|
eHEXA27,
|
||||||
FromIdType<TInt>(nbElemInfo.NbTriQuadHexas()),
|
FromSmIdType<TInt>(nbElemInfo.NbTriQuadHexas()),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
eOCTA12,
|
eOCTA12,
|
||||||
FromIdType<TInt>(nbElemInfo.NbHexPrisms()),
|
FromSmIdType<TInt>(nbElemInfo.NbHexPrisms()),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
if ( polyTypesSupported ) {
|
if ( polyTypesSupported ) {
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYEDRE,
|
ePOLYEDRE,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPolyhedrons()),
|
FromSmIdType<TInt>(nbElemInfo.NbPolyhedrons()),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
// we need one more loop on poly elements to count nb of their nodes
|
// we need one more loop on poly elements to count nb of their nodes
|
||||||
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
|
||||||
ePOLYEDRE,
|
ePOLYEDRE,
|
||||||
FromIdType<TInt>(nbElemInfo.NbPolyhedrons()),
|
FromSmIdType<TInt>(nbElemInfo.NbPolyhedrons()),
|
||||||
SMDSAbs_Volume));
|
SMDSAbs_Volume));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -831,13 +831,13 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
for(TInt iNode = 0; iNode < aNbNodes; iNode++) {
|
for(TInt iNode = 0; iNode < aNbNodes; iNode++) {
|
||||||
const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
|
const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
|
aTConnSlice[ iNode ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
|
||||||
#else
|
#else
|
||||||
aTConnSlice[ iNode ] = aNode->GetID();
|
aTConnSlice[ iNode ] = aNode->GetID();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
// element number
|
// element number
|
||||||
aPolygoneInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
|
aPolygoneInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
|
||||||
|
|
||||||
// family number
|
// family number
|
||||||
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
|
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
|
||||||
@ -905,14 +905,14 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
while ( nodeIt->more() ) {
|
while ( nodeIt->more() ) {
|
||||||
const SMDS_MeshElement* aNode = nodeIt->next();
|
const SMDS_MeshElement* aNode = nodeIt->next();
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
conn[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
|
conn[ iNode ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
|
||||||
#else
|
#else
|
||||||
conn[ iNode ] = aNode->GetID();
|
conn[ iNode ] = aNode->GetID();
|
||||||
#endif
|
#endif
|
||||||
++iNode;
|
++iNode;
|
||||||
}
|
}
|
||||||
// element number
|
// element number
|
||||||
aPolyhInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
|
aPolyhInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
|
||||||
|
|
||||||
// family number
|
// family number
|
||||||
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
|
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
|
||||||
@ -939,12 +939,12 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
// connectivity
|
// connectivity
|
||||||
const SMDS_MeshElement* aNode = anElem->GetNode( 0 );
|
const SMDS_MeshElement* aNode = anElem->GetNode( 0 );
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
(*aBallInfo->myConn)[ iElem ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
|
(*aBallInfo->myConn)[ iElem ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
|
||||||
#else
|
#else
|
||||||
(*aBallInfo->myConn)[ iElem ] = aNode->GetID();
|
(*aBallInfo->myConn)[ iElem ] = aNode->GetID();
|
||||||
#endif
|
#endif
|
||||||
// element number
|
// element number
|
||||||
aBallInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
|
aBallInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
|
||||||
|
|
||||||
// diameter
|
// diameter
|
||||||
aBallInfo->myDiameters[ iElem ] =
|
aBallInfo->myDiameters[ iElem ] =
|
||||||
@ -987,13 +987,13 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform()
|
|||||||
for (TInt iNode = 0; iNode < aNbNodes; iNode++) {
|
for (TInt iNode = 0; iNode < aNbNodes; iNode++) {
|
||||||
const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
|
const SMDS_MeshElement* aNode = anElem->GetNode( iNode );
|
||||||
#ifdef _EDF_NODE_IDS_
|
#ifdef _EDF_NODE_IDS_
|
||||||
aTConnSlice[ iNode ] = aNodeIdMap[FromIdType<TInt>(aNode->GetID())];
|
aTConnSlice[ iNode ] = aNodeIdMap[FromSmIdType<TInt>(aNode->GetID())];
|
||||||
#else
|
#else
|
||||||
aTConnSlice[ iNode ] = aNode->GetID();
|
aTConnSlice[ iNode ] = aNode->GetID();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
// element number
|
// element number
|
||||||
aCellInfo->SetElemNum( iElem, FromIdType<TInt>(anElem->GetID()) );
|
aCellInfo->SetElemNum( iElem, FromSmIdType<TInt>(anElem->GetID()) );
|
||||||
|
|
||||||
// family number
|
// family number
|
||||||
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
|
int famNum = getFamilyId( anElemFamMap, anElem, defaultFamilyId );
|
||||||
|
@ -117,7 +117,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
|||||||
{
|
{
|
||||||
const SMDS_MeshNode* aNode = aNodesIter->next();
|
const SMDS_MeshNode* aNode = aNodesIter->next();
|
||||||
if ( nodeLabelByID.empty() )
|
if ( nodeLabelByID.empty() )
|
||||||
aRec.node_labels.push_back( FromIdType<int>(aNode->GetID()) );
|
aRec.node_labels.push_back( FromSmIdType<int>(aNode->GetID()) );
|
||||||
else
|
else
|
||||||
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
|
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
|
||||||
}
|
}
|
||||||
@ -141,7 +141,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
|||||||
for ( aRec.node_labels.clear(); aNodesIter->more(); ) {
|
for ( aRec.node_labels.clear(); aNodesIter->more(); ) {
|
||||||
const SMDS_MeshNode* aNode = aNodesIter->next();
|
const SMDS_MeshNode* aNode = aNodesIter->next();
|
||||||
if ( nodeLabelByID.empty() )
|
if ( nodeLabelByID.empty() )
|
||||||
aRec.node_labels.push_back( FromIdType<int>(aNode->GetID()) );
|
aRec.node_labels.push_back( FromSmIdType<int>(aNode->GetID()) );
|
||||||
else
|
else
|
||||||
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
|
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
|||||||
{
|
{
|
||||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||||
if ( nodeLabelByID.empty() )
|
if ( nodeLabelByID.empty() )
|
||||||
aRec.node_labels.push_back( FromIdType<int>(aNode->GetID()) );
|
aRec.node_labels.push_back( FromSmIdType<int>(aNode->GetID()) );
|
||||||
else
|
else
|
||||||
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
|
aRec.node_labels.push_back( nodeLabelByID[ aNode->GetID() ]);
|
||||||
}
|
}
|
||||||
@ -230,7 +230,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
|||||||
while ( aIter->more() ) {
|
while ( aIter->more() ) {
|
||||||
const SMDS_MeshElement* aNode = aIter->next();
|
const SMDS_MeshElement* aNode = aIter->next();
|
||||||
if ( nodeLabelByID.empty() )
|
if ( nodeLabelByID.empty() )
|
||||||
aRec.NodeList.push_back( FromIdType<int>(aNode->GetID()) );
|
aRec.NodeList.push_back( FromSmIdType<int>(aNode->GetID()) );
|
||||||
else
|
else
|
||||||
aRec.NodeList.push_back( nodeLabelByID[ aNode->GetID() ]);
|
aRec.NodeList.push_back( nodeLabelByID[ aNode->GetID() ]);
|
||||||
}
|
}
|
||||||
@ -240,7 +240,7 @@ Driver_Mesh::Status DriverUNV_W_SMDS_Mesh::Perform()
|
|||||||
while ( aIter->more() ) {
|
while ( aIter->more() ) {
|
||||||
const SMDS_MeshElement* aElem = aIter->next();
|
const SMDS_MeshElement* aElem = aIter->next();
|
||||||
if ( elemLabelByID.empty() )
|
if ( elemLabelByID.empty() )
|
||||||
aRec.ElementList.push_back( FromIdType<int>(aElem->GetID()) );
|
aRec.ElementList.push_back( FromSmIdType<int>(aElem->GetID()) );
|
||||||
else
|
else
|
||||||
aRec.ElementList.push_back( elemLabelByID[ aElem->GetID() ]);
|
aRec.ElementList.push_back( elemLabelByID[ aElem->GetID() ]);
|
||||||
}
|
}
|
||||||
|
@ -604,7 +604,7 @@ SMESH_DeviceActor
|
|||||||
( aPredicate = dynamic_cast<CoincidentNodes*>(theFunctor.get())))
|
( aPredicate = dynamic_cast<CoincidentNodes*>(theFunctor.get())))
|
||||||
{
|
{
|
||||||
myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
|
myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
|
||||||
vtkIdType aNbNodes = FromIdType<vtkIdType>(myVisualObj->GetNbEntities(SMDSAbs_Node));
|
vtkIdType aNbNodes = FromSmIdType<vtkIdType>(myVisualObj->GetNbEntities(SMDSAbs_Node));
|
||||||
for( vtkIdType i = 0; i < aNbNodes; i++ ){
|
for( vtkIdType i = 0; i < aNbNodes; i++ ){
|
||||||
vtkIdType anObjId = myVisualObj->GetNodeObjId(i);
|
vtkIdType anObjId = myVisualObj->GetNodeObjId(i);
|
||||||
if(aPredicate->IsSatisfy(anObjId))
|
if(aPredicate->IsSatisfy(anObjId))
|
||||||
|
@ -114,7 +114,7 @@ vtkIdType SMESH_VisualObjDef::GetNodeObjId( vtkIdType theVTKID )
|
|||||||
if( this->GetMesh() )
|
if( this->GetMesh() )
|
||||||
aNode = this->GetMesh()->FindNodeVtk( theVTKID );
|
aNode = this->GetMesh()->FindNodeVtk( theVTKID );
|
||||||
|
|
||||||
return aNode ? FromIdType<vtkIdType>(aNode->GetID()) : -1;
|
return aNode ? FromSmIdType<vtkIdType>(aNode->GetID()) : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESH_VisualObjDef::GetNodeVTKId( vtkIdType theObjID )
|
vtkIdType SMESH_VisualObjDef::GetNodeVTKId( vtkIdType theObjID )
|
||||||
@ -139,7 +139,7 @@ vtkIdType SMESH_VisualObjDef::GetElemObjId( vtkIdType theVTKID )
|
|||||||
TMapOfIds::const_iterator i = myVTK2SMDSElems.find(theVTKID);
|
TMapOfIds::const_iterator i = myVTK2SMDSElems.find(theVTKID);
|
||||||
return i == myVTK2SMDSElems.end() ? -1 : i->second;
|
return i == myVTK2SMDSElems.end() ? -1 : i->second;
|
||||||
}
|
}
|
||||||
return FromIdType<vtkIdType>(this->GetMesh()->FromVtkToSmds(theVTKID));
|
return FromSmIdType<vtkIdType>(this->GetMesh()->FromVtkToSmds(theVTKID));
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESH_VisualObjDef::GetElemVTKId( vtkIdType theObjID )
|
vtkIdType SMESH_VisualObjDef::GetElemVTKId( vtkIdType theObjID )
|
||||||
@ -171,7 +171,7 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
TEntityList aNodes;
|
TEntityList aNodes;
|
||||||
vtkIdType nbNodes = FromIdType<vtkIdType>(GetEntities( SMDSAbs_Node, aNodes ));
|
vtkIdType nbNodes = FromSmIdType<vtkIdType>(GetEntities( SMDSAbs_Node, aNodes ));
|
||||||
thePoints->SetNumberOfPoints( nbNodes );
|
thePoints->SetNumberOfPoints( nbNodes );
|
||||||
|
|
||||||
int nbPoints = 0;
|
int nbPoints = 0;
|
||||||
@ -424,7 +424,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
anIdList->InsertNextId(ph->NbFaceNodes(i));
|
anIdList->InsertNextId(ph->NbFaceNodes(i));
|
||||||
for(int j = 1; j <= ph->NbFaceNodes(i); j++) {
|
for(int j = 1; j <= ph->NbFaceNodes(i); j++) {
|
||||||
if ( const SMDS_MeshNode* n = ph->GetFaceNode( i, j ))
|
if ( const SMDS_MeshNode* n = ph->GetFaceNode( i, j ))
|
||||||
anIdList->InsertNextId( mySMDS2VTKNodes[ FromIdType<vtkIdType>(n->GetID()) ]);
|
anIdList->InsertNextId( mySMDS2VTKNodes[ FromSmIdType<vtkIdType>(n->GetID()) ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -441,7 +441,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
else {
|
else {
|
||||||
for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
|
for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
|
||||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||||
anIdList->SetId( aNodeId, mySMDS2VTKNodes[FromIdType<vtkIdType>(aNode->GetID())] );
|
anIdList->SetId( aNodeId, mySMDS2VTKNodes[FromSmIdType<vtkIdType>(aNode->GetID())]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -178,11 +178,11 @@ SMDS_MeshElement* SMDS_ElementFactory::NewElement( const smIdType id )
|
|||||||
smIdType id0 = myChunks.size() * theChunkSize + 1;
|
smIdType id0 = myChunks.size() * theChunkSize + 1;
|
||||||
myChunks.push_back( new SMDS_ElementChunk( this, id0 ));
|
myChunks.push_back( new SMDS_ElementChunk( this, id0 ));
|
||||||
}
|
}
|
||||||
SMDS_MeshElement* e = myChunks[iChunk].Element( FromIdType<int>(index) );
|
SMDS_MeshElement* e = myChunks[iChunk].Element( FromSmIdType<int>(index) );
|
||||||
if ( !e->IsNull() )
|
if ( !e->IsNull() )
|
||||||
return 0; // element with given ID already exists
|
return 0; // element with given ID already exists
|
||||||
|
|
||||||
myChunks[iChunk].UseElement( FromIdType<int>(index) );
|
myChunks[iChunk].UseElement( FromSmIdType<int>(index) );
|
||||||
++myNbUsedElements;
|
++myNbUsedElements;
|
||||||
|
|
||||||
e->myHolder = & myChunks[iChunk];
|
e->myHolder = & myChunks[iChunk];
|
||||||
@ -208,7 +208,7 @@ const SMDS_MeshElement* SMDS_ElementFactory::FindElement( const smIdType id ) co
|
|||||||
smIdType index = ( id - 1 ) % theChunkSize;
|
smIdType index = ( id - 1 ) % theChunkSize;
|
||||||
if ( iChunk < (smIdType) myChunks.size() )
|
if ( iChunk < (smIdType) myChunks.size() )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* e = myChunks[iChunk].Element( FromIdType<int>(index) );
|
const SMDS_MeshElement* e = myChunks[iChunk].Element( FromSmIdType<int>(index) );
|
||||||
return e->IsNull() ? 0 : e;
|
return e->IsNull() ? 0 : e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -647,7 +647,7 @@ void SMDS_ElementChunk::SetVTKID( const SMDS_MeshElement* e, const vtkIdType vtk
|
|||||||
|
|
||||||
vtkIdType SMDS_ElementChunk::GetVtkID( const SMDS_MeshElement* e ) const
|
vtkIdType SMDS_ElementChunk::GetVtkID( const SMDS_MeshElement* e ) const
|
||||||
{
|
{
|
||||||
vtkIdType dfltVtkID = FromIdType<vtkIdType>(e->GetID() - 1);
|
vtkIdType dfltVtkID = FromSmIdType<vtkIdType>(e->GetID() - 1);
|
||||||
return ( dfltVtkID < (vtkIdType)myFactory->myVtkIDs.size() ) ? myFactory->myVtkIDs[ dfltVtkID ] : dfltVtkID;
|
return ( dfltVtkID < (vtkIdType)myFactory->myVtkIDs.size() ) ? myFactory->myVtkIDs[ dfltVtkID ] : dfltVtkID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,7 +191,7 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
|
|||||||
// Use double type for storing coordinates of nodes instead float.
|
// Use double type for storing coordinates of nodes instead float.
|
||||||
vtkPoints *newPoints = vtkPoints::New();
|
vtkPoints *newPoints = vtkPoints::New();
|
||||||
newPoints->SetDataType( VTK_DOUBLE );
|
newPoints->SetDataType( VTK_DOUBLE );
|
||||||
newPoints->SetNumberOfPoints( FromIdType<vtkIdType>(newNodeSize) );
|
newPoints->SetNumberOfPoints( FromSmIdType<vtkIdType>(newNodeSize) );
|
||||||
|
|
||||||
vtkIdType i = 0, alreadyCopied = 0;
|
vtkIdType i = 0, alreadyCopied = 0;
|
||||||
while ( i < oldNodeSize )
|
while ( i < oldNodeSize )
|
||||||
@ -257,11 +257,11 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
|
|||||||
|
|
||||||
vtkUnsignedCharArray *newTypes = vtkUnsignedCharArray::New();
|
vtkUnsignedCharArray *newTypes = vtkUnsignedCharArray::New();
|
||||||
newTypes->Initialize();
|
newTypes->Initialize();
|
||||||
newTypes->SetNumberOfValues(FromIdType<vtkIdType>(newCellSize));
|
newTypes->SetNumberOfValues(FromSmIdType<vtkIdType>(newCellSize));
|
||||||
|
|
||||||
vtkIdTypeArray *newLocations = vtkIdTypeArray::New();
|
vtkIdTypeArray *newLocations = vtkIdTypeArray::New();
|
||||||
newLocations->Initialize();
|
newLocations->Initialize();
|
||||||
newLocations->SetNumberOfValues(FromIdType<vtkIdType>(newCellSize));
|
newLocations->SetNumberOfValues(FromSmIdType<vtkIdType>(newCellSize));
|
||||||
|
|
||||||
std::vector< vtkIdType > pointsCell(1024); // --- points id to fill a new cell
|
std::vector< vtkIdType > pointsCell(1024); // --- points id to fill a new cell
|
||||||
|
|
||||||
@ -298,16 +298,16 @@ void SMDS_UnstructuredGrid::compactGrid(std::vector<smIdType>& idNodesOldToNew,
|
|||||||
{
|
{
|
||||||
smIdType oldCellId = idCellsNewToOld[ newCellID ];
|
smIdType oldCellId = idCellsNewToOld[ newCellID ];
|
||||||
newFaceLocations->InsertNextValue( newFaces->GetMaxId()+1 );
|
newFaceLocations->InsertNextValue( newFaces->GetMaxId()+1 );
|
||||||
smIdType oldFaceLoc = this->FaceLocations->GetValue( FromIdType<vtkIdType>(oldCellId) );
|
smIdType oldFaceLoc = this->FaceLocations->GetValue( FromSmIdType<vtkIdType>(oldCellId) );
|
||||||
smIdType nCellFaces = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
|
smIdType nCellFaces = this->Faces->GetValue( FromSmIdType<vtkIdType>(oldFaceLoc++) );
|
||||||
newFaces->InsertNextValue( FromIdType<vtkIdType>(nCellFaces) );
|
newFaces->InsertNextValue( FromSmIdType<vtkIdType>(nCellFaces) );
|
||||||
for ( int n = 0; n < nCellFaces; n++ )
|
for ( int n = 0; n < nCellFaces; n++ )
|
||||||
{
|
{
|
||||||
int nptsInFace = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
|
int nptsInFace = this->Faces->GetValue( FromSmIdType<vtkIdType>(oldFaceLoc++) );
|
||||||
newFaces->InsertNextValue( nptsInFace );
|
newFaces->InsertNextValue( nptsInFace );
|
||||||
for ( int k = 0; k < nptsInFace; k++ )
|
for ( int k = 0; k < nptsInFace; k++ )
|
||||||
{
|
{
|
||||||
vtkIdType oldpt = this->Faces->GetValue( FromIdType<vtkIdType>(oldFaceLoc++) );
|
vtkIdType oldpt = this->Faces->GetValue( FromSmIdType<vtkIdType>(oldFaceLoc++) );
|
||||||
newFaces->InsertNextValue( idNodesOldToNew[ oldpt ]);
|
newFaces->InsertNextValue( idNodesOldToNew[ oldpt ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -446,15 +446,15 @@ void SMDS_UnstructuredGrid::BuildDownwardConnectivity(bool /*withEdges*/)
|
|||||||
|
|
||||||
const SMDS_MeshInfo &meshInfo = _mesh->GetMeshInfo();
|
const SMDS_MeshInfo &meshInfo = _mesh->GetMeshInfo();
|
||||||
|
|
||||||
int nbLinTetra = FromIdType<int>(meshInfo.NbTetras (ORDER_LINEAR));
|
int nbLinTetra = FromSmIdType<int>(meshInfo.NbTetras (ORDER_LINEAR));
|
||||||
int nbQuadTetra = FromIdType<int>(meshInfo.NbTetras (ORDER_QUADRATIC));
|
int nbQuadTetra = FromSmIdType<int>(meshInfo.NbTetras (ORDER_QUADRATIC));
|
||||||
int nbLinPyra = FromIdType<int>(meshInfo.NbPyramids(ORDER_LINEAR));
|
int nbLinPyra = FromSmIdType<int>(meshInfo.NbPyramids(ORDER_LINEAR));
|
||||||
int nbQuadPyra = FromIdType<int>(meshInfo.NbPyramids(ORDER_QUADRATIC));
|
int nbQuadPyra = FromSmIdType<int>(meshInfo.NbPyramids(ORDER_QUADRATIC));
|
||||||
int nbLinPrism = FromIdType<int>(meshInfo.NbPrisms (ORDER_LINEAR));
|
int nbLinPrism = FromSmIdType<int>(meshInfo.NbPrisms (ORDER_LINEAR));
|
||||||
int nbQuadPrism = FromIdType<int>(meshInfo.NbPrisms (ORDER_QUADRATIC));
|
int nbQuadPrism = FromSmIdType<int>(meshInfo.NbPrisms (ORDER_QUADRATIC));
|
||||||
int nbLinHexa = FromIdType<int>(meshInfo.NbHexas (ORDER_LINEAR));
|
int nbLinHexa = FromSmIdType<int>(meshInfo.NbHexas (ORDER_LINEAR));
|
||||||
int nbQuadHexa = FromIdType<int>(meshInfo.NbHexas (ORDER_QUADRATIC));
|
int nbQuadHexa = FromSmIdType<int>(meshInfo.NbHexas (ORDER_QUADRATIC));
|
||||||
int nbHexPrism = FromIdType<int>(meshInfo.NbHexPrisms());
|
int nbHexPrism = FromSmIdType<int>(meshInfo.NbHexPrisms());
|
||||||
|
|
||||||
int nbLineGuess = int((4.0 / 3.0) * nbLinTetra + 2 * nbLinPrism + 2.5 * nbLinPyra + 3 * nbLinHexa);
|
int nbLineGuess = int((4.0 / 3.0) * nbLinTetra + 2 * nbLinPrism + 2.5 * nbLinPyra + 3 * nbLinHexa);
|
||||||
int nbQuadEdgeGuess = int((4.0 / 3.0) * nbQuadTetra + 2 * nbQuadPrism + 2.5 * nbQuadPyra + 3 * nbQuadHexa);
|
int nbQuadEdgeGuess = int((4.0 / 3.0) * nbQuadTetra + 2 * nbQuadPrism + 2.5 * nbQuadPyra + 3 * nbQuadHexa);
|
||||||
|
@ -7474,7 +7474,7 @@ public:
|
|||||||
|
|
||||||
static int HashCode(const ComparableElement& se, int limit )
|
static int HashCode(const ComparableElement& se, int limit )
|
||||||
{
|
{
|
||||||
return ::HashCode( FromIdType<int>(se.mySumID), limit );
|
return ::HashCode( FromSmIdType<int>(se.mySumID), limit );
|
||||||
}
|
}
|
||||||
static Standard_Boolean IsEqual(const ComparableElement& se1, const ComparableElement& se2 )
|
static Standard_Boolean IsEqual(const ComparableElement& se1, const ComparableElement& se2 )
|
||||||
{
|
{
|
||||||
|
@ -3539,7 +3539,7 @@ void SMESHGUI_FilterDlg::filterSource (const int theType,
|
|||||||
return;
|
return;
|
||||||
SMESH::smIdType_array_var anIds = myFilter[ theType ]->GetElementsId(myMesh);
|
SMESH::smIdType_array_var anIds = myFilter[ theType ]->GetElementsId(myMesh);
|
||||||
for (int i = 0, n = anIds->length(); i < n; i++)
|
for (int i = 0, n = anIds->length(); i < n; i++)
|
||||||
theResIds.append(FromIdType<int>(anIds[ i ]));
|
theResIds.append(FromSmIdType<int>(anIds[ i ]));
|
||||||
}
|
}
|
||||||
else if (aSourceId == Selection)
|
else if (aSourceId == Selection)
|
||||||
{
|
{
|
||||||
@ -3593,7 +3593,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
|
|||||||
SMESH::smIdType_array_var anIds =
|
SMESH::smIdType_array_var anIds =
|
||||||
theType == SMESH::NODE ? aSubMesh->GetNodesId() : aSubMesh->GetElementsId();
|
theType == SMESH::NODE ? aSubMesh->GetNodesId() : aSubMesh->GetElementsId();
|
||||||
for (int i = 0, n = anIds->length(); i < n; i++)
|
for (int i = 0, n = anIds->length(); i < n; i++)
|
||||||
aToBeFiltered.Add(FromIdType<int>(anIds[ i ]));
|
aToBeFiltered.Add(FromSmIdType<int>(anIds[ i ]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3606,7 +3606,7 @@ void SMESHGUI_FilterDlg::filterSelectionSource (const int theType,
|
|||||||
{
|
{
|
||||||
SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
|
SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
|
||||||
for (int i = 0, n = anIds->length(); i < n; i++)
|
for (int i = 0, n = anIds->length(); i < n; i++)
|
||||||
aToBeFiltered.Add(FromIdType<int>(anIds[ i ]));
|
aToBeFiltered.Add(FromSmIdType<int>(anIds[ i ]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -533,7 +533,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply()
|
|||||||
bool ok;
|
bool ok;
|
||||||
int anId = myDlg->myId->text().toInt( &ok );
|
int anId = myDlg->myId->text().toInt( &ok );
|
||||||
if( !ok || anId < 1 )
|
if( !ok || anId < 1 )
|
||||||
anId = FromIdType<int>(aMeshEditor->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
|
anId = FromSmIdType<int>(aMeshEditor->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
|
||||||
myDlg->myDestinationY->GetValue(),
|
myDlg->myDestinationY->GetValue(),
|
||||||
myDlg->myDestinationZ->GetValue()));
|
myDlg->myDestinationZ->GetValue()));
|
||||||
|
|
||||||
@ -770,7 +770,7 @@ void SMESHGUI_MakeNodeAtPointOp::redisplayPreview()
|
|||||||
myDlg->myDestDZ->setReadOnly(true);
|
myDlg->myDestDZ->setReadOnly(true);
|
||||||
}
|
}
|
||||||
if ( isPreview && isMoveNode && anId == 0 )
|
if ( isPreview && isMoveNode && anId == 0 )
|
||||||
anId = FromIdType<int>(aPreviewer->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
|
anId = FromSmIdType<int>(aPreviewer->FindNodeClosestTo(myDlg->myDestinationX->GetValue(),
|
||||||
myDlg->myDestinationY->GetValue(),
|
myDlg->myDestinationY->GetValue(),
|
||||||
myDlg->myDestinationZ->GetValue()));
|
myDlg->myDestinationZ->GetValue()));
|
||||||
// find id and/or just compute preview
|
// find id and/or just compute preview
|
||||||
@ -870,7 +870,7 @@ void SMESHGUI_MakeNodeAtPointOp::onTextChange( const QString& theText )
|
|||||||
if( const SMDS_MeshNode* aNode = aMesh->FindNode( theText.toInt() ) )
|
if( const SMDS_MeshNode* aNode = aMesh->FindNode( theText.toInt() ) )
|
||||||
{
|
{
|
||||||
SVTK_TVtkIDsMap aListInd;
|
SVTK_TVtkIDsMap aListInd;
|
||||||
aListInd.Add( FromIdType<int>(aNode->GetID()) );
|
aListInd.Add( FromSmIdType<int>(aNode->GetID()) );
|
||||||
selector()->AddOrRemoveIndex( anIO, aListInd, false );
|
selector()->AddOrRemoveIndex( anIO, aListInd, false );
|
||||||
if( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( SMESHGUI::GetSMESHGUI() ) )
|
if( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( SMESHGUI::GetSMESHGUI() ) )
|
||||||
aViewWindow->highlight( anIO, true, true );
|
aViewWindow->highlight( anIO, true, true );
|
||||||
|
@ -711,7 +711,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
|
|||||||
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
|
if (aSubMesh->GetFather()->GetId() == myMesh->GetId()) {
|
||||||
SMESH::smIdType_array_var anIds = aSubMesh->GetElementsId();
|
SMESH::smIdType_array_var anIds = aSubMesh->GetElementsId();
|
||||||
for (int i = 0, n = anIds->length(); i < n; i++) {
|
for (int i = 0, n = anIds->length(); i < n; i++) {
|
||||||
if (isIdValid(FromIdType<int>(anIds[ i ])))
|
if (isIdValid(FromSmIdType<int>(anIds[ i ])))
|
||||||
toBeAdded.Add(anIds[ i ]);
|
toBeAdded.Add(anIds[ i ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -727,7 +727,7 @@ void SMESHGUI_MultiEditDlg::onAddBtn()
|
|||||||
if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
|
if (aGroup->GetMesh()->GetId() == myMesh->GetId()) {
|
||||||
SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
|
SMESH::smIdType_array_var anIds = aGroup->GetListOfID();
|
||||||
for (int i = 0, n = anIds->length(); i < n; i++) {
|
for (int i = 0, n = anIds->length(); i < n; i++) {
|
||||||
if (isIdValid(FromIdType<int>(anIds[ i ])))
|
if (isIdValid(FromSmIdType<int>(anIds[ i ])))
|
||||||
toBeAdded.Add(anIds[ i ]);
|
toBeAdded.Add(anIds[ i ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1109,9 +1109,9 @@ bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEdi
|
|||||||
return theEditor->ReorientObject( obj );
|
return theEditor->ReorientObject( obj );
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
|
smIdType SMESHGUI_ChangeOrientationDlg::nbElemsInMesh()
|
||||||
{
|
{
|
||||||
return ( myFilterType == SMESH::FaceFilter ) ? FromIdType<int>(myMesh->NbFaces()) : FromIdType<int>(myMesh->NbVolumes());
|
return ( myFilterType == SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -1207,9 +1207,9 @@ bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito
|
|||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMESHGUI_UnionOfTrianglesDlg::nbElemsInMesh()
|
smIdType SMESHGUI_UnionOfTrianglesDlg::nbElemsInMesh()
|
||||||
{
|
{
|
||||||
return FromIdType<int>(myMesh->NbTriangles());
|
return myMesh->NbTriangles();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation( bool toDisplayPreview )
|
void SMESHGUI_UnionOfTrianglesDlg::onDisplaySimulation( bool toDisplayPreview )
|
||||||
@ -1327,9 +1327,9 @@ bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
|
|||||||
return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
|
return hasObj ? theEditor->QuadToTriObject(obj, aCrit) : theEditor->QuadToTri(theIds, aCrit);
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMESHGUI_CuttingOfQuadsDlg::nbElemsInMesh()
|
smIdType SMESHGUI_CuttingOfQuadsDlg::nbElemsInMesh()
|
||||||
{
|
{
|
||||||
return FromIdType<int>(myMesh->NbQuadrangles());
|
return myMesh->NbQuadrangles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1439,13 +1439,13 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
|
|||||||
const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>(anIter->next());
|
const SMDS_MeshNode* aNode = static_cast<const SMDS_MeshNode*>(anIter->next());
|
||||||
if (aNode)
|
if (aNode)
|
||||||
{
|
{
|
||||||
if (!anIdToVtk.IsBound(FromIdType<int>(aNode->GetID())))
|
if (!anIdToVtk.IsBound(FromSmIdType<int>(aNode->GetID())))
|
||||||
{
|
{
|
||||||
aPoints->SetPoint(++nbPoints, aNode->X(), aNode->Y(), aNode->Z());
|
aPoints->SetPoint(++nbPoints, aNode->X(), aNode->Y(), aNode->Z());
|
||||||
anIdToVtk.Bind(FromIdType<int>(aNode->GetID()), nbPoints);
|
anIdToVtk.Bind(FromSmIdType<int>(aNode->GetID()), nbPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
aNodes[ k++ ] = FromIdType<int>(aNode->GetID());
|
aNodes[ k++ ] = FromSmIdType<int>(aNode->GetID());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1696,9 +1696,9 @@ bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int SMESHGUI_SplitVolumesDlg::nbElemsInMesh()
|
smIdType SMESHGUI_SplitVolumesDlg::nbElemsInMesh()
|
||||||
{
|
{
|
||||||
return isIntoPrisms() ? FromIdType<int>(myMesh->NbHexas()) : FromIdType<int>(myMesh->NbVolumes() - myMesh->NbTetras());
|
return isIntoPrisms() ? myMesh->NbHexas() : myMesh->NbVolumes() - myMesh->NbTetras();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SMESHGUI_SplitVolumesDlg::isIntoPrisms()
|
bool SMESHGUI_SplitVolumesDlg::isIntoPrisms()
|
||||||
|
@ -41,6 +41,8 @@
|
|||||||
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
#include CORBA_SERVER_HEADER(SMESH_Mesh)
|
||||||
#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
|
#include CORBA_SERVER_HEADER(SMESH_MeshEditor)
|
||||||
|
|
||||||
|
#include <smIdType.hxx>
|
||||||
|
|
||||||
class SMESHGUI;
|
class SMESHGUI;
|
||||||
class SMESHGUI_FilterDlg;
|
class SMESHGUI_FilterDlg;
|
||||||
class SMESHGUI_SpinBox;
|
class SMESHGUI_SpinBox;
|
||||||
@ -120,7 +122,7 @@ protected:
|
|||||||
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
||||||
const SMESH::smIdType_array& ,
|
const SMESH::smIdType_array& ,
|
||||||
SMESH::SMESH_IDSource_ptr obj) = 0;
|
SMESH::SMESH_IDSource_ptr obj) = 0;
|
||||||
virtual int nbElemsInMesh() = 0;
|
virtual smIdType nbElemsInMesh() = 0;
|
||||||
int entityType();
|
int entityType();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -184,7 +186,7 @@ protected:
|
|||||||
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
||||||
const SMESH::smIdType_array& ,
|
const SMESH::smIdType_array& ,
|
||||||
SMESH::SMESH_IDSource_ptr obj);
|
SMESH::SMESH_IDSource_ptr obj);
|
||||||
virtual int nbElemsInMesh();
|
virtual smIdType nbElemsInMesh();
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -204,7 +206,7 @@ protected:
|
|||||||
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
||||||
const SMESH::smIdType_array&,
|
const SMESH::smIdType_array&,
|
||||||
SMESH::SMESH_IDSource_ptr obj );
|
SMESH::SMESH_IDSource_ptr obj );
|
||||||
virtual int nbElemsInMesh();
|
virtual smIdType nbElemsInMesh();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual void onDisplaySimulation( bool );
|
virtual void onDisplaySimulation( bool );
|
||||||
@ -229,7 +231,7 @@ protected:
|
|||||||
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
||||||
const SMESH::smIdType_array& ,
|
const SMESH::smIdType_array& ,
|
||||||
SMESH::SMESH_IDSource_ptr obj);
|
SMESH::SMESH_IDSource_ptr obj);
|
||||||
virtual int nbElemsInMesh();
|
virtual smIdType nbElemsInMesh();
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual void reject();
|
virtual void reject();
|
||||||
@ -271,7 +273,7 @@ protected:
|
|||||||
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
virtual bool process( SMESH::SMESH_MeshEditor_ptr,
|
||||||
const SMESH::smIdType_array&,
|
const SMESH::smIdType_array&,
|
||||||
SMESH::SMESH_IDSource_ptr obj );
|
SMESH::SMESH_IDSource_ptr obj );
|
||||||
virtual int nbElemsInMesh();
|
virtual smIdType nbElemsInMesh();
|
||||||
|
|
||||||
virtual void setSelectionMode();
|
virtual void setSelectionMode();
|
||||||
void showFacetByElement( int id );
|
void showFacetByElement( int id );
|
||||||
|
@ -1985,7 +1985,7 @@ SMESH_MeshAlgos::FindSharpEdges( SMDS_Mesh* theMesh,
|
|||||||
typedef NCollection_DataMap< SMESH_TLink, TIsSharpAndMedium, SMESH_TLink > TLinkSharpMap;
|
typedef NCollection_DataMap< SMESH_TLink, TIsSharpAndMedium, SMESH_TLink > TLinkSharpMap;
|
||||||
|
|
||||||
TLinkSharpMap linkIsSharp;
|
TLinkSharpMap linkIsSharp;
|
||||||
Standard_Integer nbBuckets = FromIdType<Standard_Integer>( theMesh->NbFaces() );
|
Standard_Integer nbBuckets = FromSmIdType<Standard_Integer>( theMesh->NbFaces() );
|
||||||
if ( nbBuckets > 0 )
|
if ( nbBuckets > 0 )
|
||||||
linkIsSharp.ReSize( nbBuckets );
|
linkIsSharp.ReSize( nbBuckets );
|
||||||
|
|
||||||
@ -2096,7 +2096,7 @@ SMESH_MeshAlgos::SeparateFacesByEdges( SMDS_Mesh* theMesh, const std::vector< Ed
|
|||||||
typedef std::vector< const SMDS_MeshElement* > TFaceVec;
|
typedef std::vector< const SMDS_MeshElement* > TFaceVec;
|
||||||
typedef NCollection_DataMap< SMESH_TLink, TFaceVec, SMESH_TLink > TFacesByLinks;
|
typedef NCollection_DataMap< SMESH_TLink, TFaceVec, SMESH_TLink > TFacesByLinks;
|
||||||
TFacesByLinks facesByLink;
|
TFacesByLinks facesByLink;
|
||||||
Standard_Integer nbBuckets = FromIdType<Standard_Integer>( theMesh->NbFaces() );
|
Standard_Integer nbBuckets = FromSmIdType<Standard_Integer>( theMesh->NbFaces() );
|
||||||
if ( nbBuckets > 0 )
|
if ( nbBuckets > 0 )
|
||||||
facesByLink.ReSize( nbBuckets );
|
facesByLink.ReSize( nbBuckets );
|
||||||
|
|
||||||
|
@ -277,7 +277,7 @@ namespace
|
|||||||
|
|
||||||
static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper)
|
static Standard_Integer HashCode(const CutFace& f, const Standard_Integer upper)
|
||||||
{
|
{
|
||||||
return ::HashCode( FromIdType<int>(f.myInitFace->GetID()), upper );
|
return ::HashCode( FromSmIdType<int>(f.myInitFace->GetID()), upper );
|
||||||
}
|
}
|
||||||
static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 )
|
static Standard_Boolean IsEqual(const CutFace& f1, const CutFace& f2 )
|
||||||
{
|
{
|
||||||
|
@ -156,7 +156,7 @@ struct SMESH_TLink: public NLink
|
|||||||
// methods for usage of SMESH_TLink as a hasher in NCollection maps
|
// methods for usage of SMESH_TLink as a hasher in NCollection maps
|
||||||
static int HashCode(const SMESH_TLink& link, int aLimit)
|
static int HashCode(const SMESH_TLink& link, int aLimit)
|
||||||
{
|
{
|
||||||
return ::HashCode( FromIdType<int>(link.node1()->GetID() + link.node2()->GetID()), aLimit );
|
return smIdHasher::HashCode( link.node1()->GetID() + link.node2()->GetID(), aLimit );
|
||||||
}
|
}
|
||||||
static Standard_Boolean IsEqual(const SMESH_TLink& l1, const SMESH_TLink& l2)
|
static Standard_Boolean IsEqual(const SMESH_TLink& l1, const SMESH_TLink& l2)
|
||||||
{
|
{
|
||||||
@ -217,7 +217,7 @@ struct SMESH_Hasher
|
|||||||
{
|
{
|
||||||
static Standard_Integer HashCode(const SMDS_MeshElement* e, const Standard_Integer upper)
|
static Standard_Integer HashCode(const SMDS_MeshElement* e, const Standard_Integer upper)
|
||||||
{
|
{
|
||||||
return ::HashCode( FromIdType<int>(e->GetID()), upper );
|
return smIdHasher::HashCode( e->GetID(), upper );
|
||||||
}
|
}
|
||||||
static Standard_Boolean IsEqual( const SMDS_MeshElement* e1, const SMDS_MeshElement* e2 )
|
static Standard_Boolean IsEqual( const SMDS_MeshElement* e1, const SMDS_MeshElement* e2 )
|
||||||
{
|
{
|
||||||
|
@ -2065,7 +2065,7 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
|
|||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int shapeID, fromID, toID; // indices of elements of a sub-mesh
|
int shapeID; smIdType fromID, toID; // indices of elements of a sub-mesh
|
||||||
} TRange;
|
} TRange;
|
||||||
std::vector< TRange > elemRanges, nodeRanges; // elements of sub-meshes
|
std::vector< TRange > elemRanges, nodeRanges; // elements of sub-meshes
|
||||||
std::vector< SMDS_PositionPtr > positions; // node positions
|
std::vector< SMDS_PositionPtr > positions; // node positions
|
||||||
@ -2101,7 +2101,7 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
|
|||||||
TRange & lastRange = ranges.back();
|
TRange & lastRange = ranges.back();
|
||||||
if ( lastRange.shapeID != shapeID ||
|
if ( lastRange.shapeID != shapeID ||
|
||||||
lastRange.toID != elemID )
|
lastRange.toID != elemID )
|
||||||
ranges.push_back( TRange{ shapeID, FromIdType<int>(elemID), FromIdType<int>(elemID + 1) });
|
ranges.push_back( TRange{ shapeID, elemID, elemID + 1 });
|
||||||
else
|
else
|
||||||
lastRange.toID = elemID + 1;
|
lastRange.toID = elemID + 1;
|
||||||
|
|
||||||
|
@ -583,7 +583,7 @@ bool StdMeshers_Regular_1D::divideIntoEqualSegments( SMESH_Mesh & theMesh
|
|||||||
bool ok = false;
|
bool ok = false;
|
||||||
if ( theNbPoints < IntegerLast() )
|
if ( theNbPoints < IntegerLast() )
|
||||||
{
|
{
|
||||||
int nbPnt = FromIdType<int>( theNbPoints );
|
int nbPnt = FromSmIdType<int>( theNbPoints );
|
||||||
GCPnts_UniformAbscissa discret(theC3d, nbPnt, theFirstU, theLastU, theTol );
|
GCPnts_UniformAbscissa discret(theC3d, nbPnt, theFirstU, theLastU, theTol );
|
||||||
if ( !discret.IsDone() )
|
if ( !discret.IsDone() )
|
||||||
return error( "GCPnts_UniformAbscissa failed");
|
return error( "GCPnts_UniformAbscissa failed");
|
||||||
@ -801,7 +801,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
if (nbseg <= 0)
|
if (nbseg <= 0)
|
||||||
nbseg = 1; // degenerated edge
|
nbseg = 1; // degenerated edge
|
||||||
eltSize = theLength / nbseg * ( 1. - 1e-9 );
|
eltSize = theLength / nbseg * ( 1. - 1e-9 );
|
||||||
nbSegments = ToIdType( nbseg );
|
nbSegments = ToSmIdType( nbseg );
|
||||||
}
|
}
|
||||||
else if ( _hypType == LOCAL_LENGTH )
|
else if ( _hypType == LOCAL_LENGTH )
|
||||||
{
|
{
|
||||||
@ -827,7 +827,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
smIdType nb_segments = smds->NbElements();
|
smIdType nb_segments = smds->NbElements();
|
||||||
if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
|
if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
|
||||||
isFound = true;
|
isFound = true;
|
||||||
nbseg = FromIdType<double>( nb_segments );
|
nbseg = FromSmIdType<double>( nb_segments );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -842,7 +842,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
if (nbseg <= 0)
|
if (nbseg <= 0)
|
||||||
nbseg = 1; // degenerated edge
|
nbseg = 1; // degenerated edge
|
||||||
eltSize = theLength / nbseg;
|
eltSize = theLength / nbseg;
|
||||||
nbSegments = ToIdType( nbseg );
|
nbSegments = ToSmIdType( nbseg );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -891,7 +891,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
break;
|
break;
|
||||||
case StdMeshers_NumberOfSegments::DT_TabFunc:
|
case StdMeshers_NumberOfSegments::DT_TabFunc:
|
||||||
{
|
{
|
||||||
FunctionTable func(_vvalue[ TAB_FUNC_IND ], FromIdType<int>( _ivalue[ CONV_MODE_IND ]));
|
FunctionTable func(_vvalue[ TAB_FUNC_IND ], FromSmIdType<int>( _ivalue[ CONV_MODE_IND ]));
|
||||||
return computeParamByFunc(theC3d, f, l, theLength, theReverse,
|
return computeParamByFunc(theC3d, f, l, theLength, theReverse,
|
||||||
_ivalue[ NB_SEGMENTS_IND ], func,
|
_ivalue[ NB_SEGMENTS_IND ], func,
|
||||||
theParams);
|
theParams);
|
||||||
@ -900,7 +900,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
case StdMeshers_NumberOfSegments::DT_ExprFunc:
|
case StdMeshers_NumberOfSegments::DT_ExprFunc:
|
||||||
{
|
{
|
||||||
FunctionExpr func(_svalue[ EXPR_FUNC_IND ].c_str(),
|
FunctionExpr func(_svalue[ EXPR_FUNC_IND ].c_str(),
|
||||||
FromIdType<int>( _ivalue[ CONV_MODE_IND ]));
|
FromSmIdType<int>( _ivalue[ CONV_MODE_IND ]));
|
||||||
return computeParamByFunc(theC3d, f, l, theLength, theReverse,
|
return computeParamByFunc(theC3d, f, l, theLength, theReverse,
|
||||||
_ivalue[ NB_SEGMENTS_IND ], func,
|
_ivalue[ NB_SEGMENTS_IND ], func,
|
||||||
theParams);
|
theParams);
|
||||||
|
@ -305,14 +305,14 @@ void StdMeshersGUI_FixedPointsParamWdg::setNbSegments( int idx, SMESH::smIdType
|
|||||||
{
|
{
|
||||||
if ( idx >= 0 && idx < myTreeWidget->topLevelItemCount() )
|
if ( idx >= 0 && idx < myTreeWidget->topLevelItemCount() )
|
||||||
{
|
{
|
||||||
myTreeWidget->topLevelItem( idx )->setData( 1, Qt::UserRole, FromIdType<int>( val ));
|
myTreeWidget->topLevelItem( idx )->setData( 1, Qt::UserRole, qlonglong( val ));
|
||||||
myTreeWidget->topLevelItem( idx )->setText( 1, idx > 0 && mySameValues->isChecked() ? QString( SAME_TEXT ) : QString::number( val ) );
|
myTreeWidget->topLevelItem( idx )->setText( 1, idx > 0 && mySameValues->isChecked() ? QString( SAME_TEXT ) : QString::number( val ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
smIdType StdMeshersGUI_FixedPointsParamWdg::nbSegments( int idx ) const
|
smIdType StdMeshersGUI_FixedPointsParamWdg::nbSegments( int idx ) const
|
||||||
{
|
{
|
||||||
return ToIdType( idx >= 0 && idx < myTreeWidget->topLevelItemCount() ? myTreeWidget->topLevelItem( idx )->data( 1, Qt::UserRole ).toInt() : 1 );
|
return idx >= 0 && idx < myTreeWidget->topLevelItemCount() ? myTreeWidget->topLevelItem( idx )->data( 1, Qt::UserRole ).toLongLong() : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
|
Loading…
Reference in New Issue
Block a user