rollback quantities. add SMESH::smIdType

This commit is contained in:
Viktor UZLOV 2021-02-02 20:00:36 +03:00
parent 364f6b2346
commit 3176814024
32 changed files with 341 additions and 338 deletions

View File

@ -71,6 +71,7 @@ OPTION(SALOME_BUILD_GUI "Enable GUI" ON)
OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF) OPTION(SALOME_SMESH_USE_CGNS "Enable import/export to CGNS format" OFF)
OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF) OPTION(SALOME_SMESH_USE_TBB "Enable parallel computation" OFF)
OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" ON) OPTION(SALOME_SMESH_DYNLOAD_LOCAL "Load plug-ins' symbols locally (Linux only)" ON)
OPTION(SALOME_USE_64BIT_IDS "Size of IDs to refer cells and nodes. 32 bits when OFF (default), 64 bits when ON." ON)
OPTION(SMESH_USE_MESHGEMS_HYPOSET "Prefer MeshGems algorithms in sets of hypotheses" OFF) OPTION(SMESH_USE_MESHGEMS_HYPOSET "Prefer MeshGems algorithms in sets of hypotheses" OFF)
CMAKE_DEPENDENT_OPTION(SALOME_SMESH_BUILD_FRENCH_DOC "Generate SALOME SMESH French documentation" OFF CMAKE_DEPENDENT_OPTION(SALOME_SMESH_BUILD_FRENCH_DOC "Generate SALOME SMESH French documentation" OFF
"SALOME_BUILD_DOC" OFF) "SALOME_BUILD_DOC" OFF)

View File

@ -123,6 +123,7 @@ SET(SALOME_INSTALL_PYTHON_SHARED "@SALOME_INSTALL_PYTHON_SHARED@")
SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@") SET(SALOME_INSTALL_RES "@SALOME_INSTALL_RES@")
SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@") SET(SALOME_INSTALL_DOC "@SALOME_INSTALL_DOC@")
SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@") SET(SALOME_INSTALL_AMCONFIG_LOCAL "@SALOME_INSTALL_AMCONFIG_LOCAL@")
SET(SALOME_USE_64BIT_IDS @SALOME_USE_64BIT_IDS@)
# Include GEOM targets if they were not already loaded: # Include GEOM targets if they were not already loaded:
IF(NOT (TARGET GEOMbasic)) IF(NOT (TARGET GEOMbasic))

View File

@ -26,6 +26,14 @@ INCLUDE_DIRECTORIES(
${PROJECT_BINARY_DIR}/idl ${PROJECT_BINARY_DIR}/idl
) )
IF(SALOME_USE_64_BITS_IDS)
SET(SMESH_ID_TYPE "long long")
ELSE()
SET(SMESH_ID_TYPE "long")
ENDIF()
SALOME_CONFIGURE_FILE(SMESH_smIdType.idl.in SMESH_smIdType.idl)
SET(SalomeIDLSMESH_IDLSOURCES SET(SalomeIDLSMESH_IDLSOURCES
SMESH_Gen.idl SMESH_Gen.idl
SMESH_Mesh.idl SMESH_Mesh.idl
@ -36,12 +44,13 @@ SET(SalomeIDLSMESH_IDLSOURCES
SMESH_Pattern.idl SMESH_Pattern.idl
SMESH_MeshEditor.idl SMESH_MeshEditor.idl
SMESH_Measurements.idl SMESH_Measurements.idl
SMESH_smIdType.idl ${CMAKE_CURRENT_BINARY_DIR}/SMESH_smIdType.idl
) )
SET(_idl_include_dirs SET(_idl_include_dirs
${KERNEL_ROOT_DIR}/idl/salome ${KERNEL_ROOT_DIR}/idl/salome
${GEOM_ROOT_DIR}/idl/salome ${GEOM_ROOT_DIR}/idl/salome
${PROJECT_BINARY_DIR}/idl
) )
SET(_idl_link_flags SET(_idl_link_flags

View File

@ -29,6 +29,7 @@
#include "SALOME_Exception.idl" #include "SALOME_Exception.idl"
#include "SALOME_GenericObj.idl" #include "SALOME_GenericObj.idl"
#include "GEOM_Gen.idl" #include "GEOM_Gen.idl"
#include "SMESH_smIdType.idl"
module SMESH module SMESH
{ {

View File

@ -22,11 +22,7 @@
module SMESH module SMESH
{ {
#ifndef SALOME_USE_64BIT_IDS typedef @SMESH_ID_TYPE@ smIdType;
typedef long smIdType;
#else
typedef long long smIdType;
#endif
}; };
#endif #endif

View File

@ -892,7 +892,7 @@ Driver_Mesh::Status DriverCGNS_Read::Perform()
// ... // ...
// NfacesM, Face1M, Face2M, ... FaceNM // NfacesM, Face1M, Face2M, ... FaceNM
const int nbFaces = elemData[ pos++ ]; const int nbFaces = elemData[ pos++ ];
vector<smIdType> quantities( nbFaces ); vector<int> quantities( nbFaces );
vector<const SMDS_MeshNode*> nodes, faceNodes; vector<const SMDS_MeshNode*> nodes, faceNodes;
nodes.reserve( nbFaces * 4 ); nodes.reserve( nbFaces * 4 );
for ( int iF = 0; iF < nbFaces; ++iF ) for ( int iF = 0; iF < nbFaces; ++iF )

View File

@ -139,7 +139,7 @@ Driver_Mesh::Status DriverDAT_W_SMDS_Mesh::Perform()
if (( v = myMesh->DownCast< SMDS_MeshVolume >( elem ))) if (( v = myMesh->DownCast< SMDS_MeshVolume >( elem )))
{ {
std::vector<smIdType> quant = v->GetQuantities(); std::vector<int> quant = v->GetQuantities();
if ( !quant.empty() ) if ( !quant.empty() )
{ {
fprintf(aFileId, "%d %d ", (int)quant.size(), quant[0]); fprintf(aFileId, "%d %d ", (int)quant.size(), quant[0]);

View File

@ -400,7 +400,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform()
for(TInt iElem = 0; iElem < aNbElem; iElem++){ for(TInt iElem = 0; iElem < aNbElem; iElem++){
MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(iElem); MED::TCConnSliceArr aConnSliceArr = aPolyedreInfo->GetConnSliceArr(iElem);
TInt aNbFaces = aConnSliceArr.size(); TInt aNbFaces = aConnSliceArr.size();
typedef MED::TVector<smIdType> TQuantities; typedef MED::TVector<int> TQuantities;
TQuantities aQuantities(aNbFaces); TQuantities aQuantities(aNbFaces);
TInt aNbNodes = aPolyedreInfo->GetNbNodes(iElem); TInt aNbNodes = aPolyedreInfo->GetNbNodes(iElem);
TNodeIds aNodeIds(aNbNodes); TNodeIds aNodeIds(aNbNodes);

View File

@ -908,7 +908,7 @@ SMDS_MeshFace* SMDS_Mesh::AddQuadPolygonalFace (const std::vector<const SMDS_Mes
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smIdType> & nodes_ids, SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smIdType> & nodes_ids,
const std::vector<smIdType> & quantities, const std::vector<int> & quantities,
const smIdType ID) const smIdType ID)
{ {
int nbNodes = nodes_ids.size(); int nbNodes = nodes_ids.size();
@ -928,7 +928,7 @@ SMDS_MeshVolume * SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smIdTy
SMDS_MeshVolume* SMDS_MeshVolume*
SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<const SMDS_MeshNode*>& nodes, SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType> & quantities, const std::vector<int> & quantities,
const smIdType ID) const smIdType ID)
{ {
if ( nodes.empty() || quantities.empty() ) if ( nodes.empty() || quantities.empty() )
@ -952,7 +952,7 @@ SMDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<const SMDS_MeshNode*>& n
SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume SMDS_MeshVolume* SMDS_Mesh::AddPolyhedralVolume
(const std::vector<const SMDS_MeshNode*> & nodes, (const std::vector<const SMDS_MeshNode*> & nodes,
const std::vector<smIdType> & quantities) const std::vector<int> & quantities)
{ {
smIdType ID = myCellFactory->GetFreeID(); smIdType ID = myCellFactory->GetFreeID();
return SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID); return SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID);
@ -1467,7 +1467,7 @@ smIdType SMDS_Mesh::NbNodes() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Return the number of elements /// Return the number of elements
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_Mesh::NbElements() const smIdType SMDS_Mesh::NbElements() const
{ {
return myInfo.NbElements(); return myInfo.NbElements();
} }
@ -1482,7 +1482,7 @@ smIdType SMDS_Mesh::Nb0DElements() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Return the number of 0D elements /// Return the number of 0D elements
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_Mesh::NbBalls() const smIdType SMDS_Mesh::NbBalls() const
{ {
return myInfo.NbBalls(); return myInfo.NbBalls();
} }
@ -1490,7 +1490,7 @@ int SMDS_Mesh::NbBalls() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Return the number of edges (including construction edges) /// Return the number of edges (including construction edges)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_Mesh::NbEdges() const smIdType SMDS_Mesh::NbEdges() const
{ {
return myInfo.NbEdges(); return myInfo.NbEdges();
} }
@ -1498,7 +1498,7 @@ int SMDS_Mesh::NbEdges() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Return the number of faces (including construction faces) /// Return the number of faces (including construction faces)
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_Mesh::NbFaces() const smIdType SMDS_Mesh::NbFaces() const
{ {
return myInfo.NbFaces(); return myInfo.NbFaces();
} }
@ -1506,7 +1506,7 @@ int SMDS_Mesh::NbFaces() const
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
/// Return the number of volumes /// Return the number of volumes
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_Mesh::NbVolumes() const smIdType SMDS_Mesh::NbVolumes() const
{ {
return myInfo.NbVolumes(); return myInfo.NbVolumes();
} }
@ -1515,7 +1515,7 @@ int SMDS_Mesh::NbVolumes() const
/// Return the number of child mesh of this mesh. /// Return the number of child mesh of this mesh.
/// Note that the tree structure of SMDS_Mesh is unused in SMESH /// Note that the tree structure of SMDS_Mesh is unused in SMESH
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
int SMDS_Mesh::NbSubMesh() const smIdType SMDS_Mesh::NbSubMesh() const
{ {
return myChildren.size(); return myChildren.size();
} }

View File

@ -575,17 +575,17 @@ public:
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
(const std::vector<smIdType> & nodes_ids, (const std::vector<smIdType> & nodes_ids,
const std::vector<smIdType> & quantities, const std::vector<int> & quantities,
const smIdType ID); const smIdType ID);
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
(const std::vector<const SMDS_MeshNode*> & nodes, (const std::vector<const SMDS_MeshNode*> & nodes,
const std::vector<smIdType> & quantities, const std::vector<int> & quantities,
const smIdType ID); const smIdType ID);
virtual SMDS_MeshVolume* AddPolyhedralVolume virtual SMDS_MeshVolume* AddPolyhedralVolume
(const std::vector<const SMDS_MeshNode*> & nodes, (const std::vector<const SMDS_MeshNode*> & nodes,
const std::vector<smIdType> & quantities); const std::vector<int> & quantities);
virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector<vtkIdType>& vtkNodeIds); virtual SMDS_MeshVolume* AddVolumeFromVtkIds(const std::vector<vtkIdType>& vtkNodeIds);
@ -690,13 +690,13 @@ public:
const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; } const SMDS_MeshInfo& GetMeshInfo() const { return myInfo; }
virtual smIdType NbNodes() const; virtual smIdType NbNodes() const;
virtual int NbElements() const; virtual smIdType NbElements() const;
virtual smIdType Nb0DElements() const; virtual smIdType Nb0DElements() const;
virtual int NbBalls() const; virtual smIdType NbBalls() const;
virtual int NbEdges() const; virtual smIdType NbEdges() const;
virtual int NbFaces() const; virtual smIdType NbFaces() const;
virtual int NbVolumes() const; virtual smIdType NbVolumes() const;
virtual int NbSubMesh() const; virtual smIdType NbSubMesh() const;
virtual ~SMDS_Mesh(); virtual ~SMDS_Mesh();

View File

@ -36,7 +36,7 @@
// init a polyherdon // init a polyherdon
void SMDS_MeshVolume::init( const std::vector<const SMDS_MeshNode*>& nodes, void SMDS_MeshVolume::init( const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& nbNodesPerFace ) const std::vector<int>& nbNodesPerFace )
{ {
std::vector<vtkIdType> ptIds; std::vector<vtkIdType> ptIds;
ptIds.reserve( nodes.size() + nbNodesPerFace.size() + 1 ); ptIds.reserve( nodes.size() + nbNodesPerFace.size() + 1 );
@ -44,9 +44,9 @@ void SMDS_MeshVolume::init( const std::vector<const SMDS_MeshNode*>& nodes,
size_t nbFaces = nbNodesPerFace.size(); size_t nbFaces = nbNodesPerFace.size();
for ( size_t iN = 0, iF = 0; iF < nbFaces; iF++ ) for ( size_t iN = 0, iF = 0; iF < nbFaces; iF++ )
{ {
smIdType nf = nbNodesPerFace[iF]; int nf = nbNodesPerFace[iF];
ptIds.push_back(nf); ptIds.push_back(nf);
for (smIdType n = 0; n < nf; n++) for (int n = 0; n < nf; n++)
ptIds.push_back( nodes[ iN++ ]->GetVtkID() ); ptIds.push_back( nodes[ iN++ ]->GetVtkID() );
} }
@ -115,7 +115,7 @@ bool SMDS_MeshVolume::ChangeNodes(const std::vector<const SMDS_MeshNode*>& nodes
return true; return true;
} }
const SMDS_MeshNode* SMDS_MeshVolume::GetNode(const smIdType ind) const const SMDS_MeshNode* SMDS_MeshVolume::GetNode(const int ind) const
{ {
if ( !IsPoly() ) if ( !IsPoly() )
return SMDS_MeshCell::GetNode( ind ); return SMDS_MeshCell::GetNode( ind );
@ -266,18 +266,18 @@ const SMDS_MeshNode* SMDS_MeshVolume::GetFaceNode (const int face_ind, const int
return 0; return 0;
} }
std::vector<smIdType> SMDS_MeshVolume::GetQuantities() const std::vector<int> SMDS_MeshVolume::GetQuantities() const
{ {
std::vector<smIdType> quantities; std::vector<int> quantities;
if ( IsPoly() ) if ( IsPoly() )
{ {
vtkIdType nFaces = 0; vtkIdType nFaces = 0;
vtkIdType const *ptIds(nullptr); vtkIdType const *ptIds(nullptr);
getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds ); getGrid()->GetFaceStream( GetVtkID(), nFaces, ptIds );
smIdType id = 0; int id = 0;
for (smIdType i = 0; i < nFaces; i++) for (int i = 0; i < nFaces; i++)
{ {
smIdType nodesInFace = ptIds[id]; // nodeIds in ptIds[id+1 .. id+nodesInFace] int nodesInFace = ptIds[id]; // nodeIds in ptIds[id+1 .. id+nodesInFace]
quantities.push_back( nodesInFace ); quantities.push_back( nodesInFace );
id += (nodesInFace + 1); id += (nodesInFace + 1);
} }

View File

@ -31,8 +31,6 @@
#include "SMDS_MeshCell.hxx" #include "SMDS_MeshCell.hxx"
#include <smIdType.hxx>
/*! /*!
* \brief Mesh volume. This type is not allocated. * \brief Mesh volume. This type is not allocated.
* It is only used as function argument type to provide more clear semantic * It is only used as function argument type to provide more clear semantic
@ -41,7 +39,7 @@
class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell
{ {
void init( const std::vector<const SMDS_MeshNode*>& nodes, void init( const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& nbNodesPerFace ); // init a polyherdon const std::vector<int>& nbNodesPerFace ); // init a polyherdon
void init( const std::vector<vtkIdType>& vtkNodeIds ); void init( const std::vector<vtkIdType>& vtkNodeIds );
@ -49,7 +47,7 @@ class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell
public: public:
virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; } virtual SMDSAbs_ElementType GetType() const { return SMDSAbs_Volume; }
virtual const SMDS_MeshNode* GetNode(const smIdType ind) const; virtual const SMDS_MeshNode* GetNode(const int ind) const;
virtual int NbNodes() const; virtual int NbNodes() const;
virtual int NbFaces() const; virtual int NbFaces() const;
virtual int NbEdges() const; virtual int NbEdges() const;
@ -71,7 +69,7 @@ class SMDS_EXPORT SMDS_MeshVolume : public SMDS_MeshCell
// 1 <= node_ind <= NbFaceNodes() // 1 <= node_ind <= NbFaceNodes()
const SMDS_MeshNode* GetFaceNode (const int face_ind, const int node_ind) const; const SMDS_MeshNode* GetFaceNode (const int face_ind, const int node_ind) const;
std::vector<smIdType> GetQuantities() const; std::vector<int> GetQuantities() const;
static SMDSAbs_ElementType Type() { return SMDSAbs_Volume; } static SMDSAbs_ElementType Type() { return SMDSAbs_Volume; }
}; };

View File

@ -1983,49 +1983,49 @@ bool SMDS_VolumeTool::setFace( int faceIndex ) const
myAllFacesNodeIndices_F = &Tetra_F [0][0]; myAllFacesNodeIndices_F = &Tetra_F [0][0];
//myAllFacesNodeIndices_FE = &Tetra_F [0][0]; //myAllFacesNodeIndices_FE = &Tetra_F [0][0];
myAllFacesNodeIndices_RE = &Tetra_RE[0][0]; myAllFacesNodeIndices_RE = &Tetra_RE[0][0];
myAllFacesNbNodes = (smIdType*)(Tetra_nbN); myAllFacesNbNodes = Tetra_nbN;
myMaxFaceNbNodes = sizeof(Tetra_F[0])/sizeof(Tetra_F[0][0]); myMaxFaceNbNodes = sizeof(Tetra_F[0])/sizeof(Tetra_F[0][0]);
break; break;
case 5: case 5:
myAllFacesNodeIndices_F = &Pyramid_F [0][0]; myAllFacesNodeIndices_F = &Pyramid_F [0][0];
//myAllFacesNodeIndices_FE = &Pyramid_F [0][0]; //myAllFacesNodeIndices_FE = &Pyramid_F [0][0];
myAllFacesNodeIndices_RE = &Pyramid_RE[0][0]; myAllFacesNodeIndices_RE = &Pyramid_RE[0][0];
myAllFacesNbNodes = (smIdType*)(Pyramid_nbN); myAllFacesNbNodes = Pyramid_nbN;
myMaxFaceNbNodes = sizeof(Pyramid_F[0])/sizeof(Pyramid_F[0][0]); myMaxFaceNbNodes = sizeof(Pyramid_F[0])/sizeof(Pyramid_F[0][0]);
break; break;
case 6: case 6:
myAllFacesNodeIndices_F = &Penta_F [0][0]; myAllFacesNodeIndices_F = &Penta_F [0][0];
//myAllFacesNodeIndices_FE = &Penta_FE[0][0]; //myAllFacesNodeIndices_FE = &Penta_FE[0][0];
myAllFacesNodeIndices_RE = &Penta_RE[0][0]; myAllFacesNodeIndices_RE = &Penta_RE[0][0];
myAllFacesNbNodes = (smIdType*)(Penta_nbN); myAllFacesNbNodes = Penta_nbN;
myMaxFaceNbNodes = sizeof(Penta_F[0])/sizeof(Penta_F[0][0]); myMaxFaceNbNodes = sizeof(Penta_F[0])/sizeof(Penta_F[0][0]);
break; break;
case 8: case 8:
myAllFacesNodeIndices_F = &Hexa_F [0][0]; myAllFacesNodeIndices_F = &Hexa_F [0][0];
///myAllFacesNodeIndices_FE = &Hexa_FE[0][0]; ///myAllFacesNodeIndices_FE = &Hexa_FE[0][0];
myAllFacesNodeIndices_RE = &Hexa_RE[0][0]; myAllFacesNodeIndices_RE = &Hexa_RE[0][0];
myAllFacesNbNodes = (smIdType*)(Hexa_nbN); myAllFacesNbNodes = Hexa_nbN;
myMaxFaceNbNodes = sizeof(Hexa_F[0])/sizeof(Hexa_F[0][0]); myMaxFaceNbNodes = sizeof(Hexa_F[0])/sizeof(Hexa_F[0][0]);
break; break;
case 10: case 10:
myAllFacesNodeIndices_F = &QuadTetra_F [0][0]; myAllFacesNodeIndices_F = &QuadTetra_F [0][0];
//myAllFacesNodeIndices_FE = &QuadTetra_F [0][0]; //myAllFacesNodeIndices_FE = &QuadTetra_F [0][0];
myAllFacesNodeIndices_RE = &QuadTetra_RE[0][0]; myAllFacesNodeIndices_RE = &QuadTetra_RE[0][0];
myAllFacesNbNodes = (smIdType*)(QuadTetra_nbN); myAllFacesNbNodes = QuadTetra_nbN;
myMaxFaceNbNodes = sizeof(QuadTetra_F[0])/sizeof(QuadTetra_F[0][0]); myMaxFaceNbNodes = sizeof(QuadTetra_F[0])/sizeof(QuadTetra_F[0][0]);
break; break;
case 13: case 13:
myAllFacesNodeIndices_F = &QuadPyram_F [0][0]; myAllFacesNodeIndices_F = &QuadPyram_F [0][0];
//myAllFacesNodeIndices_FE = &QuadPyram_F [0][0]; //myAllFacesNodeIndices_FE = &QuadPyram_F [0][0];
myAllFacesNodeIndices_RE = &QuadPyram_RE[0][0]; myAllFacesNodeIndices_RE = &QuadPyram_RE[0][0];
myAllFacesNbNodes = (smIdType*)(QuadPyram_nbN); myAllFacesNbNodes = QuadPyram_nbN;
myMaxFaceNbNodes = sizeof(QuadPyram_F[0])/sizeof(QuadPyram_F[0][0]); myMaxFaceNbNodes = sizeof(QuadPyram_F[0])/sizeof(QuadPyram_F[0][0]);
break; break;
case 15: case 15:
myAllFacesNodeIndices_F = &QuadPenta_F [0][0]; myAllFacesNodeIndices_F = &QuadPenta_F [0][0];
//myAllFacesNodeIndices_FE = &QuadPenta_FE[0][0]; //myAllFacesNodeIndices_FE = &QuadPenta_FE[0][0];
myAllFacesNodeIndices_RE = &QuadPenta_RE[0][0]; myAllFacesNodeIndices_RE = &QuadPenta_RE[0][0];
myAllFacesNbNodes = (smIdType*)(QuadPenta_nbN); myAllFacesNbNodes = QuadPenta_nbN;
myMaxFaceNbNodes = sizeof(QuadPenta_F[0])/sizeof(QuadPenta_F[0][0]); myMaxFaceNbNodes = sizeof(QuadPenta_F[0])/sizeof(QuadPenta_F[0][0]);
break; break;
case 20: case 20:
@ -2033,14 +2033,14 @@ bool SMDS_VolumeTool::setFace( int faceIndex ) const
myAllFacesNodeIndices_F = &QuadHexa_F [0][0]; myAllFacesNodeIndices_F = &QuadHexa_F [0][0];
//myAllFacesNodeIndices_FE = &QuadHexa_FE[0][0]; //myAllFacesNodeIndices_FE = &QuadHexa_FE[0][0];
myAllFacesNodeIndices_RE = &QuadHexa_RE[0][0]; myAllFacesNodeIndices_RE = &QuadHexa_RE[0][0];
myAllFacesNbNodes = (smIdType*)(QuadHexa_nbN); myAllFacesNbNodes = QuadHexa_nbN;
myMaxFaceNbNodes = sizeof(QuadHexa_F[0])/sizeof(QuadHexa_F[0][0]); myMaxFaceNbNodes = sizeof(QuadHexa_F[0])/sizeof(QuadHexa_F[0][0]);
if ( !myIgnoreCentralNodes && myVolumeNodes.size() == 27 ) if ( !myIgnoreCentralNodes && myVolumeNodes.size() == 27 )
{ {
myAllFacesNodeIndices_F = &TriQuadHexa_F [0][0]; myAllFacesNodeIndices_F = &TriQuadHexa_F [0][0];
//myAllFacesNodeIndices_FE = &TriQuadHexa_FE[0][0]; //myAllFacesNodeIndices_FE = &TriQuadHexa_FE[0][0];
myAllFacesNodeIndices_RE = &TriQuadHexa_RE[0][0]; myAllFacesNodeIndices_RE = &TriQuadHexa_RE[0][0];
myAllFacesNbNodes = (smIdType*)(TriQuadHexa_nbN); myAllFacesNbNodes = TriQuadHexa_nbN;
myMaxFaceNbNodes = sizeof(TriQuadHexa_F[0])/sizeof(TriQuadHexa_F[0][0]); myMaxFaceNbNodes = sizeof(TriQuadHexa_F[0])/sizeof(TriQuadHexa_F[0][0]);
} }
break; break;
@ -2048,7 +2048,7 @@ bool SMDS_VolumeTool::setFace( int faceIndex ) const
myAllFacesNodeIndices_F = &HexPrism_F [0][0]; myAllFacesNodeIndices_F = &HexPrism_F [0][0];
//myAllFacesNodeIndices_FE = &HexPrism_FE[0][0]; //myAllFacesNodeIndices_FE = &HexPrism_FE[0][0];
myAllFacesNodeIndices_RE = &HexPrism_RE[0][0]; myAllFacesNodeIndices_RE = &HexPrism_RE[0][0];
myAllFacesNbNodes = (smIdType*)(HexPrism_nbN); myAllFacesNbNodes = HexPrism_nbN;
myMaxFaceNbNodes = sizeof(HexPrism_F[0])/sizeof(HexPrism_F[0][0]); myMaxFaceNbNodes = sizeof(HexPrism_F[0])/sizeof(HexPrism_F[0][0]);
break; break;
default: default:

View File

@ -31,8 +31,6 @@
#include "SMESH_SMDS.hxx" #include "SMESH_SMDS.hxx"
#include <smIdType.hxx>
class SMDS_MeshElement; class SMDS_MeshElement;
class SMDS_MeshNode; class SMDS_MeshNode;
class SMDS_MeshVolume; class SMDS_MeshVolume;
@ -263,7 +261,7 @@ class SMDS_EXPORT SMDS_VolumeTool
int myNbFaces; int myNbFaces;
std::vector<const SMDS_MeshNode*> myVolumeNodes; std::vector<const SMDS_MeshNode*> myVolumeNodes;
std::vector< int > myPolyIndices; // of a myCurFace std::vector< int > myPolyIndices; // of a myCurFace
std::vector<smIdType> myPolyQuantities; std::vector<int> myPolyQuantities;
std::vector< int > myPolyFacetOri; // -1-in, +1-out, 0-undef std::vector< int > myPolyFacetOri; // -1-in, +1-out, 0-undef
typedef std::pair<int,int> Link; typedef std::pair<int,int> Link;
@ -273,7 +271,7 @@ class SMDS_EXPORT SMDS_VolumeTool
mutable const int* myAllFacesNodeIndices_F; mutable const int* myAllFacesNodeIndices_F;
mutable const int* myAllFacesNodeIndices_RE; mutable const int* myAllFacesNodeIndices_RE;
mutable const smIdType* myAllFacesNbNodes; mutable const int* myAllFacesNbNodes;
mutable int myMaxFaceNbNodes; mutable int myMaxFaceNbNodes;
struct SaveFacet; struct SaveFacet;

View File

@ -3124,7 +3124,7 @@ public:
smIdType GetLinkID (const SMDS_MeshNode * n1, smIdType GetLinkID (const SMDS_MeshNode * n1,
const SMDS_MeshNode * n2) const const SMDS_MeshNode * n2) const
{ {
return ( Min(FromIdType<int>(n1->GetID()),FromIdType<int>(n2->GetID())) * myMaxID + Max(FromIdType<int>(n1->GetID()),FromIdType<int>(n2->GetID()))); return ( std::min(n1->GetID(),n2->GetID()) * myMaxID + std::max(n1->GetID(),n2->GetID()));
} }
bool GetNodes (const long theLinkID, bool GetNodes (const long theLinkID,
@ -4603,7 +4603,7 @@ void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem,
baseType = SMDSEntity_Polygon; // WARNING: change baseType !!!! baseType = SMDSEntity_Polygon; // WARNING: change baseType !!!!
} }
vector<const SMDS_MeshNode*> polyedre_nodes (nbNodes*2 + 4*nbNodes); vector<const SMDS_MeshNode*> polyedre_nodes (nbNodes*2 + 4*nbNodes);
vector<smIdType> quantities (nbNodes + 2); vector<int> quantities (nbNodes + 2);
polyedre_nodes.clear(); polyedre_nodes.clear();
quantities.clear(); quantities.clear();
@ -6774,7 +6774,7 @@ void SMESH_MeshEditor::FindCoincidentNodes (TIDSortedNodeSet & theNodes,
int SMESH_MeshEditor::SimplifyFace (const vector<const SMDS_MeshNode *>& faceNodes, int SMESH_MeshEditor::SimplifyFace (const vector<const SMDS_MeshNode *>& faceNodes,
vector<const SMDS_MeshNode *>& poly_nodes, vector<const SMDS_MeshNode *>& poly_nodes,
vector<smIdType>& quantities) const vector<int>& quantities) const
{ {
int nbNodes = faceNodes.size(); int nbNodes = faceNodes.size();
while ( faceNodes[ 0 ] == faceNodes[ nbNodes-1 ] && nbNodes > 2 ) while ( faceNodes[ 0 ] == faceNodes[ nbNodes-1 ] && nbNodes > 2 )
@ -7078,7 +7078,7 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem,
// a polygon can divide into several elements // a polygon can divide into several elements
vector<const SMDS_MeshNode *> polygons_nodes; vector<const SMDS_MeshNode *> polygons_nodes;
vector<smIdType> quantities; vector<int> quantities;
nbResElems = SimplifyFace( curNodes, polygons_nodes, quantities ); nbResElems = SimplifyFace( curNodes, polygons_nodes, quantities );
newElemDefs.resize( nbResElems ); newElemDefs.resize( nbResElems );
for ( int inode = 0, iface = 0; iface < nbResElems; iface++ ) for ( int inode = 0, iface = 0; iface < nbResElems; iface++ )
@ -7118,7 +7118,7 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem,
int nbFaces = aPolyedre->NbFaces(); int nbFaces = aPolyedre->NbFaces();
vector<const SMDS_MeshNode *>& poly_nodes = newElemDefs[0].myNodes; vector<const SMDS_MeshNode *>& poly_nodes = newElemDefs[0].myNodes;
vector<smIdType> & quantities = newElemDefs[0].myPolyhedQuantities; vector<int> & quantities = newElemDefs[0].myPolyhedQuantities;
vector<const SMDS_MeshNode *> faceNodes; vector<const SMDS_MeshNode *> faceNodes;
poly_nodes.clear(); poly_nodes.clear();
quantities.clear(); quantities.clear();
@ -7370,7 +7370,7 @@ bool SMESH_MeshEditor::applyMerge( const SMDS_MeshElement* elem,
////////////////// HEXAHEDRON ---> polyhedron ////////////////// HEXAHEDRON ---> polyhedron
hexa.SetExternalNormal(); hexa.SetExternalNormal();
vector<const SMDS_MeshNode *>& poly_nodes = newElemDefs[0].myNodes; vector<const SMDS_MeshNode *>& poly_nodes = newElemDefs[0].myNodes;
vector<smIdType> & quantities = newElemDefs[0].myPolyhedQuantities; vector<int> & quantities = newElemDefs[0].myPolyhedQuantities;
poly_nodes.reserve( 6 * 4 ); poly_nodes.clear(); poly_nodes.reserve( 6 * 4 ); poly_nodes.clear();
quantities.reserve( 6 ); quantities.clear(); quantities.reserve( 6 ); quantities.clear();
for ( int iFace = 0; iFace < 6; iFace++ ) for ( int iFace = 0; iFace < 6; iFace++ )
@ -8607,7 +8607,7 @@ void SMESH_MeshEditor::UpdateVolumes (const SMDS_MeshNode* theBetweenNode
// insert new nodes in all faces of the volume, sharing link theBetweenNode1 - theBetweenNode2 // insert new nodes in all faces of the volume, sharing link theBetweenNode1 - theBetweenNode2
int iface, nbFaces = aVolume.NbFaces(); int iface, nbFaces = aVolume.NbFaces();
vector<const SMDS_MeshNode *> poly_nodes; vector<const SMDS_MeshNode *> poly_nodes;
vector<smIdType> quantities (nbFaces); vector<int> quantities (nbFaces);
for (iface = 0; iface < nbFaces; iface++) { for (iface = 0; iface < nbFaces; iface++) {
int nbFaceNodes = aVolume.NbFaceNodes(iface), nbInserted = 0; int nbFaceNodes = aVolume.NbFaceNodes(iface), nbInserted = 0;
@ -8672,7 +8672,7 @@ namespace
void volumeToPolyhedron( const SMDS_MeshElement* elem, void volumeToPolyhedron( const SMDS_MeshElement* elem,
vector<const SMDS_MeshNode *> & nodes, vector<const SMDS_MeshNode *> & nodes,
vector<smIdType> & nbNodeInFaces ) vector<int> & nbNodeInFaces )
{ {
nodes.clear(); nodes.clear();
nbNodeInFaces.clear(); nbNodeInFaces.clear();
@ -8701,7 +8701,7 @@ int SMESH_MeshEditor::convertElemToQuadratic(SMESHDS_SubMesh * theSm,
int nbElem = 0; int nbElem = 0;
if( !theSm ) return nbElem; if( !theSm ) return nbElem;
vector<smIdType> nbNodeInFaces; vector<int> nbNodeInFaces;
vector<const SMDS_MeshNode *> nodes; vector<const SMDS_MeshNode *> nodes;
SMDS_ElemIteratorPtr ElemItr = theSm->GetElements(); SMDS_ElemIteratorPtr ElemItr = theSm->GetElements();
while(ElemItr->more()) while(ElemItr->more())
@ -8948,7 +8948,7 @@ void SMESH_MeshEditor::ConvertToQuadratic(const bool theForce3d, const bool theT
} }
// convert volumes // convert volumes
vector<smIdType> nbNodeInFaces; vector<int> nbNodeInFaces;
SMDS_VolumeIteratorPtr aVolumeItr = meshDS->volumesIterator(); SMDS_VolumeIteratorPtr aVolumeItr = meshDS->volumesIterator();
while(aVolumeItr->more()) while(aVolumeItr->more())
{ {

View File

@ -89,7 +89,7 @@ public:
bool myIsPoly, myIsQuad; bool myIsPoly, myIsQuad;
int myID; int myID;
double myBallDiameter; double myBallDiameter;
std::vector<smIdType> myPolyhedQuantities; std::vector<int> myPolyhedQuantities;
std::vector<const SMDS_MeshNode*> myNodes; // not managed by ElemFeatures std::vector<const SMDS_MeshNode*> myNodes; // not managed by ElemFeatures
SMESH_EXPORT ElemFeatures( SMDSAbs_ElementType type=SMDSAbs_All, bool isPoly=false, bool isQuad=false ) SMESH_EXPORT ElemFeatures( SMDSAbs_ElementType type=SMDSAbs_All, bool isPoly=false, bool isQuad=false )
@ -103,11 +103,11 @@ public:
SMESH_EXPORT ElemFeatures& Init( double diameter ) SMESH_EXPORT ElemFeatures& Init( double diameter )
{ myType = SMDSAbs_Ball; myBallDiameter = diameter; return *this; } { myType = SMDSAbs_Ball; myBallDiameter = diameter; return *this; }
SMESH_EXPORT ElemFeatures& Init( std::vector<smIdType>& quanities, bool isQuad=false ) SMESH_EXPORT ElemFeatures& Init( std::vector<int>& quanities, bool isQuad=false )
{ myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad;
myPolyhedQuantities.swap( quanities ); return *this; } myPolyhedQuantities.swap( quanities ); return *this; }
SMESH_EXPORT ElemFeatures& Init( const std::vector<smIdType>& quanities, bool isQuad=false ) SMESH_EXPORT ElemFeatures& Init( const std::vector<int>& quanities, bool isQuad=false )
{ myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad; { myType = SMDSAbs_Volume; myIsPoly = 1; myIsQuad = isQuad;
myPolyhedQuantities = quanities; return *this; } myPolyhedQuantities = quanities; return *this; }
@ -517,7 +517,7 @@ public:
int SimplifyFace (const std::vector<const SMDS_MeshNode *>& faceNodes, int SimplifyFace (const std::vector<const SMDS_MeshNode *>& faceNodes,
std::vector<const SMDS_MeshNode *>& poly_nodes, std::vector<const SMDS_MeshNode *>& poly_nodes,
std::vector<smIdType>& quantities) const; std::vector<int>& quantities) const;
// Split face, defined by <faceNodes>, into several faces by repeating nodes. // Split face, defined by <faceNodes>, into several faces by repeating nodes.
// Is used by MergeNodes() // Is used by MergeNodes()

View File

@ -2441,7 +2441,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
SMDS_MeshVolume* SMDS_MeshVolume*
SMESH_MesherHelper::AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>& nodes, SMESH_MesherHelper::AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& quantities, const std::vector<int>& quantities,
const int id, const int id,
const bool force3d) const bool force3d)
{ {
@ -2457,7 +2457,7 @@ SMESH_MesherHelper::AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>
else else
{ {
vector<const SMDS_MeshNode*> newNodes; vector<const SMDS_MeshNode*> newNodes;
vector<smIdType> newQuantities; vector<int> newQuantities;
for ( size_t iFace = 0, iN = 0; iFace < quantities.size(); ++iFace ) for ( size_t iFace = 0, iN = 0; iFace < quantities.size(); ++iFace )
{ {
int nbNodesInFace = quantities[iFace]; int nbNodesInFace = quantities[iFace];

View File

@ -440,7 +440,7 @@ public:
* Creates polyhedron. In quadratic mesh, adds medium nodes * Creates polyhedron. In quadratic mesh, adds medium nodes
*/ */
SMDS_MeshVolume* AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>& nodes, SMDS_MeshVolume* AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& quantities, const std::vector<int>& quantities,
const int ID=0, const int ID=0,
const bool force3d = true); const bool force3d = true);
/*! /*!

View File

@ -3732,9 +3732,9 @@ void SMESH_Pattern::
if ( !volTool.Set( elem ) || !avoidSet.insert( elem ).second ) if ( !volTool.Set( elem ) || !avoidSet.insert( elem ).second )
continue; // skip faces or refined elements continue; // skip faces or refined elements
// add polyhedron definition // add polyhedron definition
myPolyhedronQuantities.push_back(vector<smIdType> ()); myPolyhedronQuantities.push_back(vector<int> ());
myPolyElemXYZIDs.push_back(TElemDef()); myPolyElemXYZIDs.push_back(TElemDef());
vector<smIdType>& quantity = myPolyhedronQuantities.back(); vector<int>& quantity = myPolyhedronQuantities.back();
TElemDef & elemDef = myPolyElemXYZIDs.back(); TElemDef & elemDef = myPolyElemXYZIDs.back();
// get definitions of new elements on volume faces // get definitions of new elements on volume faces
bool makePoly = false; bool makePoly = false;
@ -3767,7 +3767,7 @@ bool SMESH_Pattern::
const int theNbBndNodes, const int theNbBndNodes,
const vector< const SMDS_MeshNode* >& theNodes, const vector< const SMDS_MeshNode* >& theNodes,
list< int >& theFaceDefs, list< int >& theFaceDefs,
vector<smIdType>& theQuantity) vector<int>& theQuantity)
{ {
bool makePoly = false; bool makePoly = false;
@ -4257,7 +4257,7 @@ void SMESH_Pattern::createElements(SMESH_Mesh* theMes
bool is2d = myIs2D; bool is2d = myIs2D;
list< TElemDef >::const_iterator enIt = theElemNodeIDs.begin(); list< TElemDef >::const_iterator enIt = theElemNodeIDs.begin();
list< vector<smIdType> >::iterator quantity = myPolyhedronQuantities.begin(); list< vector<int> >::iterator quantity = myPolyhedronQuantities.begin();
for ( int iElem = 0; enIt != theElemNodeIDs.end(); enIt++, iElem++ ) for ( int iElem = 0; enIt != theElemNodeIDs.end(); enIt++, iElem++ )
{ {
const TElemDef & elemNodeInd = *enIt; const TElemDef & elemNodeInd = *enIt;

View File

@ -28,7 +28,6 @@
#define SMESH_Pattern_HeaderFile #define SMESH_Pattern_HeaderFile
#include "SMESH_SMESH.hxx" #include "SMESH_SMESH.hxx"
#include <smIdType.hxx>
#include <vector> #include <vector>
#include <list> #include <list>
@ -329,7 +328,7 @@ private:
const int theNbBndNodes, const int theNbBndNodes,
const std::vector< const SMDS_MeshNode* >& theNodes, const std::vector< const SMDS_MeshNode* >& theNodes,
std::list< int >& theFaceDefs, std::list< int >& theFaceDefs,
std::vector<smIdType>& theQuantity); std::vector<int>& theQuantity);
// fill faces definition for a volume face defined by theBndNodes // fill faces definition for a volume face defined by theBndNodes
// return true if a face definition changes // return true if a face definition changes
@ -393,7 +392,7 @@ private:
std::vector<const SMDS_MeshElement*> myPolyElems; std::vector<const SMDS_MeshElement*> myPolyElems;
// definitions of new poly elements // definitions of new poly elements
std::list< TElemDef > myPolyElemXYZIDs; std::list< TElemDef > myPolyElemXYZIDs;
std::list< std::vector<smIdType> > myPolyhedronQuantities; std::list< std::vector<int> > myPolyhedronQuantities;
// map a boundary to XYZs on it; // map a boundary to XYZs on it;
// a boundary (edge or face) is defined as a set of its nodes, // a boundary (edge or face) is defined as a set of its nodes,

View File

@ -203,13 +203,13 @@ namespace
//======================================================================= //=======================================================================
inline void AddQuadsWithID(SMDS_Mesh* theMesh, inline void AddQuadsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var theSeq, SMESH::log_array_var theSeq,
CORBA::Long theId) SMESH::smIdType theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number; SMESH::smIdType anElemId = 0, aNbElems = theSeq[theId].number;
if(5*aNbElems != (CORBA::Long) anIndexes.length()) if(5*aNbElems != (SMESH::smIdType) anIndexes.length())
EXCEPTION(runtime_error,"AddQuadsWithID - 4*aNbElems != anIndexes.length()"); EXCEPTION(runtime_error,"AddQuadsWithID - 4*aNbElems != anIndexes.length()");
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){ for(SMESH::smIdType anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=5){
SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1], SMDS_MeshElement* anElem = theMesh->AddFaceWithID(anIndexes[anIndexId+1],
anIndexes[anIndexId+2], anIndexes[anIndexId+2],
anIndexes[anIndexId+3], anIndexes[anIndexId+3],
@ -226,12 +226,12 @@ namespace
//======================================================================= //=======================================================================
inline void AddPolygonsWithID(SMDS_Mesh* theMesh, inline void AddPolygonsWithID(SMDS_Mesh* theMesh,
SMESH::log_array_var& theSeq, SMESH::log_array_var& theSeq,
CORBA::Long theId) SMESH::smIdType theId)
{ {
const SMESH::long_array& anIndexes = theSeq[theId].indexes; const SMESH::long_array& anIndexes = theSeq[theId].indexes;
CORBA::Long anIndexId = 0, aNbElems = theSeq[theId].number; SMESH::smIdType anIndexId = 0, aNbElems = theSeq[theId].number;
for (CORBA::Long anElemId = 0; anElemId < aNbElems; anElemId++) { for (SMESH::smIdType anElemId = 0; anElemId < aNbElems; anElemId++) {
smIdType aFaceId = anIndexes[anIndexId++]; smIdType aFaceId = anIndexes[anIndexId++];
int aNbNodes = anIndexes[anIndexId++]; int aNbNodes = anIndexes[anIndexId++];
@ -424,7 +424,7 @@ namespace
} }
int aNbFaces = anIndexes[anIndexId++]; int aNbFaces = anIndexes[anIndexId++];
std::vector<smIdType> quantities (aNbFaces); std::vector<int> quantities (aNbFaces);
for (int i = 0; i < aNbFaces; i++) { for (int i = 0; i < aNbFaces; i++) {
quantities[i] = anIndexes[anIndexId++]; quantities[i] = anIndexes[anIndexId++];
} }

View File

@ -52,7 +52,7 @@ SMESHDS_Command::~SMESHDS_Command()
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z) void SMESHDS_Command::AddNode(smIdType NewNodeID, double x, double y, double z)
{ {
if ( myType != SMESHDS_AddNode) if ( myType != SMESHDS_AddNode)
{ {
@ -70,7 +70,7 @@ void SMESHDS_Command::AddNode(int NewNodeID, double x, double y, double z)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z) void SMESHDS_Command::MoveNode(smIdType NodeID, double x, double y, double z)
{ {
if ( myType != SMESHDS_MoveNode) if ( myType != SMESHDS_MoveNode)
{ {
@ -88,7 +88,7 @@ void SMESHDS_Command::MoveNode(int NodeID, double x, double y, double z)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::Add0DElement(int New0DElementID, int idnode) void SMESHDS_Command::Add0DElement(smIdType New0DElementID, smIdType idnode)
{ {
if ( myType != SMESHDS_Add0DElement) if ( myType != SMESHDS_Add0DElement)
{ {
@ -104,7 +104,7 @@ void SMESHDS_Command::Add0DElement(int New0DElementID, int idnode)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2) void SMESHDS_Command::AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2)
{ {
if ( myType != SMESHDS_AddEdge) if ( myType != SMESHDS_AddEdge)
{ {
@ -121,8 +121,8 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int idnode1, int idnode2)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, void SMESHDS_Command::AddFace(smIdType NewFaceID,
int idnode1, int idnode2, int idnode3) smIdType idnode1, smIdType idnode2, smIdType idnode3)
{ {
if ( myType != SMESHDS_AddTriangle) if ( myType != SMESHDS_AddTriangle)
{ {
@ -140,8 +140,8 @@ void SMESHDS_Command::AddFace(int NewFaceID,
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, void SMESHDS_Command::AddFace(smIdType NewFaceID,
int idnode1, int idnode2, int idnode3, int idnode4) smIdType idnode1, smIdType idnode2, smIdType idnode3, smIdType idnode4)
{ {
if ( myType != SMESHDS_AddQuadrangle) if ( myType != SMESHDS_AddQuadrangle)
{ {
@ -286,7 +286,7 @@ void SMESHDS_Command::AddPolygonalFace (const smIdType ElementID,
} }
myIntegers.push_back(ElementID); myIntegers.push_back(ElementID);
int i, nbNodes = nodes_ids.size(); smIdType i, nbNodes = nodes_ids.size();
myIntegers.push_back(nbNodes); myIntegers.push_back(nbNodes);
for (i = 0; i < nbNodes; i++) { for (i = 0; i < nbNodes; i++) {
myIntegers.push_back(nodes_ids[i]); myIntegers.push_back(nodes_ids[i]);
@ -308,7 +308,7 @@ void SMESHDS_Command::AddQuadPolygonalFace (const smIdType Element
} }
myIntegers.push_back(ElementID); myIntegers.push_back(ElementID);
int i, nbNodes = nodes_ids.size(); smIdType i, nbNodes = nodes_ids.size();
myIntegers.push_back(nbNodes); myIntegers.push_back(nbNodes);
for (i = 0; i < nbNodes; i++) { for (i = 0; i < nbNodes; i++) {
myIntegers.push_back(nodes_ids[i]); myIntegers.push_back(nodes_ids[i]);
@ -323,7 +323,7 @@ void SMESHDS_Command::AddQuadPolygonalFace (const smIdType Element
//======================================================================= //=======================================================================
void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementID, void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementID,
const std::vector<smIdType>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<smIdType>& quantities) const std::vector<int>& quantities)
{ {
if ( myType != SMESHDS_AddPolyhedron) { if ( myType != SMESHDS_AddPolyhedron) {
MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddPolyhedralVolume : Bad Type");
@ -331,13 +331,13 @@ void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementI
} }
myIntegers.push_back(ElementID); myIntegers.push_back(ElementID);
int i, nbNodes = nodes_ids.size(); smIdType i, nbNodes = nodes_ids.size();
myIntegers.push_back(nbNodes); myIntegers.push_back(nbNodes);
for (i = 0; i < nbNodes; i++) { for (i = 0; i < nbNodes; i++) {
myIntegers.push_back(nodes_ids[i]); myIntegers.push_back(nodes_ids[i]);
} }
int nbFaces = quantities.size(); smIdType nbFaces = quantities.size();
myIntegers.push_back(nbFaces); myIntegers.push_back(nbFaces);
for (i = 0; i < nbFaces; i++) { for (i = 0; i < nbFaces; i++) {
myIntegers.push_back(quantities[i]); myIntegers.push_back(quantities[i]);
@ -350,7 +350,7 @@ void SMESHDS_Command::AddPolyhedralVolume (const smIdType ElementI
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::RemoveNode(int NodeID) void SMESHDS_Command::RemoveNode(smIdType NodeID)
{ {
if ( myType != SMESHDS_RemoveNode) if ( myType != SMESHDS_RemoveNode)
{ {
@ -365,7 +365,7 @@ void SMESHDS_Command::RemoveNode(int NodeID)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::RemoveElement(int ElementID) void SMESHDS_Command::RemoveElement(smIdType ElementID)
{ {
if ( myType != SMESHDS_RemoveElement) if ( myType != SMESHDS_RemoveElement)
{ {
@ -381,7 +381,7 @@ void SMESHDS_Command::RemoveElement(int ElementID)
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes) void SMESHDS_Command::ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes)
{ {
if ( myType != SMESHDS_ChangeElementNodes) if ( myType != SMESHDS_ChangeElementNodes)
{ {
@ -390,7 +390,7 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes
} }
myIntegers.push_back(ElementID); myIntegers.push_back(ElementID);
myIntegers.push_back(nbnodes); myIntegers.push_back(nbnodes);
for ( int i = 0; i < nbnodes; i++ ) for ( smIdType i = 0; i < nbnodes; i++ )
myIntegers.push_back( nodes[ i ] ); myIntegers.push_back( nodes[ i ] );
myNumber++; myNumber++;
@ -400,8 +400,8 @@ void SMESHDS_Command::ChangeElementNodes(int ElementID, int nodes[], int nbnodes
//function : ChangePolyhedronNodes //function : ChangePolyhedronNodes
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID, void SMESHDS_Command::ChangePolyhedronNodes (const smIdType ElementID,
const std::vector<int>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<int>& quantities) const std::vector<int>& quantities)
{ {
if (myType != SMESHDS_ChangePolyhedronNodes) if (myType != SMESHDS_ChangePolyhedronNodes)
@ -411,7 +411,7 @@ void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
} }
myIntegers.push_back(ElementID); myIntegers.push_back(ElementID);
int i, nbNodes = nodes_ids.size(); smIdType i, nbNodes = nodes_ids.size();
myIntegers.push_back(nbNodes); myIntegers.push_back(nbNodes);
for (i = 0; i < nbNodes; i++) { for (i = 0; i < nbNodes; i++) {
myIntegers.push_back(nodes_ids[i]); myIntegers.push_back(nodes_ids[i]);
@ -431,7 +431,7 @@ void SMESHDS_Command::ChangePolyhedronNodes (const int ElementID,
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::Renumber (const bool isNodes, const int startID, const int deltaID) void SMESHDS_Command::Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID)
{ {
if ( myType != SMESHDS_Renumber) if ( myType != SMESHDS_Renumber)
{ {
@ -457,7 +457,7 @@ SMESHDS_CommandType SMESHDS_Command::GetType()
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
int SMESHDS_Command::GetNumber() smIdType SMESHDS_Command::GetNumber()
{ {
return myNumber; return myNumber;
} }
@ -466,7 +466,7 @@ int SMESHDS_Command::GetNumber()
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
const list < int >&SMESHDS_Command::GetIndexes() const list < smIdType >&SMESHDS_Command::GetIndexes()
{ {
return myIntegers; return myIntegers;
} }
@ -489,7 +489,7 @@ const list < double >&SMESHDS_Command::GetCoords()
//function : AddEdge //function : AddEdge
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddEdge(int NewEdgeID, int n1, int n2, int n12) void SMESHDS_Command::AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12)
{ {
if ( myType != SMESHDS_AddQuadEdge) { if ( myType != SMESHDS_AddQuadEdge) {
MESSAGE("SMESHDS_Command::AddEdge : Bad Type"); MESSAGE("SMESHDS_Command::AddEdge : Bad Type");
@ -506,9 +506,9 @@ void SMESHDS_Command::AddEdge(int NewEdgeID, int n1, int n2, int n12)
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, void SMESHDS_Command::AddFace(smIdType NewFaceID,
int n1, int n2, int n3, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31) smIdType n12, smIdType n23, smIdType n31)
{ {
if ( myType != SMESHDS_AddQuadTriangle) { if ( myType != SMESHDS_AddQuadTriangle) {
MESSAGE("SMESHDS_Command::AddFace : Bad Type"); MESSAGE("SMESHDS_Command::AddFace : Bad Type");
@ -528,9 +528,9 @@ void SMESHDS_Command::AddFace(int NewFaceID,
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, void SMESHDS_Command::AddFace(smIdType NewFaceID,
int n1, int n2, int n3, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31, int nCenter) smIdType n12, smIdType n23, smIdType n31, smIdType nCenter)
{ {
if ( myType != SMESHDS_AddBiQuadTriangle) { if ( myType != SMESHDS_AddBiQuadTriangle) {
MESSAGE("SMESHDS_Command::AddFace : Bad Type"); MESSAGE("SMESHDS_Command::AddFace : Bad Type");
@ -551,9 +551,9 @@ void SMESHDS_Command::AddFace(int NewFaceID,
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, void SMESHDS_Command::AddFace(smIdType NewFaceID,
int n1, int n2, int n3, int n4, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41) smIdType n12, smIdType n23, smIdType n34, smIdType n41)
{ {
if ( myType != SMESHDS_AddQuadQuadrangle) { if ( myType != SMESHDS_AddQuadQuadrangle) {
MESSAGE("SMESHDS_Command::AddFace : Bad Type"); MESSAGE("SMESHDS_Command::AddFace : Bad Type");
@ -575,9 +575,9 @@ void SMESHDS_Command::AddFace(int NewFaceID,
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddFace(int NewFaceID, void SMESHDS_Command::AddFace(smIdType NewFaceID,
int n1, int n2, int n3, int n4, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41, int nCenter) smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter)
{ {
if (myType != SMESHDS_AddBiQuadQuadrangle) { if (myType != SMESHDS_AddBiQuadQuadrangle) {
MESSAGE("SMESHDS_Command::AddFace : Bad Type"); MESSAGE("SMESHDS_Command::AddFace : Bad Type");
@ -600,9 +600,9 @@ void SMESHDS_Command::AddFace(int NewFaceID,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n14, int n24, int n34) smIdType n14, smIdType n24, smIdType n34)
{ {
if ( myType != SMESHDS_AddQuadTetrahedron) { if ( myType != SMESHDS_AddQuadTetrahedron) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
@ -626,10 +626,10 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2,
int n3, int n4, int n5, smIdType n3, smIdType n4, smIdType n5,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n15, int n25, int n35, int n45) smIdType n15, smIdType n25, smIdType n35, smIdType n45)
{ {
if ( myType != SMESHDS_AddQuadPyramid) { if ( myType != SMESHDS_AddQuadPyramid) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
@ -656,11 +656,11 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2,
int n3, int n4, int n5,int n6, smIdType n3, smIdType n4, smIdType n5,smIdType n6,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36) smIdType n14, smIdType n25, smIdType n36)
{ {
if ( myType != SMESHDS_AddQuadPentahedron) { if ( myType != SMESHDS_AddQuadPentahedron) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
@ -688,12 +688,12 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2,
int n3, int n4, int n5,int n6, smIdType n3, smIdType n4, smIdType n5,smIdType n6,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36, smIdType n14, smIdType n25, smIdType n36,
int n1245, int n2356, int n1346) smIdType n1245, smIdType n2356, smIdType n1346)
{ {
if ( myType != SMESHDS_AddBiQuadPentahedron) { if ( myType != SMESHDS_AddBiQuadPentahedron) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
@ -726,11 +726,11 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, int n7, int n8, smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48) smIdType n15, smIdType n26, smIdType n37, smIdType n48)
{ {
if ( myType != SMESHDS_AddQuadHexahedron) { if ( myType != SMESHDS_AddQuadHexahedron) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
@ -764,13 +764,13 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3, void SMESHDS_Command::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, int n7, int n8, smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48, smIdType n15, smIdType n26, smIdType n37, smIdType n48,
int n1234,int n1256,int n2367,int n3478, smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478,
int n1458,int n5678,int nCenter) smIdType n1458,smIdType n5678,smIdType nCenter)
{ {
if ( myType != SMESHDS_AddTriQuadHexa) { if ( myType != SMESHDS_AddTriQuadHexa) {
MESSAGE("SMESHDS_Command::AddVolume : Bad Type"); MESSAGE("SMESHDS_Command::AddVolume : Bad Type");
@ -813,7 +813,7 @@ void SMESHDS_Command::AddVolume(int NewVolID, int n1, int n2, int n3,
*/ */
//================================================================================ //================================================================================
void SMESHDS_Command::AddBall(int NewBallID, int node, double diameter) void SMESHDS_Command::AddBall(smIdType NewBallID, smIdType node, double diameter)
{ {
if ( myType != SMESHDS_AddBall) if ( myType != SMESHDS_AddBall)
{ {

View File

@ -39,12 +39,12 @@ class SMESHDS_EXPORT SMESHDS_Command
public: public:
SMESHDS_Command(const SMESHDS_CommandType aType); SMESHDS_Command(const SMESHDS_CommandType aType);
void AddNode(int NewNodeID, double x, double y, double z); void AddNode(smIdType NewNodeID, double x, double y, double z);
void Add0DElement(int New0DElementID, int idnode); void Add0DElement(smIdType New0DElementID, smIdType idnode);
void AddEdge(int NewEdgeID, int idnode1, int idnode2); void AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2);
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3); void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3);
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
int idnode4); smIdType idnode4);
void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
smIdType idnode4); smIdType idnode4);
void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
@ -62,64 +62,64 @@ class SMESHDS_EXPORT SMESHDS_Command
const std::vector<smIdType>& nodes_ids); const std::vector<smIdType>& nodes_ids);
void AddPolyhedralVolume (const smIdType ElementID, void AddPolyhedralVolume (const smIdType ElementID,
const std::vector<smIdType>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<smIdType>& quantities); const std::vector<int>& quantities);
void AddBall(int NewBallID, int node, double diameter); void AddBall(smIdType NewBallID, smIdType node, double diameter);
// special methods for quadratic elements // special methods for quadratic elements
void AddEdge(int NewEdgeID, int n1, int n2, int n12); void AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12);
void AddFace(int NewFaceID, int n1, int n2, int n3, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31); smIdType n12, smIdType n23, smIdType n31);
void AddFace(int NewFaceID, int n1, int n2, int n3, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31, int nCenter); smIdType n12, smIdType n23, smIdType n31, smIdType nCenter);
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41); smIdType n12, smIdType n23, smIdType n34, smIdType n41);
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41, int nCenter); smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n31, int n14, int n24, int n34); smIdType n12, smIdType n23, smIdType n31, smIdType n14, smIdType n24, smIdType n34);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, smIdType n5,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n15, int n25, int n35, int n45); smIdType n15, smIdType n25, smIdType n35, smIdType n45);
void AddVolume(int NewVolID, int n1, int n2, int n3, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, smIdType n4, smIdType n5, smIdType n6,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36); smIdType n14, smIdType n25, smIdType n36);
void AddVolume(int NewVolID, int n1, int n2, int n3, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, smIdType n4, smIdType n5, smIdType n6,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36, smIdType n14, smIdType n25, smIdType n36,
int n1245, int n2356, int n1346); smIdType n1245, smIdType n2356, smIdType n1346);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n5, int n6, int n7, int n8, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48); smIdType n15, smIdType n26, smIdType n37, smIdType n48);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n5, int n6, int n7, int n8, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48, smIdType n15, smIdType n26, smIdType n37, smIdType n48,
int n1234,int n1256,int n2367,int n3478, smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478,
int n1458,int n5678,int nCenter); smIdType n1458,smIdType n5678,smIdType nCenter);
void MoveNode(int NewNodeID, double x, double y, double z); void MoveNode(smIdType NewNodeID, double x, double y, double z);
void RemoveNode(int NodeID); void RemoveNode(smIdType NodeID);
void RemoveElement(int ElementID); void RemoveElement(smIdType ElementID);
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes); void ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes);
void ChangePolyhedronNodes(const int ElementID, void ChangePolyhedronNodes(const smIdType ElementID,
const std::vector<int>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<int>& quantities); const std::vector<int>& quantities);
void Renumber (const bool isNodes, const int startID, const int deltaID); void Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID);
SMESHDS_CommandType GetType(); SMESHDS_CommandType GetType();
int GetNumber(); smIdType GetNumber();
const std::list<int> & GetIndexes(); const std::list<smIdType> & GetIndexes();
const std::list<double> & GetCoords(); const std::list<double> & GetCoords();
~SMESHDS_Command(); ~SMESHDS_Command();
private: private:
SMESHDS_CommandType myType; SMESHDS_CommandType myType;
int myNumber; int myNumber;
std::list<double> myReals; std::list<double> myReals;
std::list<int> myIntegers; std::list<smIdType> myIntegers;
}; };
#endif #endif

View File

@ -223,8 +223,8 @@ bool SMESHDS_Mesh::ChangeElementNodes(const SMDS_MeshElement * elem,
if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes )) if ( ! SMDS_Mesh::ChangeElementNodes( elem, nodes, nbnodes ))
return false; return false;
std::vector<int> IDs( nbnodes ); std::vector<smIdType> IDs( nbnodes );
for ( int i = 0; i < nbnodes; i++ ) for ( smIdType i = 0; i < nbnodes; i++ )
IDs [ i ] = nodes[ i ]->GetID(); IDs [ i ] = nodes[ i ]->GetID();
myScript->ChangeElementNodes( elem->GetID(), &IDs[0], nbnodes); myScript->ChangeElementNodes( elem->GetID(), &IDs[0], nbnodes);
@ -258,8 +258,8 @@ bool SMESHDS_Mesh
if ( !SMDS_Mesh::ChangePolyhedronNodes( elem, nodes, quantities )) if ( !SMDS_Mesh::ChangePolyhedronNodes( elem, nodes, quantities ))
return false; return false;
int i, len = nodes.size(); smIdType i, len = nodes.size();
std::vector<int> nodes_ids (len); std::vector<smIdType> nodes_ids (len);
for (i = 0; i < len; i++) { for (i = 0; i < len; i++) {
nodes_ids[i] = nodes[i]->GetID(); nodes_ids[i] = nodes[i]->GetID();
} }
@ -790,7 +790,7 @@ SMESHDS_Mesh::AddQuadPolygonalFace (const std::vector<const SMDS_MeshNode*>& nod
//purpose : //purpose :
//======================================================================= //=======================================================================
SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smIdType>& nodes_ids, SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smIdType>& nodes_ids,
const std::vector<smIdType>& quantities, const std::vector<int>& quantities,
const smIdType ID) const smIdType ID)
{ {
SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes_ids, quantities, ID); SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes_ids, quantities, ID);
@ -802,7 +802,7 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID (const std::vector<smId
SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID
(const std::vector<const SMDS_MeshNode*>& nodes, (const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& quantities, const std::vector<int>& quantities,
const smIdType ID) const smIdType ID)
{ {
SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID); SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolumeWithID(nodes, quantities, ID);
@ -819,7 +819,7 @@ SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolumeWithID
SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolume SMDS_MeshVolume* SMESHDS_Mesh::AddPolyhedralVolume
(const std::vector<const SMDS_MeshNode*>& nodes, (const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& quantities) const std::vector<int>& quantities)
{ {
SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolume(nodes, quantities); SMDS_MeshVolume *anElem = SMDS_Mesh::AddPolyhedralVolume(nodes, quantities);
if (anElem) { if (anElem) {

View File

@ -567,17 +567,17 @@ class SMESHDS_EXPORT SMESHDS_Mesh : public SMDS_Mesh
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
(const std::vector<smIdType>& nodes_ids, (const std::vector<smIdType>& nodes_ids,
const std::vector<smIdType>& quantities, const std::vector<int>& quantities,
const smIdType ID); const smIdType ID);
virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID virtual SMDS_MeshVolume* AddPolyhedralVolumeWithID
(const std::vector<const SMDS_MeshNode*>& nodes, (const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& quantities, const std::vector<int>& quantities,
const smIdType ID); const smIdType ID);
virtual SMDS_MeshVolume* AddPolyhedralVolume virtual SMDS_MeshVolume* AddPolyhedralVolume
(const std::vector<const SMDS_MeshNode*>& nodes, (const std::vector<const SMDS_MeshNode*>& nodes,
const std::vector<smIdType>& quantities); const std::vector<int>& quantities);
virtual void MoveNode(const SMDS_MeshNode *, double x, double y, double z); virtual void MoveNode(const SMDS_MeshNode *, double x, double y, double z);
virtual void RemoveNode(const SMDS_MeshNode *); virtual void RemoveNode(const SMDS_MeshNode *);

View File

@ -89,7 +89,7 @@ SMESHDS_Command* SMESHDS_Script::getCommand(const SMESHDS_CommandType aType)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddNode(int NewNodeID, double x, double y, double z) void SMESHDS_Script::AddNode(smIdType NewNodeID, double x, double y, double z)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -102,7 +102,7 @@ void SMESHDS_Script::AddNode(int NewNodeID, double x, double y, double z)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::Add0DElement (int New0DElementID, int idnode) void SMESHDS_Script::Add0DElement (smIdType New0DElementID, smIdType idnode)
{ {
if (myIsEmbeddedMode) { if (myIsEmbeddedMode) {
myIsModified = true; myIsModified = true;
@ -115,7 +115,7 @@ void SMESHDS_Script::Add0DElement (int New0DElementID, int idnode)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddEdge(int NewEdgeID, int idnode1, int idnode2) void SMESHDS_Script::AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -128,8 +128,8 @@ void SMESHDS_Script::AddEdge(int NewEdgeID, int idnode1, int idnode2)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddFace(int NewFaceID, void SMESHDS_Script::AddFace(smIdType NewFaceID,
int idnode1, int idnode2, int idnode3) smIdType idnode1, smIdType idnode2, smIdType idnode3)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -143,9 +143,9 @@ void SMESHDS_Script::AddFace(int NewFaceID,
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddFace(int NewFaceID, void SMESHDS_Script::AddFace(smIdType NewFaceID,
int idnode1, int idnode2, smIdType idnode1, smIdType idnode2,
int idnode3, int idnode4) smIdType idnode3, smIdType idnode4)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -274,7 +274,7 @@ void SMESHDS_Script::AddQuadPolygonalFace(smIdType NewFaceID, const std::vector<
//======================================================================= //=======================================================================
void SMESHDS_Script::AddPolyhedralVolume (smIdType NewID, void SMESHDS_Script::AddPolyhedralVolume (smIdType NewID,
const std::vector<smIdType>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<smIdType>& quantities) const std::vector<int>& quantities)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -289,7 +289,7 @@ void SMESHDS_Script::AddPolyhedralVolume (smIdType NewID,
//purpose : Record adding a Ball //purpose : Record adding a Ball
//======================================================================= //=======================================================================
void SMESHDS_Script::AddBall(int NewBallID, int node, double diameter) void SMESHDS_Script::AddBall(smIdType NewBallID, smIdType node, double diameter)
{ {
if ( myIsEmbeddedMode ) if ( myIsEmbeddedMode )
myIsModified = true; myIsModified = true;
@ -301,7 +301,7 @@ void SMESHDS_Script::AddBall(int NewBallID, int node, double diameter)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::MoveNode(int NewNodeID, double x, double y, double z) void SMESHDS_Script::MoveNode(smIdType NewNodeID, double x, double y, double z)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -314,7 +314,7 @@ void SMESHDS_Script::MoveNode(int NewNodeID, double x, double y, double z)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::RemoveNode(int ID) void SMESHDS_Script::RemoveNode(smIdType ID)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -327,7 +327,7 @@ void SMESHDS_Script::RemoveNode(int ID)
//function : //function :
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::RemoveElement(int ElementID) void SMESHDS_Script::RemoveElement(smIdType ElementID)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -341,7 +341,7 @@ void SMESHDS_Script::RemoveElement(int ElementID)
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::ChangeElementNodes(int ElementID, int nodes[], int nbnodes) void SMESHDS_Script::ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -354,8 +354,8 @@ void SMESHDS_Script::ChangeElementNodes(int ElementID, int nodes[], int nbnodes)
//function : ChangePolyhedronNodes //function : ChangePolyhedronNodes
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID, void SMESHDS_Script::ChangePolyhedronNodes (const smIdType ElementID,
const std::vector<int>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<int>& quantities) const std::vector<int>& quantities)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
@ -370,7 +370,7 @@ void SMESHDS_Script::ChangePolyhedronNodes (const int ElementID,
//function : Renumber //function : Renumber
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::Renumber (const bool isNodes, const int startID, const int deltaID) void SMESHDS_Script::Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -424,7 +424,7 @@ const list<SMESHDS_Command*>& SMESHDS_Script::GetCommands()
//function : AddEdge //function : AddEdge
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddEdge(int NewEdgeID, int n1, int n2, int n12) void SMESHDS_Script::AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -437,8 +437,8 @@ void SMESHDS_Script::AddEdge(int NewEdgeID, int n1, int n2, int n12)
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31) smIdType n12, smIdType n23, smIdType n31)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -452,8 +452,8 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3,
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31, int nCenter) smIdType n12, smIdType n23, smIdType n31, smIdType nCenter)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -467,8 +467,8 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3,
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4, void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41) smIdType n12, smIdType n23, smIdType n34, smIdType n41)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -482,8 +482,8 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
//function : AddFace //function : AddFace
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4, void SMESHDS_Script::AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41, int nCenter) smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -497,9 +497,9 @@ void SMESHDS_Script::AddFace(int NewFaceID, int n1, int n2, int n3, int n4,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n14, int n24, int n34) smIdType n14, smIdType n24, smIdType n34)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -514,9 +514,9 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n5, int n12, int n23, int n34, int n41, smIdType n5, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n15, int n25, int n35, int n45) smIdType n15, smIdType n25, smIdType n35, smIdType n45)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -531,10 +531,10 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n5,int n6, int n12, int n23, int n31, smIdType n5,smIdType n6, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36) smIdType n14, smIdType n25, smIdType n36)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -550,11 +550,11 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n5,int n6, int n12, int n23, int n31, smIdType n5,smIdType n6, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36, smIdType n14, smIdType n25, smIdType n36,
int n1245, int n2356, int n1346) smIdType n1245, smIdType n2356, smIdType n1346)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -571,11 +571,11 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, int n4,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, int n7, int n8, smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48) smIdType n15, smIdType n26, smIdType n37, smIdType n48)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;
@ -592,13 +592,13 @@ void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3,
//function : AddVolume //function : AddVolume
//purpose : //purpose :
//======================================================================= //=======================================================================
void SMESHDS_Script::AddVolume(int NewVolID, int n1, int n2, int n3, void SMESHDS_Script::AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, int n7, int n8, smIdType n4, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48, smIdType n15, smIdType n26, smIdType n37, smIdType n48,
int n1234,int n1256,int n2367,int n3478, smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478,
int n1458,int n5678,int nCenter) smIdType n1458,smIdType n5678,smIdType nCenter)
{ {
if(myIsEmbeddedMode){ if(myIsEmbeddedMode){
myIsModified = true; myIsModified = true;

View File

@ -46,12 +46,12 @@ class SMESHDS_EXPORT SMESHDS_Script
void SetModified(bool theModified); void SetModified(bool theModified);
bool IsModified(); bool IsModified();
void AddNode(int NewNodeID, double x, double y, double z); void AddNode(smIdType NewNodeID, double x, double y, double z);
void Add0DElement(int New0DElementID, int idnode); void Add0DElement(smIdType New0DElementID, smIdType idnode);
void AddEdge(int NewEdgeID, int idnode1, int idnode2); void AddEdge(smIdType NewEdgeID, smIdType idnode1, smIdType idnode2);
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3); void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3);
void AddFace(int NewFaceID, int idnode1, int idnode2, int idnode3, void AddFace(smIdType NewFaceID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
int idnode4); smIdType idnode4);
void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
smIdType idnode4); smIdType idnode4);
void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3, void AddVolume(smIdType NewVolID, smIdType idnode1, smIdType idnode2, smIdType idnode3,
@ -70,55 +70,55 @@ class SMESHDS_EXPORT SMESHDS_Script
const std::vector<smIdType>& nodes_ids); const std::vector<smIdType>& nodes_ids);
void AddPolyhedralVolume (const smIdType NewVolID, void AddPolyhedralVolume (const smIdType NewVolID,
const std::vector<smIdType>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<smIdType>& quantities); const std::vector<int>& quantities);
void AddBall(int NewBallID, int node, double diameter); void AddBall(smIdType NewBallID, smIdType node, double diameter);
// special methods for quadratic elements // special methods for quadratic elements
void AddEdge(int NewEdgeID, int n1, int n2, int n12); void AddEdge(smIdType NewEdgeID, smIdType n1, smIdType n2, smIdType n12);
void AddFace(int NewFaceID, int n1, int n2, int n3, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31); smIdType n12, smIdType n23, smIdType n31);
void AddFace(int NewFaceID, int n1, int n2, int n3, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3,
int n12, int n23, int n31, int nCenter); smIdType n12, smIdType n23, smIdType n31, smIdType nCenter);
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41); smIdType n12, smIdType n23, smIdType n34, smIdType n41);
void AddFace(int NewFaceID, int n1, int n2, int n3, int n4, void AddFace(smIdType NewFaceID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n34, int n41, int nCenter); smIdType n12, smIdType n23, smIdType n34, smIdType n41, smIdType nCenter);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n12, int n23, int n31, int n14, int n24, int n34); smIdType n12, smIdType n23, smIdType n31, smIdType n14, smIdType n24, smIdType n34);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, int n5, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4, smIdType n5,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n15, int n25, int n35, int n45); smIdType n15, smIdType n25, smIdType n35, smIdType n45);
void AddVolume(int NewVolID, int n1, int n2, int n3, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, smIdType n4, smIdType n5, smIdType n6,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36); smIdType n14, smIdType n25, smIdType n36);
void AddVolume(int NewVolID, int n1, int n2, int n3, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3,
int n4, int n5, int n6, smIdType n4, smIdType n5, smIdType n6,
int n12, int n23, int n31, smIdType n12, smIdType n23, smIdType n31,
int n45, int n56, int n64, smIdType n45, smIdType n56, smIdType n64,
int n14, int n25, int n36, smIdType n14, smIdType n25, smIdType n36,
int n1245, int n2356, int n1346); smIdType n1245, smIdType n2356, smIdType n1346);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n5, int n6, int n7, int n8, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48); smIdType n15, smIdType n26, smIdType n37, smIdType n48);
void AddVolume(int NewVolID, int n1, int n2, int n3, int n4, void AddVolume(smIdType NewVolID, smIdType n1, smIdType n2, smIdType n3, smIdType n4,
int n5, int n6, int n7, int n8, smIdType n5, smIdType n6, smIdType n7, smIdType n8,
int n12, int n23, int n34, int n41, smIdType n12, smIdType n23, smIdType n34, smIdType n41,
int n56, int n67, int n78, int n85, smIdType n56, smIdType n67, smIdType n78, smIdType n85,
int n15, int n26, int n37, int n48, smIdType n15, smIdType n26, smIdType n37, smIdType n48,
int n1234,int n1256,int n2367,int n3478, smIdType n1234,smIdType n1256,smIdType n2367,smIdType n3478,
int n1458,int n5678,int nCenter); smIdType n1458,smIdType n5678,smIdType nCenter);
void MoveNode(int NewNodeID, double x, double y, double z); void MoveNode(smIdType NewNodeID, double x, double y, double z);
void RemoveNode(int NodeID); void RemoveNode(smIdType NodeID);
void RemoveElement(int ElementID); void RemoveElement(smIdType ElementID);
void ChangeElementNodes(int ElementID, int nodes[], int nbnodes); void ChangeElementNodes(smIdType ElementID, smIdType nodes[], smIdType nbnodes);
void ChangePolyhedronNodes(const int ElementID, void ChangePolyhedronNodes(const smIdType ElementID,
const std::vector<int>& nodes_ids, const std::vector<smIdType>& nodes_ids,
const std::vector<int>& quantities); const std::vector<int>& quantities);
void Renumber (const bool isNodes, const int startID, const int deltaID); void Renumber (const bool isNodes, const smIdType startID, const smIdType deltaID);
void ClearMesh(); void ClearMesh();
void Clear(); void Clear();
const std::list<SMESHDS_Command*> & GetCommands(); const std::list<SMESHDS_Command*> & GetCommands();

View File

@ -1190,7 +1190,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolume (const SMESH::long_array & I
} }
int NbFaces = Quantities.length(); int NbFaces = Quantities.length();
std::vector<smIdType> q (NbFaces); std::vector<int> q (NbFaces);
for (int j = 0; j < NbFaces; j++) for (int j = 0; j < NbFaces; j++)
q[j] = Quantities[j]; q[j] = Quantities[j];
@ -1220,7 +1220,7 @@ CORBA::Long SMESH_MeshEditor_i::AddPolyhedralVolumeByFaces (const SMESH::long_ar
int NbFaces = IdsOfFaces.length(); int NbFaces = IdsOfFaces.length();
std::vector<const SMDS_MeshNode*> poly_nodes; std::vector<const SMDS_MeshNode*> poly_nodes;
std::vector<smIdType> quantities (NbFaces); std::vector<int> quantities (NbFaces);
for (int i = 0; i < NbFaces; i++) { for (int i = 0; i < NbFaces; i++) {
const SMDS_MeshElement* aFace = getMeshDS()->FindElement(IdsOfFaces[i]); const SMDS_MeshElement* aFace = getMeshDS()->FindElement(IdsOfFaces[i]);

View File

@ -3343,9 +3343,9 @@ SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet)
SMESHDS_Command *com = *its; SMESHDS_Command *com = *its;
int comType = com->GetType(); int comType = com->GetType();
int lgcom = com->GetNumber(); int lgcom = com->GetNumber();
const list < int >&intList = com->GetIndexes(); const list < smIdType >&intList = com->GetIndexes();
int inum = intList.size(); int inum = intList.size();
list < int >::const_iterator ii = intList.begin(); list < smIdType >::const_iterator ii = intList.begin();
const list < double >&coordList = com->GetCoords(); const list < double >&coordList = com->GetCoords();
int rnum = coordList.size(); int rnum = coordList.size();
list < double >::const_iterator ir = coordList.begin(); list < double >::const_iterator ir = coordList.begin();

View File

@ -818,7 +818,7 @@ namespace
}; };
vector< _nodeDef > _nodes; vector< _nodeDef > _nodes;
vector< smIdType > _quantities; vector< int > _quantities;
_volumeDef* _next; // to store several _volumeDefs in a chain _volumeDef* _next; // to store several _volumeDefs in a chain
TGeomID _solidID; TGeomID _solidID;
const SMDS_MeshElement* _volume; // new volume const SMDS_MeshElement* _volume; // new volume
@ -5257,7 +5257,7 @@ namespace
if ( loopsJoined ) if ( loopsJoined )
{ {
// set unchanged polygons // set unchanged polygons
std::vector< smIdType > newQuantities; std::vector< int > newQuantities;
std::vector< _volumeDef::_nodeDef > newNodes; std::vector< _volumeDef::_nodeDef > newNodes;
vector< SMESH_Block::TShapeID > newNames; vector< SMESH_Block::TShapeID > newNames;
newQuantities.reserve( volDef->_quantities.size() ); newQuantities.reserve( volDef->_quantities.size() );

View File

@ -63,7 +63,7 @@ namespace
//======================================================================= //=======================================================================
const SMDS_MeshElement* addHexa( std::vector< const SMDS_MeshElement* >& faces, const SMDS_MeshElement* addHexa( std::vector< const SMDS_MeshElement* >& faces,
const std::vector< smIdType > & quantities, const std::vector< int > & quantities,
SMESH_MesherHelper & helper ) SMESH_MesherHelper & helper )
{ {
const SMDS_MeshElement* newHexa = 0; const SMDS_MeshElement* newHexa = 0;
@ -134,7 +134,7 @@ namespace
//======================================================================= //=======================================================================
const SMDS_MeshElement* addTetra( std::vector< const SMDS_MeshElement* >& faces, const SMDS_MeshElement* addTetra( std::vector< const SMDS_MeshElement* >& faces,
const std::vector< smIdType > & quantities, const std::vector< int > & quantities,
SMESH_MesherHelper & helper ) SMESH_MesherHelper & helper )
{ {
const SMDS_MeshElement* newTetra = 0; const SMDS_MeshElement* newTetra = 0;
@ -173,7 +173,7 @@ namespace
//======================================================================= //=======================================================================
const SMDS_MeshElement* addPenta( std::vector< const SMDS_MeshElement* >& faces, const SMDS_MeshElement* addPenta( std::vector< const SMDS_MeshElement* >& faces,
const std::vector< smIdType > & quantities, const std::vector< int > & quantities,
SMESH_MesherHelper & helper ) SMESH_MesherHelper & helper )
{ {
const SMDS_MeshElement* newPenta = 0; const SMDS_MeshElement* newPenta = 0;
@ -232,7 +232,7 @@ namespace
//======================================================================= //=======================================================================
const SMDS_MeshElement* addPyra( std::vector< const SMDS_MeshElement* >& faces, const SMDS_MeshElement* addPyra( std::vector< const SMDS_MeshElement* >& faces,
const std::vector< smIdType > & quantities, const std::vector< int > & quantities,
SMESH_MesherHelper & helper ) SMESH_MesherHelper & helper )
{ {
const SMDS_MeshElement* newPyra = 0; const SMDS_MeshElement* newPyra = 0;
@ -276,7 +276,7 @@ namespace
//======================================================================= //=======================================================================
const SMDS_MeshElement* addHPrism( std::vector< const SMDS_MeshElement* >& faces, const SMDS_MeshElement* addHPrism( std::vector< const SMDS_MeshElement* >& faces,
const std::vector< smIdType > & quantities, const std::vector< int > & quantities,
SMESH_MesherHelper & helper ) SMESH_MesherHelper & helper )
{ {
const SMDS_MeshElement* newHexPrism = 0; const SMDS_MeshElement* newHexPrism = 0;
@ -357,7 +357,7 @@ namespace
//======================================================================= //=======================================================================
const SMDS_MeshElement* addPoly( std::vector< const SMDS_MeshElement* >& faces, const SMDS_MeshElement* addPoly( std::vector< const SMDS_MeshElement* >& faces,
const std::vector< smIdType > & quantities, const std::vector< int > & quantities,
SMESH_MesherHelper & helper ) SMESH_MesherHelper & helper )
{ {
const SMDS_MeshElement* newPoly = 0; const SMDS_MeshElement* newPoly = 0;
@ -508,7 +508,7 @@ bool StdMeshers_PolyhedronPerSolid_3D::Compute(SMESH_Mesh& theMesh,
for ( size_t i = 0; i < faces.size() && !useMediumNodes ; ++i ) for ( size_t i = 0; i < faces.size() && !useMediumNodes ; ++i )
useMediumNodes = faces[ i ]->IsQuadratic(); useMediumNodes = faces[ i ]->IsQuadratic();
std::vector< smIdType > quantities( faces.size() ); std::vector< int > quantities( faces.size() );
std::set< const SMDS_MeshNode* > nodes; std::set< const SMDS_MeshNode* > nodes;
for ( size_t i = 0; i < faces.size(); ++i ) for ( size_t i = 0; i < faces.size(); ++i )
{ {

View File

@ -2329,7 +2329,7 @@ bool StdMeshers_Prism_3D::AddPrisms( vector<const TNodeColumn*> & columns,
break; break;
} }
default: // ---------- polyhedra default: // ---------- polyhedra
vector<smIdType> quantities( 2 + nbNodes, 4 ); vector<int> quantities( 2 + nbNodes, 4 );
quantities[0] = quantities[1] = nbNodes; quantities[0] = quantities[1] = nbNodes;
columns.resize( nbNodes + 1 ); columns.resize( nbNodes + 1 );
columns[ nbNodes ] = columns[ 0 ]; columns[ nbNodes ] = columns[ 0 ];