mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-11 03:34:33 +05:00
fix warnings conversion #3
This commit is contained in:
parent
017ea5b3ea
commit
bd8c0a62a8
@ -463,7 +463,7 @@ module SMESH
|
|||||||
*
|
*
|
||||||
* Can be used to check if the object was created in the same container, as this engine.
|
* Can be used to check if the object was created in the same container, as this engine.
|
||||||
*/
|
*/
|
||||||
long GetObjectId(in Object theObject);
|
smIdType GetObjectId(in Object theObject);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Get version of MED format being used.
|
* \brief Get version of MED format being used.
|
||||||
|
@ -3280,13 +3280,13 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
|
|||||||
theResStr.Clear();
|
theResStr.Clear();
|
||||||
|
|
||||||
TIDsSeq anIntSeq;
|
TIDsSeq anIntSeq;
|
||||||
TColStd_SequenceOfAsciiString aStrSeq;
|
NCollection_Sequence< std::string > aStrSeq;
|
||||||
|
|
||||||
TIDsMap::Iterator anIter( myIds );
|
TIDsMap::Iterator anIter( myIds );
|
||||||
for ( ; anIter.More(); anIter.Next() )
|
for ( ; anIter.More(); anIter.Next() )
|
||||||
{
|
{
|
||||||
smIdType anId = anIter.Key();
|
smIdType anId = anIter.Key();
|
||||||
TCollection_AsciiString aStr( FromIdType<int>(anId) );
|
SMESH_Comment aStr( anId );
|
||||||
anIntSeq.Append( anId );
|
anIntSeq.Append( anId );
|
||||||
aStrSeq.Append( aStr );
|
aStrSeq.Append( aStr );
|
||||||
}
|
}
|
||||||
@ -3336,13 +3336,14 @@ void RangeOfIds::GetRangeStr( TCollection_AsciiString& theResStr )
|
|||||||
|
|
||||||
if ( aStrSeq.Length() == 0 )
|
if ( aStrSeq.Length() == 0 )
|
||||||
return;
|
return;
|
||||||
|
std::string aResStr;
|
||||||
theResStr = aStrSeq( 1 );
|
aResStr = aStrSeq( 1 );
|
||||||
for ( int j = 2, k = aStrSeq.Length(); j <= k; j++ )
|
for ( int j = 2, k = aStrSeq.Length(); j <= k; j++ )
|
||||||
{
|
{
|
||||||
theResStr += ",";
|
aResStr += ",";
|
||||||
theResStr += aStrSeq( j );
|
aResStr += aStrSeq( j );
|
||||||
}
|
}
|
||||||
|
theResStr = aResStr.c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -57,8 +57,8 @@ extern "C"
|
|||||||
elemIt = elementIterator( SMDSGeom ); \
|
elemIt = elementIterator( SMDSGeom ); \
|
||||||
if ( elemIt->more() ) \
|
if ( elemIt->more() ) \
|
||||||
{ \
|
{ \
|
||||||
int totalNbElems = myMesh->GetMeshInfo().NbElements( SMDSGeom ); \
|
smIdType totalNbElems = myMesh->GetMeshInfo().NbElements( SMDSGeom );\
|
||||||
int nbLinearElems = myMesh->GetMeshInfo().NbElements( LinType ); \
|
smIdType nbLinearElems = myMesh->GetMeshInfo().NbElements( LinType ); \
|
||||||
if ( totalNbElems - nbLinearElems > 0 ) \
|
if ( totalNbElems - nbLinearElems > 0 ) \
|
||||||
{ \
|
{ \
|
||||||
GmfSetKwd(meshID, GmfKwd, totalNbElems - nbLinearElems); \
|
GmfSetKwd(meshID, GmfKwd, totalNbElems - nbLinearElems); \
|
||||||
@ -115,7 +115,7 @@ Driver_Mesh::Status DriverGMF_Write::Perform()
|
|||||||
|
|
||||||
// nodes
|
// nodes
|
||||||
std::map< const SMDS_MeshNode* , int > node2IdMap;
|
std::map< const SMDS_MeshNode* , int > node2IdMap;
|
||||||
int iN = 0, nbNodes = myMesh->NbNodes();
|
smIdType iN = 0, nbNodes = myMesh->NbNodes();
|
||||||
GmfSetKwd( meshID, GmfVertices, nbNodes );
|
GmfSetKwd( meshID, GmfVertices, nbNodes );
|
||||||
double xyz[3];
|
double xyz[3];
|
||||||
SMDS_NodeIteratorPtr nodeIt = myMesh->nodesIterator();
|
SMDS_NodeIteratorPtr nodeIt = myMesh->nodesIterator();
|
||||||
|
@ -1035,7 +1035,7 @@ void SMESH_ActorDef::SetControlMode( eControl theMode, bool theCheckEntityMode )
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int aNbCells = myFunctor ? myVisualObj->GetNbEntities( myFunctor->GetType() ) : 0;
|
smIdType aNbCells = myFunctor ? myVisualObj->GetNbEntities( myFunctor->GetType() ) : 0;
|
||||||
bool aShowOnlyScalarBarTitle = false;
|
bool aShowOnlyScalarBarTitle = false;
|
||||||
if(aNbCells) {
|
if(aNbCells) {
|
||||||
//myControlMode = theMode;
|
//myControlMode = theMode;
|
||||||
@ -1664,11 +1664,11 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode)
|
|||||||
|
|
||||||
void SMESH_ActorDef::SetRepresentation (int theMode)
|
void SMESH_ActorDef::SetRepresentation (int theMode)
|
||||||
{
|
{
|
||||||
int aNbEdges = myVisualObj->GetNbEntities(SMDSAbs_Edge);
|
smIdType aNbEdges = myVisualObj->GetNbEntities(SMDSAbs_Edge);
|
||||||
int aNbFaces = myVisualObj->GetNbEntities(SMDSAbs_Face);
|
smIdType aNbFaces = myVisualObj->GetNbEntities(SMDSAbs_Face);
|
||||||
int aNbVolumes = myVisualObj->GetNbEntities(SMDSAbs_Volume);
|
smIdType aNbVolumes = myVisualObj->GetNbEntities(SMDSAbs_Volume);
|
||||||
int aNb0Ds = myVisualObj->GetNbEntities(SMDSAbs_0DElement);
|
smIdType aNb0Ds = myVisualObj->GetNbEntities(SMDSAbs_0DElement);
|
||||||
int aNbBalls = myVisualObj->GetNbEntities(SMDSAbs_Ball);
|
smIdType aNbBalls = myVisualObj->GetNbEntities(SMDSAbs_Ball);
|
||||||
|
|
||||||
if ( myRepresentationCache && aNbEdges + aNbFaces + aNbVolumes + aNb0Ds + aNbBalls )
|
if ( myRepresentationCache && aNbEdges + aNbFaces + aNbVolumes + aNb0Ds + aNbBalls )
|
||||||
{
|
{
|
||||||
|
@ -604,7 +604,7 @@ SMESH_DeviceActor
|
|||||||
( aPredicate = dynamic_cast<CoincidentNodes*>(theFunctor.get())))
|
( aPredicate = dynamic_cast<CoincidentNodes*>(theFunctor.get())))
|
||||||
{
|
{
|
||||||
myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
|
myExtractUnstructuredGrid->SetModeOfChanging(VTKViewer_ExtractUnstructuredGrid::eAdding);
|
||||||
vtkIdType aNbNodes = myVisualObj->GetNbEntities(SMDSAbs_Node);
|
vtkIdType aNbNodes = FromIdType<vtkIdType>(myVisualObj->GetNbEntities(SMDSAbs_Node));
|
||||||
for( vtkIdType i = 0; i < aNbNodes; i++ ){
|
for( vtkIdType i = 0; i < aNbNodes; i++ ){
|
||||||
vtkIdType anObjId = myVisualObj->GetNodeObjId(i);
|
vtkIdType anObjId = myVisualObj->GetNodeObjId(i);
|
||||||
if(aPredicate->IsSatisfy(anObjId))
|
if(aPredicate->IsSatisfy(anObjId))
|
||||||
|
@ -103,7 +103,7 @@ SMESH_VisualObjDef::~SMESH_VisualObjDef()
|
|||||||
// functions : GetNodeObjId, GetNodeVTKId, GetElemObjId, GetElemVTKId
|
// functions : GetNodeObjId, GetNodeVTKId, GetElemObjId, GetElemVTKId
|
||||||
// purpose : Methods for retrieving VTK IDs by SMDS IDs and vice versa
|
// purpose : Methods for retrieving VTK IDs by SMDS IDs and vice versa
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
vtkIdType SMESH_VisualObjDef::GetNodeObjId( int theVTKID )
|
vtkIdType SMESH_VisualObjDef::GetNodeObjId( vtkIdType theVTKID )
|
||||||
{
|
{
|
||||||
if (myLocalGrid)
|
if (myLocalGrid)
|
||||||
{
|
{
|
||||||
@ -114,10 +114,10 @@ vtkIdType SMESH_VisualObjDef::GetNodeObjId( int theVTKID )
|
|||||||
if( this->GetMesh() )
|
if( this->GetMesh() )
|
||||||
aNode = this->GetMesh()->FindNodeVtk( theVTKID );
|
aNode = this->GetMesh()->FindNodeVtk( theVTKID );
|
||||||
|
|
||||||
return aNode ? aNode->GetID() : -1;
|
return aNode ? FromIdType<vtkIdType>(aNode->GetID()) : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESH_VisualObjDef::GetNodeVTKId( int theObjID )
|
vtkIdType SMESH_VisualObjDef::GetNodeVTKId( vtkIdType theObjID )
|
||||||
{
|
{
|
||||||
if (myLocalGrid)
|
if (myLocalGrid)
|
||||||
{
|
{
|
||||||
@ -132,17 +132,17 @@ vtkIdType SMESH_VisualObjDef::GetNodeVTKId( int theObjID )
|
|||||||
return aNode ? aNode->GetVtkID() : -1;
|
return aNode ? aNode->GetVtkID() : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESH_VisualObjDef::GetElemObjId( int theVTKID )
|
vtkIdType SMESH_VisualObjDef::GetElemObjId( vtkIdType theVTKID )
|
||||||
{
|
{
|
||||||
if (myLocalGrid)
|
if (myLocalGrid)
|
||||||
{
|
{
|
||||||
TMapOfIds::const_iterator i = myVTK2SMDSElems.find(theVTKID);
|
TMapOfIds::const_iterator i = myVTK2SMDSElems.find(theVTKID);
|
||||||
return i == myVTK2SMDSElems.end() ? -1 : i->second;
|
return i == myVTK2SMDSElems.end() ? -1 : i->second;
|
||||||
}
|
}
|
||||||
return this->GetMesh()->FromVtkToSmds(theVTKID);
|
return FromIdType<vtkIdType>(this->GetMesh()->FromVtkToSmds(theVTKID));
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESH_VisualObjDef::GetElemVTKId( int theObjID )
|
vtkIdType SMESH_VisualObjDef::GetElemVTKId( vtkIdType theObjID )
|
||||||
{
|
{
|
||||||
if (myLocalGrid)
|
if (myLocalGrid)
|
||||||
{
|
{
|
||||||
@ -171,7 +171,7 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
TEntityList aNodes;
|
TEntityList aNodes;
|
||||||
vtkIdType nbNodes = GetEntities( SMDSAbs_Node, aNodes );
|
vtkIdType nbNodes = FromIdType<vtkIdType>(GetEntities( SMDSAbs_Node, aNodes ));
|
||||||
thePoints->SetNumberOfPoints( nbNodes );
|
thePoints->SetNumberOfPoints( nbNodes );
|
||||||
|
|
||||||
int nbPoints = 0;
|
int nbPoints = 0;
|
||||||
@ -183,7 +183,7 @@ void SMESH_VisualObjDef::createPoints( vtkPoints* thePoints )
|
|||||||
if ( aNode != 0 )
|
if ( aNode != 0 )
|
||||||
{
|
{
|
||||||
thePoints->SetPoint( nbPoints, aNode->X(), aNode->Y(), aNode->Z() );
|
thePoints->SetPoint( nbPoints, aNode->X(), aNode->Y(), aNode->Z() );
|
||||||
int anId = aNode->GetID();
|
smIdType anId = aNode->GetID();
|
||||||
mySMDS2VTKNodes.insert( mySMDS2VTKNodes.end(), std::make_pair( anId, nbPoints ));
|
mySMDS2VTKNodes.insert( mySMDS2VTKNodes.end(), std::make_pair( anId, nbPoints ));
|
||||||
myVTK2SMDSNodes.insert( myVTK2SMDSNodes.end(), std::make_pair( nbPoints, anId ));
|
myVTK2SMDSNodes.insert( myVTK2SMDSNodes.end(), std::make_pair( nbPoints, anId ));
|
||||||
nbPoints++;
|
nbPoints++;
|
||||||
@ -292,7 +292,7 @@ namespace{
|
|||||||
const SMESH_VisualObjDef::TMapOfIds& theSMDS2VTKNodes,
|
const SMESH_VisualObjDef::TMapOfIds& theSMDS2VTKNodes,
|
||||||
const TConnect& theConnect,
|
const TConnect& theConnect,
|
||||||
int thePosition,
|
int thePosition,
|
||||||
int theId)
|
vtkIdType theId)
|
||||||
{
|
{
|
||||||
theIdList->SetId(thePosition,theSMDS2VTKNodes.find(theConnect[theId]->GetID())->second);
|
theIdList->SetId(thePosition,theSMDS2VTKNodes.find(theConnect[theId]->GetID())->second);
|
||||||
}
|
}
|
||||||
@ -319,7 +319,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
{ SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, SMDSAbs_Ball, SMDSAbs_0DElement };
|
{ SMDSAbs_Edge, SMDSAbs_Face, SMDSAbs_Volume, SMDSAbs_Ball, SMDSAbs_0DElement };
|
||||||
|
|
||||||
// get entity data
|
// get entity data
|
||||||
map<SMDSAbs_ElementType,int> nbEnts;
|
map<SMDSAbs_ElementType,smIdType> nbEnts;
|
||||||
map<SMDSAbs_ElementType,TEntityList> anEnts;
|
map<SMDSAbs_ElementType,TEntityList> anEnts;
|
||||||
|
|
||||||
vtkIdType aNbCells = 0;
|
vtkIdType aNbCells = 0;
|
||||||
@ -406,7 +406,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
anIdList->SetNumberOfIds( aNbNodes );
|
anIdList->SetNumberOfIds( aNbNodes );
|
||||||
const vtkIdType vtkElemType = SMDS_MeshCell::toVtkType( anElem->GetEntityType() );
|
const vtkIdType vtkElemType = SMDS_MeshCell::toVtkType( anElem->GetEntityType() );
|
||||||
|
|
||||||
int anId = anElem->GetID();
|
smIdType anId = anElem->GetID();
|
||||||
|
|
||||||
mySMDS2VTKElems.insert( mySMDS2VTKElems.end(), std::make_pair( anId, iElem ));
|
mySMDS2VTKElems.insert( mySMDS2VTKElems.end(), std::make_pair( anId, iElem ));
|
||||||
myVTK2SMDSElems.insert( myVTK2SMDSElems.end(), std::make_pair( iElem, anId ));
|
myVTK2SMDSElems.insert( myVTK2SMDSElems.end(), std::make_pair( iElem, anId ));
|
||||||
@ -424,7 +424,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
anIdList->InsertNextId(ph->NbFaceNodes(i));
|
anIdList->InsertNextId(ph->NbFaceNodes(i));
|
||||||
for(int j = 1; j <= ph->NbFaceNodes(i); j++) {
|
for(int j = 1; j <= ph->NbFaceNodes(i); j++) {
|
||||||
if ( const SMDS_MeshNode* n = ph->GetFaceNode( i, j ))
|
if ( const SMDS_MeshNode* n = ph->GetFaceNode( i, j ))
|
||||||
anIdList->InsertNextId( mySMDS2VTKNodes[ n->GetID() ]);
|
anIdList->InsertNextId( mySMDS2VTKNodes[ FromIdType<vtkIdType>(n->GetID()) ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -441,7 +441,7 @@ void SMESH_VisualObjDef::buildElemPrs()
|
|||||||
else {
|
else {
|
||||||
for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
|
for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
|
||||||
const SMDS_MeshElement* aNode = aNodesIter->next();
|
const SMDS_MeshElement* aNode = aNodesIter->next();
|
||||||
anIdList->SetId( aNodeId, mySMDS2VTKNodes[aNode->GetID()] );
|
anIdList->SetId( aNodeId, mySMDS2VTKNodes[FromIdType<vtkIdType>(aNode->GetID())] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -908,7 +908,7 @@ SMDSAbs_ElementType SMESH_GroupObj::GetElementType() const
|
|||||||
// function : getNodesFromElems
|
// function : getNodesFromElems
|
||||||
// purpose : Retrieve nodes from elements
|
// purpose : Retrieve nodes from elements
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
static int getNodesFromElems( SMESH::smIdType_array_var& theElemIds,
|
static int getNodesFromElems( SMESH::smIdType_array_var& theElemIds,
|
||||||
const SMDS_Mesh* theMesh,
|
const SMDS_Mesh* theMesh,
|
||||||
std::list<const SMDS_MeshElement*>& theResList )
|
std::list<const SMDS_MeshElement*>& theResList )
|
||||||
{
|
{
|
||||||
|
@ -1038,9 +1038,9 @@ void SMESH_Algo::addBadInputElements(const SMESHDS_SubMesh* sm,
|
|||||||
*/
|
*/
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
|
|
||||||
int SMESH_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W)
|
smIdType SMESH_Algo::NumberOfPoints(SMESH_Mesh& aMesh, const TopoDS_Wire& W)
|
||||||
{
|
{
|
||||||
int nbPoints = 0;
|
smIdType nbPoints = 0;
|
||||||
for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) {
|
for (TopExp_Explorer exp(W,TopAbs_EDGE); exp.More(); exp.Next()) {
|
||||||
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
|
const TopoDS_Edge& E = TopoDS::Edge(exp.Current());
|
||||||
smIdType nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
|
smIdType nb = aMesh.GetSubMesh(E)->GetSubMeshDS()->NbNodes();
|
||||||
|
@ -339,7 +339,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
static double EdgeLength(const TopoDS_Edge & E);
|
static double EdgeLength(const TopoDS_Edge & E);
|
||||||
|
|
||||||
int NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
|
smIdType NumberOfPoints(SMESH_Mesh& aMesh,const TopoDS_Wire& W);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return continuity of two edges
|
* \brief Return continuity of two edges
|
||||||
|
@ -2215,8 +2215,8 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
|||||||
save << ++clause << ") Total number of " << orderStr << " edges:\t" << NbEdges(order) << endl;
|
save << ++clause << ") Total number of " << orderStr << " edges:\t" << NbEdges(order) << endl;
|
||||||
save << ++clause << ") Total number of " << orderStr << " faces:\t" << NbFaces(order) << endl;
|
save << ++clause << ") Total number of " << orderStr << " faces:\t" << NbFaces(order) << endl;
|
||||||
if ( NbFaces(order) > 0 ) {
|
if ( NbFaces(order) > 0 ) {
|
||||||
int nb3 = NbTriangles(order);
|
smIdType nb3 = NbTriangles(order);
|
||||||
int nb4 = NbQuadrangles(order);
|
smIdType nb4 = NbQuadrangles(order);
|
||||||
save << clause << ".1) Number of " << orderStr << " triangles: \t" << nb3 << endl;
|
save << clause << ".1) Number of " << orderStr << " triangles: \t" << nb3 << endl;
|
||||||
save << clause << ".2) Number of " << orderStr << " quadrangles:\t" << nb4 << endl;
|
save << clause << ".2) Number of " << orderStr << " quadrangles:\t" << nb4 << endl;
|
||||||
if ( nb3 + nb4 != NbFaces(order) ) {
|
if ( nb3 + nb4 != NbFaces(order) ) {
|
||||||
@ -2236,10 +2236,10 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
|||||||
}
|
}
|
||||||
save << ++clause << ") Total number of " << orderStr << " volumes:\t" << NbVolumes(order) << endl;
|
save << ++clause << ") Total number of " << orderStr << " volumes:\t" << NbVolumes(order) << endl;
|
||||||
if ( NbVolumes(order) > 0 ) {
|
if ( NbVolumes(order) > 0 ) {
|
||||||
int nb8 = NbHexas(order);
|
smIdType nb8 = NbHexas(order);
|
||||||
int nb4 = NbTetras(order);
|
smIdType nb4 = NbTetras(order);
|
||||||
int nb5 = NbPyramids(order);
|
smIdType nb5 = NbPyramids(order);
|
||||||
int nb6 = NbPrisms(order);
|
smIdType nb6 = NbPrisms(order);
|
||||||
save << clause << ".1) Number of " << orderStr << " hexahedrons: \t" << nb8 << endl;
|
save << clause << ".1) Number of " << orderStr << " hexahedrons: \t" << nb8 << endl;
|
||||||
save << clause << ".2) Number of " << orderStr << " tetrahedrons:\t" << nb4 << endl;
|
save << clause << ".2) Number of " << orderStr << " tetrahedrons:\t" << nb4 << endl;
|
||||||
save << clause << ".3) Number of " << orderStr << " prisms: \t" << nb6 << endl;
|
save << clause << ".3) Number of " << orderStr << " prisms: \t" << nb6 << endl;
|
||||||
@ -2270,7 +2270,7 @@ ostream& SMESH_Mesh::Dump(ostream& save)
|
|||||||
//purpose : Returns type of mesh element with certain id
|
//purpose : Returns type of mesh element with certain id
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
SMDSAbs_ElementType SMESH_Mesh::GetElementType( const int id, const bool iselem )
|
SMDSAbs_ElementType SMESH_Mesh::GetElementType( const smIdType id, const bool iselem )
|
||||||
{
|
{
|
||||||
return _myMeshDS->GetElementType( id, iselem );
|
return _myMeshDS->GetElementType( id, iselem );
|
||||||
}
|
}
|
||||||
|
@ -345,7 +345,7 @@ class SMESH_EXPORT SMESH_Mesh
|
|||||||
bool SynchronizeGroups();
|
bool SynchronizeGroups();
|
||||||
|
|
||||||
|
|
||||||
SMDSAbs_ElementType GetElementType( const int id, const bool iselem );
|
SMDSAbs_ElementType GetElementType( const smIdType id, const bool iselem );
|
||||||
|
|
||||||
void ClearMeshOrder();
|
void ClearMeshOrder();
|
||||||
void SetMeshOrder(const TListOfListOfInt& theOrder );
|
void SetMeshOrder(const TListOfListOfInt& theOrder );
|
||||||
|
@ -1924,7 +1924,7 @@ const SMDS_MeshNode* SMESH_MesherHelper::getMediumNodeOnComposedWire(const SMDS_
|
|||||||
//purpose : Creates a node
|
//purpose : Creates a node
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
SMDS_MeshNode* SMESH_MesherHelper::AddNode(double x, double y, double z, int ID,
|
SMDS_MeshNode* SMESH_MesherHelper::AddNode(double x, double y, double z, smIdType ID,
|
||||||
double u, double v)
|
double u, double v)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -1953,7 +1953,7 @@ SMDS_MeshNode* SMESH_MesherHelper::AddNode(double x, double y, double z, int ID,
|
|||||||
|
|
||||||
SMDS_MeshEdge* SMESH_MesherHelper::AddEdge(const SMDS_MeshNode* n1,
|
SMDS_MeshEdge* SMESH_MesherHelper::AddEdge(const SMDS_MeshNode* n1,
|
||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -1987,7 +1987,7 @@ SMDS_MeshEdge* SMESH_MesherHelper::AddEdge(const SMDS_MeshNode* n1,
|
|||||||
SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
|
SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
|
||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -2037,7 +2037,7 @@ SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
|
|||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -2101,7 +2101,7 @@ SMDS_MeshFace* SMESH_MesherHelper::AddFace(const SMDS_MeshNode* n1,
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
SMDS_MeshFace* SMESH_MesherHelper::AddPolygonalFace (const vector<const SMDS_MeshNode*>& nodes,
|
SMDS_MeshFace* SMESH_MesherHelper::AddPolygonalFace (const vector<const SMDS_MeshNode*>& nodes,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -2147,7 +2147,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
|
|||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const SMDS_MeshNode* n5,
|
const SMDS_MeshNode* n5,
|
||||||
const SMDS_MeshNode* n6,
|
const SMDS_MeshNode* n6,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -2210,7 +2210,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
|
|||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -2251,7 +2251,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
|
|||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const SMDS_MeshNode* n5,
|
const SMDS_MeshNode* n5,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMDS_MeshVolume* elem = 0;
|
SMDS_MeshVolume* elem = 0;
|
||||||
@ -2301,7 +2301,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
|
|||||||
const SMDS_MeshNode* n6,
|
const SMDS_MeshNode* n6,
|
||||||
const SMDS_MeshNode* n7,
|
const SMDS_MeshNode* n7,
|
||||||
const SMDS_MeshNode* n8,
|
const SMDS_MeshNode* n8,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -2420,7 +2420,7 @@ SMDS_MeshVolume* SMESH_MesherHelper::AddVolume(const SMDS_MeshNode* n1,
|
|||||||
const SMDS_MeshNode* n10,
|
const SMDS_MeshNode* n10,
|
||||||
const SMDS_MeshNode* n11,
|
const SMDS_MeshNode* n11,
|
||||||
const SMDS_MeshNode* n12,
|
const SMDS_MeshNode* n12,
|
||||||
const int id,
|
const smIdType id,
|
||||||
bool /*force3d*/)
|
bool /*force3d*/)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -2442,7 +2442,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<int>& quantities,
|
const std::vector<int>& quantities,
|
||||||
const int id,
|
const smIdType id,
|
||||||
const bool force3d)
|
const bool force3d)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh * meshDS = GetMeshDS();
|
SMESHDS_Mesh * meshDS = GetMeshDS();
|
||||||
@ -3413,9 +3413,9 @@ TopoDS_Shape SMESH_MesherHelper::GetShapeOfHypothesis( const SMESHDS_Hypothesis
|
|||||||
|
|
||||||
SMESH_MesherHelper:: MType SMESH_MesherHelper::IsQuadraticMesh()
|
SMESH_MesherHelper:: MType SMESH_MesherHelper::IsQuadraticMesh()
|
||||||
{
|
{
|
||||||
int NbAllEdgsAndFaces=0;
|
smIdType NbAllEdgsAndFaces=0;
|
||||||
int NbQuadFacesAndEdgs=0;
|
smIdType NbQuadFacesAndEdgs=0;
|
||||||
int NbFacesAndEdges=0;
|
smIdType NbFacesAndEdges=0;
|
||||||
//All faces and edges
|
//All faces and edges
|
||||||
NbAllEdgsAndFaces = myMesh->NbEdges() + myMesh->NbFaces();
|
NbAllEdgsAndFaces = myMesh->NbEdges() + myMesh->NbFaces();
|
||||||
if ( NbAllEdgsAndFaces == 0 )
|
if ( NbAllEdgsAndFaces == 0 )
|
||||||
|
@ -343,13 +343,13 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* Creates a node (!Note ID before u=0.,v0.)
|
* Creates a node (!Note ID before u=0.,v0.)
|
||||||
*/
|
*/
|
||||||
SMDS_MeshNode* AddNode(double x, double y, double z, int ID = 0, double u=0., double v=0.);
|
SMDS_MeshNode* AddNode(double x, double y, double z, smIdType ID = 0, double u=0., double v=0.);
|
||||||
/*!
|
/*!
|
||||||
* Creates quadratic or linear edge
|
* Creates quadratic or linear edge
|
||||||
*/
|
*/
|
||||||
SMDS_MeshEdge* AddEdge(const SMDS_MeshNode* n1,
|
SMDS_MeshEdge* AddEdge(const SMDS_MeshNode* n1,
|
||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
const bool force3d = true);
|
const bool force3d = true);
|
||||||
/*!
|
/*!
|
||||||
* Creates quadratic or linear triangle
|
* Creates quadratic or linear triangle
|
||||||
@ -357,7 +357,7 @@ public:
|
|||||||
SMDS_MeshFace* AddFace(const SMDS_MeshNode* n1,
|
SMDS_MeshFace* AddFace(const SMDS_MeshNode* n1,
|
||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const int id=0,
|
const smIdType id=0,
|
||||||
const bool force3d = false);
|
const bool force3d = false);
|
||||||
/*!
|
/*!
|
||||||
* Creates bi-quadratic, quadratic or linear quadrangle
|
* Creates bi-quadratic, quadratic or linear quadrangle
|
||||||
@ -366,13 +366,13 @@ public:
|
|||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
const bool force3d = false);
|
const bool force3d = false);
|
||||||
/*!
|
/*!
|
||||||
* Creates polygon, with additional nodes in quadratic mesh
|
* Creates polygon, with additional nodes in quadratic mesh
|
||||||
*/
|
*/
|
||||||
SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*>& nodes,
|
SMDS_MeshFace* AddPolygonalFace (const std::vector<const SMDS_MeshNode*>& nodes,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
const bool force3d = false);
|
const bool force3d = false);
|
||||||
/*!
|
/*!
|
||||||
* Creates quadratic or linear tetrahedron
|
* Creates quadratic or linear tetrahedron
|
||||||
@ -381,7 +381,7 @@ public:
|
|||||||
const SMDS_MeshNode* n2,
|
const SMDS_MeshNode* n2,
|
||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
const bool force3d = true);
|
const bool force3d = true);
|
||||||
/*!
|
/*!
|
||||||
* Creates quadratic or linear pyramid
|
* Creates quadratic or linear pyramid
|
||||||
@ -391,7 +391,7 @@ public:
|
|||||||
const SMDS_MeshNode* n3,
|
const SMDS_MeshNode* n3,
|
||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const SMDS_MeshNode* n5,
|
const SMDS_MeshNode* n5,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
const bool force3d = true);
|
const bool force3d = true);
|
||||||
/*!
|
/*!
|
||||||
* Creates quadratic or linear pentahedron
|
* Creates quadratic or linear pentahedron
|
||||||
@ -402,7 +402,7 @@ public:
|
|||||||
const SMDS_MeshNode* n4,
|
const SMDS_MeshNode* n4,
|
||||||
const SMDS_MeshNode* n5,
|
const SMDS_MeshNode* n5,
|
||||||
const SMDS_MeshNode* n6,
|
const SMDS_MeshNode* n6,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
const bool force3d = true);
|
const bool force3d = true);
|
||||||
/*!
|
/*!
|
||||||
* Creates bi-quadratic, quadratic or linear hexahedron
|
* Creates bi-quadratic, quadratic or linear hexahedron
|
||||||
@ -415,7 +415,7 @@ public:
|
|||||||
const SMDS_MeshNode* n6,
|
const SMDS_MeshNode* n6,
|
||||||
const SMDS_MeshNode* n7,
|
const SMDS_MeshNode* n7,
|
||||||
const SMDS_MeshNode* n8,
|
const SMDS_MeshNode* n8,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
bool force3d = true);
|
bool force3d = true);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -433,7 +433,7 @@ public:
|
|||||||
const SMDS_MeshNode* n10,
|
const SMDS_MeshNode* n10,
|
||||||
const SMDS_MeshNode* n11,
|
const SMDS_MeshNode* n11,
|
||||||
const SMDS_MeshNode* n12,
|
const SMDS_MeshNode* n12,
|
||||||
const int id = 0,
|
const smIdType id = 0,
|
||||||
bool force3d = true);
|
bool force3d = true);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -441,7 +441,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
SMDS_MeshVolume* AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>& nodes,
|
SMDS_MeshVolume* AddPolyhedralVolume (const std::vector<const SMDS_MeshNode*>& nodes,
|
||||||
const std::vector<int>& quantities,
|
const std::vector<int>& quantities,
|
||||||
const int ID=0,
|
const smIdType ID=0,
|
||||||
const bool force3d = true);
|
const bool force3d = true);
|
||||||
/*!
|
/*!
|
||||||
* \brief Enables fixing node parameters on EDGEs and FACEs by
|
* \brief Enables fixing node parameters on EDGEs and FACEs by
|
||||||
|
@ -3231,7 +3231,7 @@ bool SMESH_Pattern::Load (SMESH_Mesh* theMesh,
|
|||||||
return setErrorCode( ERR_LOADV_BAD_SHAPE );
|
return setErrorCode( ERR_LOADV_BAD_SHAPE );
|
||||||
|
|
||||||
// count nodes
|
// count nodes
|
||||||
smIdType nbNodes = 0, shapeID;
|
smIdType nbNodes = 0; int shapeID;
|
||||||
for ( shapeID = 1; shapeID <= myShapeIDMap.Extent(); shapeID++ )
|
for ( shapeID = 1; shapeID <= myShapeIDMap.Extent(); shapeID++ )
|
||||||
{
|
{
|
||||||
const TopoDS_Shape& S = myShapeIDMap( shapeID );
|
const TopoDS_Shape& S = myShapeIDMap( shapeID );
|
||||||
|
@ -89,14 +89,14 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddNodesWithID(SMDS_Mesh* theMesh,
|
inline void AddNodesWithID(SMDS_Mesh* theMesh,
|
||||||
SMESH::log_array_var& theSeq,
|
SMESH::log_array_var& theSeq,
|
||||||
CORBA::Long theId)
|
SMESH::smIdType theId)
|
||||||
{
|
{
|
||||||
const SMESH::double_array& aCoords = theSeq[theId].coords;
|
const SMESH::double_array& aCoords = theSeq[theId].coords;
|
||||||
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(3*aNbElems != (CORBA::Long) aCoords.length())
|
if(3*aNbElems != (SMESH::smIdType) aCoords.length())
|
||||||
EXCEPTION(runtime_error,"AddNodesWithID - 3*aNbElems != aCoords.length()");
|
EXCEPTION(runtime_error,"AddNodesWithID - 3*aNbElems != aCoords.length()");
|
||||||
for(CORBA::Long aCoordId = 0; anElemId < aNbElems; anElemId++, aCoordId+=3){
|
for(SMESH::smIdType aCoordId = 0; anElemId < aNbElems; anElemId++, aCoordId+=3){
|
||||||
SMDS_MeshElement* anElem = theMesh->AddNodeWithID(aCoords[aCoordId],
|
SMDS_MeshElement* anElem = theMesh->AddNodeWithID(aCoords[aCoordId],
|
||||||
aCoords[aCoordId+1],
|
aCoords[aCoordId+1],
|
||||||
aCoords[aCoordId+2],
|
aCoords[aCoordId+2],
|
||||||
@ -112,13 +112,13 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void Add0DElementsWithID(SMDS_Mesh* theMesh,
|
inline void Add0DElementsWithID(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 (2*aNbElems != (CORBA::Long) anIndexes.length())
|
if (2*aNbElems != (SMESH::smIdType) anIndexes.length())
|
||||||
EXCEPTION(runtime_error,"AddEdgeWithID - 2*aNbElems != aCoords.length()");
|
EXCEPTION(runtime_error,"AddEdgeWithID - 2*aNbElems != aCoords.length()");
|
||||||
CORBA::Long anIndexId = 0;
|
SMESH::smIdType anIndexId = 0;
|
||||||
for (; anElemId < aNbElems; anElemId++, anIndexId+=2)
|
for (; anElemId < aNbElems; anElemId++, anIndexId+=2)
|
||||||
{
|
{
|
||||||
SMDS_MeshElement* anElem = theMesh->Add0DElementWithID(anIndexes[anIndexId+1],
|
SMDS_MeshElement* anElem = theMesh->Add0DElementWithID(anIndexes[anIndexId+1],
|
||||||
@ -134,16 +134,16 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddBallsWithID(SMDS_Mesh* theMesh,
|
inline void AddBallsWithID(SMDS_Mesh* theMesh,
|
||||||
SMESH::log_array_var& theSeq,
|
SMESH::log_array_var& theSeq,
|
||||||
CORBA::Long theId)
|
SMESH::smIdType theId)
|
||||||
{
|
{
|
||||||
const SMESH::double_array& aDiameter = theSeq[theId].coords;
|
const SMESH::double_array& aDiameter = theSeq[theId].coords;
|
||||||
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 (2*aNbElems != (CORBA::Long) anIndexes.length() )
|
if (2*aNbElems != (SMESH::smIdType) anIndexes.length() )
|
||||||
EXCEPTION(runtime_error,"AddEdgeWithID - 2*aNbElems != anIndexes.length()");
|
EXCEPTION(runtime_error,"AddEdgeWithID - 2*aNbElems != anIndexes.length()");
|
||||||
if (aNbElems != (CORBA::Long) aDiameter.length())
|
if (aNbElems != (SMESH::smIdType) aDiameter.length())
|
||||||
EXCEPTION(runtime_error,"AddEdgeWithID - aNbElems != aDiameter.length()");
|
EXCEPTION(runtime_error,"AddEdgeWithID - aNbElems != aDiameter.length()");
|
||||||
CORBA::Long anIndexId = 0;
|
SMESH::smIdType anIndexId = 0;
|
||||||
for (; anElemId < aNbElems; anElemId++, anIndexId+=2)
|
for (; anElemId < aNbElems; anElemId++, anIndexId+=2)
|
||||||
{
|
{
|
||||||
SMDS_MeshElement* anElem = theMesh->AddBallWithID(anIndexes[anIndexId+1],
|
SMDS_MeshElement* anElem = theMesh->AddBallWithID(anIndexes[anIndexId+1],
|
||||||
@ -160,13 +160,13 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddEdgesWithID(SMDS_Mesh* theMesh,
|
inline void AddEdgesWithID(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(3*aNbElems != (CORBA::Long) anIndexes.length())
|
if(3*aNbElems != (SMESH::smIdType) anIndexes.length())
|
||||||
EXCEPTION(runtime_error,"AddEdgeWithID - 3*aNbElems != aCoords.length()");
|
EXCEPTION(runtime_error,"AddEdgeWithID - 3*aNbElems != aCoords.length()");
|
||||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=3){
|
for(SMESH::smIdType anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=3){
|
||||||
SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
|
SMDS_MeshElement* anElem = theMesh->AddEdgeWithID(anIndexes[anIndexId+1],
|
||||||
anIndexes[anIndexId+2],
|
anIndexes[anIndexId+2],
|
||||||
anIndexes[anIndexId]);
|
anIndexes[anIndexId]);
|
||||||
@ -181,13 +181,13 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddTriasWithID(SMDS_Mesh* theMesh,
|
inline void AddTriasWithID(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(4*aNbElems != (CORBA::Long) anIndexes.length())
|
if(4*aNbElems != (SMESH::smIdType) anIndexes.length())
|
||||||
EXCEPTION(runtime_error,"AddTriasWithID - 4*aNbElems != anIndexes.length()");
|
EXCEPTION(runtime_error,"AddTriasWithID - 4*aNbElems != anIndexes.length()");
|
||||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
|
for(SMESH::smIdType anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=4){
|
||||||
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],
|
||||||
@ -253,12 +253,12 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddQuadPolygonsWithID(SMDS_Mesh* theMesh,
|
inline void AddQuadPolygonsWithID(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++];
|
||||||
@ -280,13 +280,13 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddTetrasWithID(SMDS_Mesh* theMesh,
|
inline void AddTetrasWithID(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,"AddTetrasWithID - 5*aNbElems != anIndexes.length()");
|
EXCEPTION(runtime_error,"AddTetrasWithID - 5*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->AddVolumeWithID(anIndexes[anIndexId+1],
|
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||||
anIndexes[anIndexId+2],
|
anIndexes[anIndexId+2],
|
||||||
anIndexes[anIndexId+3],
|
anIndexes[anIndexId+3],
|
||||||
@ -303,13 +303,13 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddPiramidsWithID(SMDS_Mesh* theMesh,
|
inline void AddPiramidsWithID(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(6*aNbElems != (CORBA::Long) anIndexes.length())
|
if(6*aNbElems != (SMESH::smIdType) anIndexes.length())
|
||||||
EXCEPTION(runtime_error,"AddPiramidsWithID - 6*aNbElems != anIndexes.length()");
|
EXCEPTION(runtime_error,"AddPiramidsWithID - 6*aNbElems != anIndexes.length()");
|
||||||
for(CORBA::Long anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=6){
|
for(SMESH::smIdType anIndexId = 0; anElemId < aNbElems; anElemId++, anIndexId+=6){
|
||||||
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
SMDS_MeshElement* anElem = theMesh->AddVolumeWithID(anIndexes[anIndexId+1],
|
||||||
anIndexes[anIndexId+2],
|
anIndexes[anIndexId+2],
|
||||||
anIndexes[anIndexId+3],
|
anIndexes[anIndexId+3],
|
||||||
@ -327,7 +327,7 @@ namespace
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
inline void AddPrismsWithID(SMDS_Mesh* theMesh,
|
inline void AddPrismsWithID(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;
|
CORBA::Long anElemId = 0, aNbElems = theSeq[theId].number;
|
||||||
|
@ -3615,7 +3615,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID )
|
|||||||
try {
|
try {
|
||||||
SUIT_OverrideCursor wc;
|
SUIT_OverrideCursor wc;
|
||||||
SMESH::SMESH_MeshEditor_var aMeshEditor = aMesh->GetMeshEditor();
|
SMESH::SMESH_MeshEditor_var aMeshEditor = aMesh->GetMeshEditor();
|
||||||
int removed = aMeshEditor->RemoveOrphanNodes();
|
smIdType removed = aMeshEditor->RemoveOrphanNodes();
|
||||||
SUIT_MessageBox::information(SMESHGUI::desktop(),
|
SUIT_MessageBox::information(SMESHGUI::desktop(),
|
||||||
tr("SMESH_INFORMATION"),
|
tr("SMESH_INFORMATION"),
|
||||||
tr("NB_NODES_REMOVED").arg(removed));
|
tr("NB_NODES_REMOVED").arg(removed));
|
||||||
|
@ -601,7 +601,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|||||||
SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
|
SMESH::smIdType_array_var anIdList = new SMESH::smIdType_array;
|
||||||
anIdList->length( 1 );
|
anIdList->length( 1 );
|
||||||
anIdList[0] = -1;
|
anIdList[0] = -1;
|
||||||
int nbElemsBefore = 0;
|
smIdType nbElemsBefore = 0;
|
||||||
|
|
||||||
switch (myElementType) {
|
switch (myElementType) {
|
||||||
case SMDSAbs_0DElement: {
|
case SMDSAbs_0DElement: {
|
||||||
@ -611,7 +611,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply()
|
|||||||
for ( size_t i = 0; i < anArrayOfIndices->length(); ++i )
|
for ( size_t i = 0; i < anArrayOfIndices->length(); ++i )
|
||||||
anIdList[i] = aMeshEditor->Add0DElement(anArrayOfIndices[i], duplicateElements);
|
anIdList[i] = aMeshEditor->Add0DElement(anArrayOfIndices[i], duplicateElements);
|
||||||
|
|
||||||
CORBA::ULong nbAdded = myMesh->Nb0DElements() - nbElemsBefore;
|
SMESH::smIdType nbAdded = myMesh->Nb0DElements() - nbElemsBefore;
|
||||||
if ( !duplicateElements && nbAdded < anArrayOfIndices->length() )
|
if ( !duplicateElements && nbAdded < anArrayOfIndices->length() )
|
||||||
SUIT_MessageBox::information(SMESHGUI::desktop(),
|
SUIT_MessageBox::information(SMESHGUI::desktop(),
|
||||||
tr("SMESH_INFORMATION"),
|
tr("SMESH_INFORMATION"),
|
||||||
|
@ -3653,7 +3653,7 @@ void SMESHGUI_CtrlInfo::showInfo( const SMESH::SelectionProxy& proxy )
|
|||||||
meshLoaded ? SMESHGUI::resourceMgr()->integerValue( "SMESH", "info_controls_limit", 3000 ) : -1;
|
meshLoaded ? SMESHGUI::resourceMgr()->integerValue( "SMESH", "info_controls_limit", 3000 ) : -1;
|
||||||
|
|
||||||
// nodes info
|
// nodes info
|
||||||
const CORBA::Long nbNodes = nbElemsByType[ SMESH::NODE ];
|
const SMESH::smIdType nbNodes = nbElemsByType[ SMESH::NODE ];
|
||||||
// const CORBA::Long nbElems = ( nbElemsByType[ SMESH::EDGE ] +
|
// const CORBA::Long nbElems = ( nbElemsByType[ SMESH::EDGE ] +
|
||||||
// nbElemsByType[ SMESH::FACE ] +
|
// nbElemsByType[ SMESH::FACE ] +
|
||||||
// nbElemsByType[ SMESH::VOLUME ] );
|
// nbElemsByType[ SMESH::VOLUME ] );
|
||||||
|
@ -1464,7 +1464,7 @@ void SMESHGUI_CuttingOfQuadsDlg::displayPreview()
|
|||||||
else // use numerical functor
|
else // use numerical functor
|
||||||
{
|
{
|
||||||
// compare two sets of possible triangles
|
// compare two sets of possible triangles
|
||||||
int diag = aMeshEditor->BestSplit(anElemIds[i], aCriterion);
|
smIdType diag = aMeshEditor->BestSplit(anElemIds[i], aCriterion);
|
||||||
if (diag == 1) // 1-3
|
if (diag == 1) // 1-3
|
||||||
isDiag13 = true;
|
isDiag13 = true;
|
||||||
else if (diag == 2) // 2-4
|
else if (diag == 2) // 2-4
|
||||||
|
@ -107,24 +107,24 @@ vtkUnstructuredGrid* SMESHGUI_PreVisualObj::GetUnstructuredGrid()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
vtkIdType SMESHGUI_PreVisualObj::GetNodeObjId( int theVTKID )
|
vtkIdType SMESHGUI_PreVisualObj::GetNodeObjId( vtkIdType theVTKID )
|
||||||
{
|
{
|
||||||
const SMDS_MeshNode* aNode = myMesh->FindNodeVtk( theVTKID );
|
const SMDS_MeshNode* aNode = myMesh->FindNodeVtk( theVTKID );
|
||||||
return aNode ? aNode->GetID() : -1;
|
return aNode ? aNode->GetID() : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESHGUI_PreVisualObj::GetNodeVTKId( int theObjID )
|
vtkIdType SMESHGUI_PreVisualObj::GetNodeVTKId( vtkIdType theObjID )
|
||||||
{
|
{
|
||||||
const SMDS_MeshNode* aNode = myMesh->FindNode( theObjID );
|
const SMDS_MeshNode* aNode = myMesh->FindNode( theObjID );
|
||||||
return aNode ? aNode->GetID() : -1;
|
return aNode ? aNode->GetID() : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESHGUI_PreVisualObj::GetElemObjId( int theVTKID )
|
vtkIdType SMESHGUI_PreVisualObj::GetElemObjId( vtkIdType theVTKID )
|
||||||
{
|
{
|
||||||
return this->GetMesh()->FromVtkToSmds(theVTKID);
|
return this->GetMesh()->FromVtkToSmds(theVTKID);
|
||||||
}
|
}
|
||||||
|
|
||||||
vtkIdType SMESHGUI_PreVisualObj::GetElemVTKId( int theObjID )
|
vtkIdType SMESHGUI_PreVisualObj::GetElemVTKId( vtkIdType theObjID )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* e = myMesh->FindElement(theObjID);
|
const SMDS_MeshElement* e = myMesh->FindElement(theObjID);
|
||||||
return e ? e->GetVtkID() : -1;
|
return e ? e->GetVtkID() : -1;
|
||||||
|
@ -59,10 +59,10 @@ class SMESHGUI_EXPORT SMESHGUI_PreVisualObj : public SMESH_VisualObj
|
|||||||
smIdType& theNodeId1,
|
smIdType& theNodeId1,
|
||||||
smIdType& theNodeId2 ) const;
|
smIdType& theNodeId2 ) const;
|
||||||
|
|
||||||
virtual vtkIdType GetNodeObjId( int theVTKID );
|
virtual vtkIdType GetNodeObjId( vtkIdType theVTKID );
|
||||||
virtual vtkIdType GetNodeVTKId( int theObjID );
|
virtual vtkIdType GetNodeVTKId( vtkIdType theObjID );
|
||||||
virtual vtkIdType GetElemObjId( int theVTKID );
|
virtual vtkIdType GetElemObjId( vtkIdType theVTKID );
|
||||||
virtual vtkIdType GetElemVTKId( int theObjID );
|
virtual vtkIdType GetElemVTKId( vtkIdType theObjID );
|
||||||
virtual void ClearEntitiesFlags();
|
virtual void ClearEntitiesFlags();
|
||||||
virtual bool GetEntitiesFlag();
|
virtual bool GetEntitiesFlag();
|
||||||
virtual unsigned int GetEntitiesState();
|
virtual unsigned int GetEntitiesState();
|
||||||
|
@ -663,13 +663,13 @@ int SMESH::SelectionProxy::elementEntityType( int id ) const
|
|||||||
\param connectivity Return element connectivity.
|
\param connectivity Return element connectivity.
|
||||||
\return \c true if result is valid; \c false otherwise.
|
\return \c true if result is valid; \c false otherwise.
|
||||||
*/
|
*/
|
||||||
bool SMESH::SelectionProxy::elementConnectivity( int id, Connectivity& connectivity )
|
bool SMESH::SelectionProxy::elementConnectivity( SMESH::smIdType id, Connectivity& connectivity )
|
||||||
{
|
{
|
||||||
bool result = false;
|
bool result = false;
|
||||||
connectivity.clear();
|
connectivity.clear();
|
||||||
if ( !isNull() )
|
if ( !isNull() )
|
||||||
{
|
{
|
||||||
QSet<int> nodes; // order of nodes is important
|
QSet<SMESH::smIdType> nodes; // order of nodes is important
|
||||||
if ( actor() )
|
if ( actor() )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* element = actor()->GetObject()->GetMesh()->FindElement( id );
|
const SMDS_MeshElement* element = actor()->GetObject()->GetMesh()->FindElement( id );
|
||||||
@ -678,7 +678,7 @@ bool SMESH::SelectionProxy::elementConnectivity( int id, Connectivity& connectiv
|
|||||||
{
|
{
|
||||||
while ( it->more() )
|
while ( it->more() )
|
||||||
{
|
{
|
||||||
int n = it->next()->GetID();
|
SMESH::smIdType n = it->next()->GetID();
|
||||||
if ( !nodes.contains( n ))
|
if ( !nodes.contains( n ))
|
||||||
{
|
{
|
||||||
connectivity[ SMDSAbs_Node ] << n;
|
connectivity[ SMDSAbs_Node ] << n;
|
||||||
@ -1159,10 +1159,10 @@ QColor SMESH::SelectionProxy::color() const
|
|||||||
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
|
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
|
||||||
\return Group's size.
|
\return Group's size.
|
||||||
*/
|
*/
|
||||||
int SMESH::SelectionProxy::size( bool autoCompute ) const
|
SMESH::smIdType SMESH::SelectionProxy::size( bool autoCompute ) const
|
||||||
{
|
{
|
||||||
// note: size is not computed for group on filter for performance reasons, see IPAL52831
|
// note: size is not computed for group on filter for performance reasons, see IPAL52831
|
||||||
int result = -1;
|
SMESH::smIdType result = -1;
|
||||||
if ( !isNull() )
|
if ( !isNull() )
|
||||||
{
|
{
|
||||||
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
|
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
|
||||||
@ -1187,10 +1187,10 @@ int SMESH::SelectionProxy::size( bool autoCompute ) const
|
|||||||
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
|
\param autoCompute Compute size if it is unavailable. Defaults to \c false.
|
||||||
\return Number of nodes contained in group.
|
\return Number of nodes contained in group.
|
||||||
*/
|
*/
|
||||||
int SMESH::SelectionProxy::nbNodes( bool autoCompute ) const
|
SMESH::smIdType SMESH::SelectionProxy::nbNodes( bool autoCompute ) const
|
||||||
{
|
{
|
||||||
// note: nb of nodes is not computed automatically for performance reasons
|
// note: nb of nodes is not computed automatically for performance reasons
|
||||||
int result = -1;
|
SMESH::smIdType result = -1;
|
||||||
if ( !isNull() )
|
if ( !isNull() )
|
||||||
{
|
{
|
||||||
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
|
SMESH::SMESH_GroupBase_var group = SMESH::SMESH_GroupBase::_narrow( myObject );
|
||||||
|
@ -176,7 +176,7 @@ namespace SMESH
|
|||||||
bool hasElement( int );
|
bool hasElement( int );
|
||||||
SMESH::ElementType elementType( int ) const;
|
SMESH::ElementType elementType( int ) const;
|
||||||
int elementEntityType( int ) const;
|
int elementEntityType( int ) const;
|
||||||
bool elementConnectivity( int, Connectivity& );
|
bool elementConnectivity( SMESH::smIdType, Connectivity& );
|
||||||
bool perFaceConnectivity( int, Connectivity&, int& );
|
bool perFaceConnectivity( int, Connectivity&, int& );
|
||||||
bool elementPosition( int, Position& );
|
bool elementPosition( int, Position& );
|
||||||
bool elementGravityCenter( int, XYZ& );
|
bool elementGravityCenter( int, XYZ& );
|
||||||
@ -192,8 +192,8 @@ namespace SMESH
|
|||||||
// methods that work for group only
|
// methods that work for group only
|
||||||
SMESH::ElementType groupElementType() const;
|
SMESH::ElementType groupElementType() const;
|
||||||
QColor color() const;
|
QColor color() const;
|
||||||
int size( bool = false ) const;
|
SMESH::smIdType size( bool = false ) const;
|
||||||
int nbNodes( bool = false ) const;
|
SMESH::smIdType nbNodes( bool = false ) const;
|
||||||
QSet<uint> ids() const;
|
QSet<uint> ids() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -2374,7 +2374,7 @@ SMESH::smIdType_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
for(; anIt!=aResMap.end(); anIt++) {
|
for(; anIt!=aResMap.end(); anIt++) {
|
||||||
const vector<smIdType>& aVec = (*anIt).second;
|
const vector<smIdType>& aVec = (*anIt).second;
|
||||||
for ( i = SMESH::Entity_Node; i < (int)aVec.size(); i++ ) {
|
for ( i = SMESH::Entity_Node; i < (int)aVec.size(); i++ ) {
|
||||||
int nbElem = aVec[i];
|
smIdType nbElem = aVec[i];
|
||||||
if ( nbElem < 0 ) // algo failed, check that it has reported a message
|
if ( nbElem < 0 ) // algo failed, check that it has reported a message
|
||||||
{
|
{
|
||||||
SMESH_subMesh* sm = anIt->first;
|
SMESH_subMesh* sm = anIt->first;
|
||||||
@ -3054,8 +3054,8 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart,
|
|||||||
{
|
{
|
||||||
TE2EMap & e2eMap = e2eMapByType[ groupDS->GetType() ];
|
TE2EMap & e2eMap = e2eMapByType[ groupDS->GetType() ];
|
||||||
if ( e2eMap.empty() ) continue;
|
if ( e2eMap.empty() ) continue;
|
||||||
int minID = e2eMap.begin()->first->GetID();
|
smIdType minID = e2eMap.begin()->first->GetID();
|
||||||
int maxID = e2eMap.rbegin()->first->GetID();
|
smIdType maxID = e2eMap.rbegin()->first->GetID();
|
||||||
TE2EMap::iterator e2e;
|
TE2EMap::iterator e2e;
|
||||||
while ( eIt->more() && groupElems.size() < e2eMap.size())
|
while ( eIt->more() && groupElems.size() < e2eMap.size())
|
||||||
{
|
{
|
||||||
@ -4237,7 +4237,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
if ( grImpl )
|
if ( grImpl )
|
||||||
{
|
{
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( grImpl->_this() );
|
CORBA::String_var objStr = GetORB()->object_to_string( grImpl->_this() );
|
||||||
int anId = myStudyContext->findId( string( objStr.in() ) );
|
smIdType anId = myStudyContext->findId( string( objStr.in() ) );
|
||||||
char grpName[ 30 ];
|
char grpName[ 30 ];
|
||||||
sprintf( grpName, "Group %d %d", anId, grImpl->GetLocalID() );
|
sprintf( grpName, "Group %d %d", anId, grImpl->GetLocalID() );
|
||||||
SMESHDS_GroupBase* aGrpBaseDS = grImpl->GetGroupDS();
|
SMESHDS_GroupBase* aGrpBaseDS = grImpl->GetGroupDS();
|
||||||
@ -4294,7 +4294,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
#endif
|
#endif
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
CORBA::String_var hypdata = myImpl->SaveTo();
|
CORBA::String_var hypdata = myImpl->SaveTo();
|
||||||
int id = myStudyContext->findId( string( objStr.in() ));
|
smIdType id = myStudyContext->findId( string( objStr.in() ));
|
||||||
|
|
||||||
// for each hypothesis create HDF group basing on its id
|
// for each hypothesis create HDF group basing on its id
|
||||||
char hypGrpName[30];
|
char hypGrpName[30];
|
||||||
@ -4362,7 +4362,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
#endif
|
#endif
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
CORBA::String_var hypdata = myImpl->SaveTo();
|
CORBA::String_var hypdata = myImpl->SaveTo();
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
smIdType id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
|
|
||||||
// for each algorithm create HDF group basing on its id
|
// for each algorithm create HDF group basing on its id
|
||||||
char hypGrpName[30];
|
char hypGrpName[30];
|
||||||
@ -4405,7 +4405,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
SMESH_Mesh_i* myImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( myMesh ).in() );
|
SMESH_Mesh_i* myImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( myMesh ).in() );
|
||||||
if ( myImpl ) {
|
if ( myImpl ) {
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
smIdType id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
::SMESH_Mesh& myLocMesh = myImpl->GetImpl();
|
::SMESH_Mesh& myLocMesh = myImpl->GetImpl();
|
||||||
SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
|
SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
|
||||||
bool hasShape = myLocMesh.HasShapeToMesh();
|
bool hasShape = myLocMesh.HasShapeToMesh();
|
||||||
@ -4470,7 +4470,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
// write reference on a shape if exists
|
// write reference on a shape if exists
|
||||||
SALOMEDS::SObject_wrap myRef;
|
SALOMEDS::SObject_wrap myRef;
|
||||||
bool shapeRefFound = false;
|
bool shapeRefFound = false;
|
||||||
bool found = gotBranch->FindSubObject( GetRefOnShapeTag(), myRef.inout() );
|
bool found = gotBranch->FindSubObject( (CORBA::Long)GetRefOnShapeTag(), myRef.inout() );
|
||||||
if ( found ) {
|
if ( found ) {
|
||||||
SALOMEDS::SObject_wrap myShape;
|
SALOMEDS::SObject_wrap myShape;
|
||||||
bool ok = myRef->ReferencedObject( myShape.inout() );
|
bool ok = myRef->ReferencedObject( myShape.inout() );
|
||||||
@ -4501,7 +4501,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
|
|
||||||
// write applied hypotheses if exist
|
// write applied hypotheses if exist
|
||||||
SALOMEDS::SObject_wrap myHypBranch;
|
SALOMEDS::SObject_wrap myHypBranch;
|
||||||
found = gotBranch->FindSubObject( GetRefOnAppliedHypothesisTag(), myHypBranch.inout() );
|
found = gotBranch->FindSubObject( (CORBA::Long)GetRefOnAppliedHypothesisTag(), myHypBranch.inout() );
|
||||||
if ( found && !shapeRefFound && hasShape ) { // remove applied hyps
|
if ( found && !shapeRefFound && hasShape ) { // remove applied hyps
|
||||||
aStudy->NewBuilder()->RemoveObjectWithChildren( myHypBranch );
|
aStudy->NewBuilder()->RemoveObjectWithChildren( myHypBranch );
|
||||||
}
|
}
|
||||||
@ -4524,7 +4524,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
//string myRefOnObject = myRefOnHyp->GetID();
|
//string myRefOnObject = myRefOnHyp->GetID();
|
||||||
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
|
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
smIdType id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
//if ( myRefOnObject.length() > 0 ) {
|
//if ( myRefOnObject.length() > 0 ) {
|
||||||
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
||||||
char hypName[ 30 ], hypId[ 30 ];
|
char hypName[ 30 ], hypId[ 30 ];
|
||||||
@ -4568,7 +4568,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
//string myRefOnObject = myRefOnAlgo->GetID();
|
//string myRefOnObject = myRefOnAlgo->GetID();
|
||||||
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
|
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
smIdType id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
//if ( myRefOnObject.length() > 0 ) {
|
//if ( myRefOnObject.length() > 0 ) {
|
||||||
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
||||||
char algoName[ 30 ], algoId[ 30 ];
|
char algoName[ 30 ], algoId[ 30 ];
|
||||||
@ -4659,7 +4659,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
{
|
{
|
||||||
SMESH::SMESH_subMesh_var mySubMesh = SMESH::SMESH_subMesh::_narrow( anSubObject ) ;
|
SMESH::SMESH_subMesh_var mySubMesh = SMESH::SMESH_subMesh::_narrow( anSubObject ) ;
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anSubObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anSubObject );
|
||||||
int subid = myStudyContext->findId( string( objStr.in() ) );
|
smIdType subid = myStudyContext->findId( string( objStr.in() ) );
|
||||||
|
|
||||||
// for each mesh open the HDF group basing on its id
|
// for each mesh open the HDF group basing on its id
|
||||||
char submeshGrpName[ 30 ];
|
char submeshGrpName[ 30 ];
|
||||||
@ -4698,7 +4698,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
//string myRefOnObject = myRefOnHyp->GetID();
|
//string myRefOnObject = myRefOnHyp->GetID();
|
||||||
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
|
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
smIdType id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
//if ( myRefOnObject.length() > 0 ) {
|
//if ( myRefOnObject.length() > 0 ) {
|
||||||
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
||||||
char hypName[ 30 ], hypId[ 30 ];
|
char hypName[ 30 ], hypId[ 30 ];
|
||||||
@ -4735,7 +4735,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
//string myRefOnObject = myRefOnAlgo->GetID();
|
//string myRefOnObject = myRefOnAlgo->GetID();
|
||||||
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
|
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( anObject );
|
||||||
int id = myStudyContext->findId( string( objStr.in() ) );
|
smIdType id = myStudyContext->findId( string( objStr.in() ) );
|
||||||
//if ( myRefOnObject.length() > 0 ) {
|
//if ( myRefOnObject.length() > 0 ) {
|
||||||
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
//aSize[ 0 ] = myRefOnObject.length() + 1;
|
||||||
char algoName[ 30 ], algoId[ 30 ];
|
char algoName[ 30 ], algoId[ 30 ];
|
||||||
@ -4864,7 +4864,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
CORBA::String_var objStr = GetORB()->object_to_string( aSubObject );
|
CORBA::String_var objStr = GetORB()->object_to_string( aSubObject );
|
||||||
int anId = myStudyContext->findId( string( objStr.in() ) );
|
smIdType anId = myStudyContext->findId( string( objStr.in() ) );
|
||||||
|
|
||||||
// For each group, create a dataset named "Group <group_persistent_id>"
|
// For each group, create a dataset named "Group <group_persistent_id>"
|
||||||
// and store the group's user name into it
|
// and store the group's user name into it
|
||||||
@ -4971,7 +4971,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
{
|
{
|
||||||
SMDS_ElemIteratorPtr eIt =
|
SMDS_ElemIteratorPtr eIt =
|
||||||
mySMESHDSMesh->elementsIterator( isNode ? SMDSAbs_Node : SMDSAbs_All );
|
mySMESHDSMesh->elementsIterator( isNode ? SMDSAbs_Node : SMDSAbs_All );
|
||||||
int nbElems = isNode ? mySMESHDSMesh->NbNodes() : mySMESHDSMesh->GetMeshInfo().NbElements();
|
smIdType nbElems = isNode ? mySMESHDSMesh->NbNodes() : mySMESHDSMesh->GetMeshInfo().NbElements();
|
||||||
if ( nbElems < 1 )
|
if ( nbElems < 1 )
|
||||||
continue;
|
continue;
|
||||||
std::vector<int> smIDs; smIDs.reserve( nbElems );
|
std::vector<int> smIDs; smIDs.reserve( nbElems );
|
||||||
@ -5012,7 +5012,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
SMESHDS_SubMesh* aSubMesh = const_cast< SMESHDS_SubMesh* >( smIt->next() );
|
SMESHDS_SubMesh* aSubMesh = const_cast< SMESHDS_SubMesh* >( smIt->next() );
|
||||||
if ( aSubMesh->IsComplexSubmesh() )
|
if ( aSubMesh->IsComplexSubmesh() )
|
||||||
continue; // submesh containing other submeshs
|
continue; // submesh containing other submeshs
|
||||||
int nbNodes = aSubMesh->NbNodes();
|
smIdType nbNodes = aSubMesh->NbNodes();
|
||||||
if ( nbNodes == 0 ) continue;
|
if ( nbNodes == 0 ) continue;
|
||||||
|
|
||||||
int aShapeID = aSubMesh->GetID();
|
int aShapeID = aSubMesh->GetID();
|
||||||
@ -5330,7 +5330,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
// myImpl->LoadFrom( hypdata.c_str() );
|
// myImpl->LoadFrom( hypdata.c_str() );
|
||||||
hypDataList.push_back( make_pair( myImpl, hypdata ));
|
hypDataList.push_back( make_pair( myImpl, hypdata ));
|
||||||
CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
|
CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
|
||||||
int newId = myStudyContext->findId( iorString.in() );
|
smIdType newId = myStudyContext->findId( iorString.in() );
|
||||||
myStudyContext->mapOldToNew( id, newId );
|
myStudyContext->mapOldToNew( id, newId );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5434,7 +5434,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
//myImpl->LoadFrom( hypdata.c_str() );
|
//myImpl->LoadFrom( hypdata.c_str() );
|
||||||
hypDataList.push_back( make_pair( myImpl, hypdata ));
|
hypDataList.push_back( make_pair( myImpl, hypdata ));
|
||||||
CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
|
CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
|
||||||
int newId = myStudyContext->findId( iorString.in() );
|
smIdType newId = myStudyContext->findId( iorString.in() );
|
||||||
myStudyContext->mapOldToNew( id, newId );
|
myStudyContext->mapOldToNew( id, newId );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -5475,7 +5475,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
meshGroupList.push_back( make_pair( myNewMeshImpl, aTopGroup ));
|
meshGroupList.push_back( make_pair( myNewMeshImpl, aTopGroup ));
|
||||||
|
|
||||||
CORBA::String_var iorString = GetORB()->object_to_string( myNewMesh );
|
CORBA::String_var iorString = GetORB()->object_to_string( myNewMesh );
|
||||||
int newId = myStudyContext->findId( iorString.in() );
|
smIdType newId = myStudyContext->findId( iorString.in() );
|
||||||
myStudyContext->mapOldToNew( id, newId );
|
myStudyContext->mapOldToNew( id, newId );
|
||||||
|
|
||||||
// ouv : NPAL12872
|
// ouv : NPAL12872
|
||||||
@ -5578,7 +5578,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
|
|
||||||
// get mesh old id
|
// get mesh old id
|
||||||
CORBA::String_var iorString = GetORB()->object_to_string( myNewMeshImpl->_this() );
|
CORBA::String_var iorString = GetORB()->object_to_string( myNewMeshImpl->_this() );
|
||||||
int newId = myStudyContext->findId( iorString.in() );
|
smIdType newId = myStudyContext->findId( iorString.in() );
|
||||||
int meshOldId = myStudyContext->getOldId( newId );
|
int meshOldId = myStudyContext->getOldId( newId );
|
||||||
|
|
||||||
// try to find mesh data dataset
|
// try to find mesh data dataset
|
||||||
@ -5730,7 +5730,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
if ( aSubMesh->_is_nil() )
|
if ( aSubMesh->_is_nil() )
|
||||||
continue;
|
continue;
|
||||||
string iorSubString = GetORB()->object_to_string( aSubMesh );
|
string iorSubString = GetORB()->object_to_string( aSubMesh );
|
||||||
int newSubId = myStudyContext->findId( iorSubString );
|
smIdType newSubId = myStudyContext->findId( iorSubString );
|
||||||
myStudyContext->mapOldToNew( subid, newSubId );
|
myStudyContext->mapOldToNew( subid, newSubId );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5923,7 +5923,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
string iorSubString = GetORB()->object_to_string( aNewGroup );
|
string iorSubString = GetORB()->object_to_string( aNewGroup );
|
||||||
int newSubId = myStudyContext->findId( iorSubString );
|
smIdType newSubId = myStudyContext->findId( iorSubString );
|
||||||
myStudyContext->mapOldToNew( subid, newSubId );
|
myStudyContext->mapOldToNew( subid, newSubId );
|
||||||
|
|
||||||
SMESH_GroupBase_i* aGroupImpl = SMESH::DownCast< SMESH_GroupBase_i*>( aNewGroup );
|
SMESH_GroupBase_i* aGroupImpl = SMESH::DownCast< SMESH_GroupBase_i*>( aNewGroup );
|
||||||
@ -6192,7 +6192,7 @@ char* SMESH_Gen_i::IORToLocalPersistentID( SALOMEDS::SObject_ptr /*theSObject*/,
|
|||||||
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" );
|
if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" );
|
||||||
|
|
||||||
if ( myStudyContext && strcmp( IORString, "" ) != 0 ) {
|
if ( myStudyContext && strcmp( IORString, "" ) != 0 ) {
|
||||||
int anId = myStudyContext->findId( IORString );
|
smIdType anId = myStudyContext->findId( IORString );
|
||||||
if ( anId ) {
|
if ( anId ) {
|
||||||
if(MYDEBUG) MESSAGE( "VSR " << anId )
|
if(MYDEBUG) MESSAGE( "VSR " << anId )
|
||||||
char strId[ 20 ];
|
char strId[ 20 ];
|
||||||
@ -6247,7 +6247,7 @@ int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject)
|
|||||||
*/
|
*/
|
||||||
//================================================================================
|
//================================================================================
|
||||||
|
|
||||||
CORBA::Long SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
|
SMESH::smIdType SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject)
|
||||||
{
|
{
|
||||||
if ( myStudyContext && !CORBA::is_nil( theObject )) {
|
if ( myStudyContext && !CORBA::is_nil( theObject )) {
|
||||||
string iorString = GetORB()->object_to_string( theObject );
|
string iorString = GetORB()->object_to_string( theObject );
|
||||||
|
@ -537,7 +537,7 @@ public:
|
|||||||
int RegisterObject(CORBA::Object_ptr theObject);
|
int RegisterObject(CORBA::Object_ptr theObject);
|
||||||
|
|
||||||
// Return id of registered object
|
// Return id of registered object
|
||||||
CORBA::Long GetObjectId(CORBA::Object_ptr theObject);
|
SMESH::smIdType GetObjectId(CORBA::Object_ptr theObject);
|
||||||
|
|
||||||
// Return an object that previously had an oldID
|
// Return an object that previously had an oldID
|
||||||
template<class TInterface>
|
template<class TInterface>
|
||||||
|
@ -472,10 +472,10 @@ SMESH::smIdType_array* SMESH_GroupBase_i::GetListOfID()
|
|||||||
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
|
SMESHDS_GroupBase* aGroupDS = GetGroupDS();
|
||||||
if (aGroupDS)
|
if (aGroupDS)
|
||||||
{
|
{
|
||||||
int aSize = aGroupDS->Extent();
|
smIdType aSize = aGroupDS->Extent();
|
||||||
aRes->length(aSize);
|
aRes->length(aSize);
|
||||||
SMDS_ElemIteratorPtr it = aGroupDS->GetElements();
|
SMDS_ElemIteratorPtr it = aGroupDS->GetElements();
|
||||||
for (int i = 0; it->more(); i++)
|
for (smIdType i = 0; it->more(); i++)
|
||||||
aRes[i] = it->next()->GetID();
|
aRes[i] = it->next()->GetID();
|
||||||
|
|
||||||
if ( 0 < aSize && aSize < 100 ) // for comfortable testing ;)
|
if ( 0 < aSize && aSize < 100 ) // for comfortable testing ;)
|
||||||
|
@ -573,7 +573,7 @@ SMESH::MeshPreviewStruct* SMESH_MeshEditor_i::GetPreviewData()
|
|||||||
aMeshElem->nodeIterator() );
|
aMeshElem->nodeIterator() );
|
||||||
while ( itElemNodes->more() ) {
|
while ( itElemNodes->more() ) {
|
||||||
const SMDS_MeshNode* aMeshNode = itElemNodes->next();
|
const SMDS_MeshNode* aMeshNode = itElemNodes->next();
|
||||||
int aNodeID = aMeshNode->GetID();
|
smIdType aNodeID = aMeshNode->GetID();
|
||||||
TNodesMap::iterator anIter = nodesMap.find(aNodeID);
|
TNodesMap::iterator anIter = nodesMap.find(aNodeID);
|
||||||
if ( anIter == nodesMap.end() ) {
|
if ( anIter == nodesMap.end() ) {
|
||||||
// filling the nodes coordinates
|
// filling the nodes coordinates
|
||||||
@ -854,9 +854,9 @@ SMESH::smIdType SMESH_MeshEditor_i::RemoveOrphanNodes()
|
|||||||
// remove orphan nodes (if there are any)
|
// remove orphan nodes (if there are any)
|
||||||
list< smIdType > IdList( seq.begin(), seq.end() );
|
list< smIdType > IdList( seq.begin(), seq.end() );
|
||||||
|
|
||||||
int nbNodesBefore = myMesh->NbNodes();
|
SMESH::smIdType nbNodesBefore = myMesh->NbNodes();
|
||||||
getEditor().Remove( IdList, true );
|
getEditor().Remove( IdList, true );
|
||||||
int nbNodesAfter = myMesh->NbNodes();
|
SMESH::smIdType nbNodesAfter = myMesh->NbNodes();
|
||||||
|
|
||||||
declareMeshModified( /*isReComputeSafe=*/ IdList.size() == 0 ); // issue 0020693
|
declareMeshModified( /*isReComputeSafe=*/ IdList.size() == 0 ); // issue 0020693
|
||||||
return nbNodesBefore - nbNodesAfter;
|
return nbNodesBefore - nbNodesAfter;
|
||||||
@ -959,12 +959,12 @@ SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::smIdType_array & IDsOfN
|
|||||||
SMESH_TRY;
|
SMESH_TRY;
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
int NbNodes = IDsOfNodes.length();
|
SMESH::smIdType NbNodes = IDsOfNodes.length();
|
||||||
SMDS_MeshElement* elem = 0;
|
SMDS_MeshElement* elem = 0;
|
||||||
if (NbNodes == 2)
|
if (NbNodes == 2)
|
||||||
{
|
{
|
||||||
CORBA::Long index1 = IDsOfNodes[0];
|
SMESH::smIdType index1 = IDsOfNodes[0];
|
||||||
CORBA::Long index2 = IDsOfNodes[1];
|
SMESH::smIdType index2 = IDsOfNodes[1];
|
||||||
elem = getMeshDS()->AddEdge( getMeshDS()->FindNode(index1),
|
elem = getMeshDS()->AddEdge( getMeshDS()->FindNode(index1),
|
||||||
getMeshDS()->FindNode(index2));
|
getMeshDS()->FindNode(index2));
|
||||||
|
|
||||||
@ -973,9 +973,9 @@ SMESH::smIdType SMESH_MeshEditor_i::AddEdge(const SMESH::smIdType_array & IDsOfN
|
|||||||
<< index1 << ", " << index2 <<" ])";
|
<< index1 << ", " << index2 <<" ])";
|
||||||
}
|
}
|
||||||
if (NbNodes == 3) {
|
if (NbNodes == 3) {
|
||||||
CORBA::Long n1 = IDsOfNodes[0];
|
SMESH::smIdType n1 = IDsOfNodes[0];
|
||||||
CORBA::Long n2 = IDsOfNodes[1];
|
SMESH::smIdType n2 = IDsOfNodes[1];
|
||||||
CORBA::Long n12 = IDsOfNodes[2];
|
SMESH::smIdType n12 = IDsOfNodes[2];
|
||||||
elem = getMeshDS()->AddEdge( getMeshDS()->FindNode(n1),
|
elem = getMeshDS()->AddEdge( getMeshDS()->FindNode(n1),
|
||||||
getMeshDS()->FindNode(n2),
|
getMeshDS()->FindNode(n2),
|
||||||
getMeshDS()->FindNode(n12));
|
getMeshDS()->FindNode(n12));
|
||||||
@ -1578,9 +1578,9 @@ CORBA::Boolean SMESH_MeshEditor_i::Reorient(const SMESH::smIdType_array & IDsOfE
|
|||||||
SMESH_TRY;
|
SMESH_TRY;
|
||||||
initData();
|
initData();
|
||||||
|
|
||||||
for ( CORBA::ULong i = 0; i < IDsOfElements.length(); i++ )
|
for ( SMESH::smIdType i = 0; i < IDsOfElements.length(); i++ )
|
||||||
{
|
{
|
||||||
CORBA::Long index = IDsOfElements[i];
|
SMESH::smIdType index = IDsOfElements[i];
|
||||||
const SMDS_MeshElement * elem = getMeshDS()->FindElement(index);
|
const SMDS_MeshElement * elem = getMeshDS()->FindElement(index);
|
||||||
if ( elem )
|
if ( elem )
|
||||||
getEditor().Reorient( elem );
|
getEditor().Reorient( elem );
|
||||||
@ -2999,7 +2999,7 @@ SMESH_MeshEditor_i::LinearAnglesVariation(SMESH::SMESH_Mesh_ptr thePathMes
|
|||||||
SMESH_subMesh* aSubMesh = aMeshImp->GetImpl().GetSubMesh( aShape );
|
SMESH_subMesh* aSubMesh = aMeshImp->GetImpl().GetSubMesh( aShape );
|
||||||
if ( !aSubMesh || !aSubMesh->GetSubMeshDS())
|
if ( !aSubMesh || !aSubMesh->GetSubMeshDS())
|
||||||
return aResult._retn();
|
return aResult._retn();
|
||||||
int nbSteps = aSubMesh->GetSubMeshDS()->NbElements();
|
smIdType nbSteps = aSubMesh->GetSubMeshDS()->NbElements();
|
||||||
if ( nbSteps == nbAngles )
|
if ( nbSteps == nbAngles )
|
||||||
{
|
{
|
||||||
aResult.inout() = theAngles;
|
aResult.inout() = theAngles;
|
||||||
@ -6723,7 +6723,7 @@ SMESH_MeshEditor_i::AffectedElemGroupsInRegion( const SMESH::ListOfGroups& theEl
|
|||||||
for (; eIt != anAffected.end(); ++eIt)
|
for (; eIt != anAffected.end(); ++eIt)
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* anElem = *eIt;
|
const SMDS_MeshElement* anElem = *eIt;
|
||||||
int elemId = anElem->GetID();
|
smIdType elemId = anElem->GetID();
|
||||||
switch ( anElem->GetType() ) {
|
switch ( anElem->GetType() ) {
|
||||||
case SMDSAbs_Volume: volumeIds[ivol++] = elemId; break;
|
case SMDSAbs_Volume: volumeIds[ivol++] = elemId; break;
|
||||||
case SMDSAbs_Face: faceIds[iface++] = elemId; break;
|
case SMDSAbs_Face: faceIds[iface++] = elemId; break;
|
||||||
|
@ -640,7 +640,7 @@ SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Object_ptr aSubShape,
|
|||||||
{
|
{
|
||||||
Unexpect aCatch(SALOME_SalomeException);
|
Unexpect aCatch(SALOME_SalomeException);
|
||||||
|
|
||||||
const int prevNbMeshEnt = NbNodes() + NbElements();
|
const smIdType prevNbMeshEnt = NbNodes() + NbElements();
|
||||||
|
|
||||||
if ( _preMeshInfo )
|
if ( _preMeshInfo )
|
||||||
_preMeshInfo->ForgetOrLoad();
|
_preMeshInfo->ForgetOrLoad();
|
||||||
@ -1148,11 +1148,11 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup
|
|||||||
THROW_SALOME_CORBA_EXCEPTION( "RemoveGroupWithContents(): group does not belong to this mesh",
|
THROW_SALOME_CORBA_EXCEPTION( "RemoveGroupWithContents(): group does not belong to this mesh",
|
||||||
SALOME::BAD_PARAM);
|
SALOME::BAD_PARAM);
|
||||||
|
|
||||||
vector<int> nodeIds; // to remove nodes becoming free
|
vector<smIdType> nodeIds; // to remove nodes becoming free
|
||||||
bool isNodal = ( theGroup->GetType() == SMESH::NODE );
|
bool isNodal = ( theGroup->GetType() == SMESH::NODE );
|
||||||
if ( !isNodal && !theGroup->IsEmpty() )
|
if ( !isNodal && !theGroup->IsEmpty() )
|
||||||
{
|
{
|
||||||
CORBA::Long elemID = theGroup->GetID( 1 );
|
SMESH::smIdType elemID = theGroup->GetID( 1 );
|
||||||
int nbElemNodes = GetElemNbNodes( elemID );
|
int nbElemNodes = GetElemNbNodes( elemID );
|
||||||
if ( nbElemNodes > 0 )
|
if ( nbElemNodes > 0 )
|
||||||
nodeIds.reserve( theGroup->Size() * nbElemNodes );
|
nodeIds.reserve( theGroup->Size() * nbElemNodes );
|
||||||
@ -1857,7 +1857,7 @@ SMESH_Mesh_i::CreateDimGroup(const SMESH::ListOfIDSources& theGroups,
|
|||||||
SMDS_ElemIteratorPtr nIt = elOfType->nodesIterator();
|
SMDS_ElemIteratorPtr nIt = elOfType->nodesIterator();
|
||||||
for ( nbChecked = 1; nIt->more() && !toStopChecking; ++nbChecked )
|
for ( nbChecked = 1; nIt->more() && !toStopChecking; ++nbChecked )
|
||||||
{
|
{
|
||||||
const int nID = nIt->next()->GetID();
|
const smIdType nID = nIt->next()->GetID();
|
||||||
if ( nID < isNodeInGroupsSize && isNodeInGroups[ nID ] &&
|
if ( nID < isNodeInGroupsSize && isNodeInGroups[ nID ] &&
|
||||||
isToInclude( nbChecked, ++nbCommon, nbNodes, nbCorners, toStopChecking ))
|
isToInclude( nbChecked, ++nbCommon, nbNodes, nbCorners, toStopChecking ))
|
||||||
{
|
{
|
||||||
@ -2090,7 +2090,7 @@ void SMESH_Mesh_i::ReplaceShape(GEOM::GEOM_Object_ptr theNewGeom)
|
|||||||
while ( elemIt->more() )
|
while ( elemIt->more() )
|
||||||
{
|
{
|
||||||
const SMDS_MeshElement* e = elemIt->next();
|
const SMDS_MeshElement* e = elemIt->next();
|
||||||
const int elemID = e->GetID();
|
const smIdType elemID = e->GetID();
|
||||||
const int shapeID = e->GetShapeID();
|
const int shapeID = e->GetShapeID();
|
||||||
TRange & lastRange = ranges.back();
|
TRange & lastRange = ranges.back();
|
||||||
if ( lastRange.shapeID != shapeID ||
|
if ( lastRange.shapeID != shapeID ||
|
||||||
@ -2407,7 +2407,7 @@ void SMESH_Mesh_i::CheckGeomModif( bool theIsBreakLink )
|
|||||||
if ( !theIsBreakLink )
|
if ( !theIsBreakLink )
|
||||||
if ( mainGO->GetType() == GEOM_GROUP || !geomChanged ) // is group or not modified
|
if ( mainGO->GetType() == GEOM_GROUP || !geomChanged ) // is group or not modified
|
||||||
{
|
{
|
||||||
int nb = NbNodes() + NbElements();
|
smIdType nb = NbNodes() + NbElements();
|
||||||
CheckGeomGroupModif();
|
CheckGeomGroupModif();
|
||||||
if ( nb != NbNodes() + NbElements() ) // something removed due to hypotheses change
|
if ( nb != NbNodes() + NbElements() ) // something removed due to hypotheses change
|
||||||
_gen_i->UpdateIcons( me );
|
_gen_i->UpdateIcons( me );
|
||||||
@ -2795,7 +2795,7 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
|
|||||||
|
|
||||||
if ( !_impl->HasShapeToMesh() ) return;
|
if ( !_impl->HasShapeToMesh() ) return;
|
||||||
|
|
||||||
CORBA::Long nbEntities = NbNodes() + NbElements();
|
SMESH::smIdType nbEntities = NbNodes() + NbElements();
|
||||||
|
|
||||||
// Check if group contents changed
|
// Check if group contents changed
|
||||||
|
|
||||||
@ -2997,7 +2997,7 @@ void SMESH_Mesh_i::CheckGeomGroupModif()
|
|||||||
|
|
||||||
// Update icons
|
// Update icons
|
||||||
|
|
||||||
CORBA::Long newNbEntities = NbNodes() + NbElements();
|
SMESH::smIdType newNbEntities = NbNodes() + NbElements();
|
||||||
list< SALOMEDS::SObject_wrap > soToUpdateIcons;
|
list< SALOMEDS::SObject_wrap > soToUpdateIcons;
|
||||||
if ( newNbEntities != nbEntities )
|
if ( newNbEntities != nbEntities )
|
||||||
{
|
{
|
||||||
@ -3342,7 +3342,7 @@ SMESH::log_array * SMESH_Mesh_i::GetLog(CORBA::Boolean clearAfterGet)
|
|||||||
while(its != logDS.end()){
|
while(its != logDS.end()){
|
||||||
SMESHDS_Command *com = *its;
|
SMESHDS_Command *com = *its;
|
||||||
int comType = com->GetType();
|
int comType = com->GetType();
|
||||||
int lgcom = com->GetNumber();
|
smIdType lgcom = com->GetNumber();
|
||||||
const list < smIdType >&intList = com->GetIndexes();
|
const list < smIdType >&intList = com->GetIndexes();
|
||||||
int inum = intList.size();
|
int inum = intList.size();
|
||||||
list < smIdType >::const_iterator ii = intList.begin();
|
list < smIdType >::const_iterator ii = intList.begin();
|
||||||
@ -7072,20 +7072,20 @@ smIdType SMESH_MeshPartDS::MinNodeID() const
|
|||||||
smIdType SMESH_MeshPartDS::MaxElementID() const
|
smIdType SMESH_MeshPartDS::MaxElementID() const
|
||||||
{
|
{
|
||||||
if ( _meshDS ) return _meshDS->MaxElementID();
|
if ( _meshDS ) return _meshDS->MaxElementID();
|
||||||
int maxID = 0;
|
smIdType maxID = 0;
|
||||||
for ( int iType = SMDSAbs_Edge; iType < SMDSAbs_NbElementTypes; ++iType )
|
for ( int iType = SMDSAbs_Edge; iType < SMDSAbs_NbElementTypes; ++iType )
|
||||||
if ( !_elements[ iType ].empty() )
|
if ( !_elements[ iType ].empty() )
|
||||||
maxID = Max( maxID, (*_elements[ iType ].rbegin())->GetID() );
|
maxID = std::max( maxID, (*_elements[ iType ].rbegin())->GetID() );
|
||||||
return maxID;
|
return maxID;
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
smIdType SMESH_MeshPartDS::MinElementID() const
|
smIdType SMESH_MeshPartDS::MinElementID() const
|
||||||
{
|
{
|
||||||
if ( _meshDS ) return _meshDS->MinElementID();
|
if ( _meshDS ) return _meshDS->MinElementID();
|
||||||
int minID = 0;
|
smIdType minID = 0;
|
||||||
for ( int iType = SMDSAbs_Edge; iType < SMDSAbs_NbElementTypes; ++iType )
|
for ( int iType = SMDSAbs_Edge; iType < SMDSAbs_NbElementTypes; ++iType )
|
||||||
if ( !_elements[ iType ].empty() )
|
if ( !_elements[ iType ].empty() )
|
||||||
minID = Min( minID, (*_elements[ iType ].begin())->GetID() );
|
minID = std::min( minID, (*_elements[ iType ].begin())->GetID() );
|
||||||
return minID;
|
return minID;
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------------
|
||||||
|
@ -286,9 +286,9 @@ SMESH::point_array*
|
|||||||
|
|
||||||
list<const gp_XYZ *> xyzList;
|
list<const gp_XYZ *> xyzList;
|
||||||
set<const SMDS_MeshFace*> fset;
|
set<const SMDS_MeshFace*> fset;
|
||||||
for ( CORBA::ULong i = 0; i < theFacesIDs.length(); i++)
|
for ( SMESH::smIdType i = 0; i < theFacesIDs.length(); i++)
|
||||||
{
|
{
|
||||||
CORBA::Long index = theFacesIDs[i];
|
SMESH::smIdType index = theFacesIDs[i];
|
||||||
const SMDS_MeshElement * elem = aMesh->GetMeshDS()->FindElement(index);
|
const SMDS_MeshElement * elem = aMesh->GetMeshDS()->FindElement(index);
|
||||||
if ( elem && elem->GetType() == SMDSAbs_Face )
|
if ( elem && elem->GetType() == SMDSAbs_Face )
|
||||||
fset.insert( static_cast<const SMDS_MeshFace *>( elem ));
|
fset.insert( static_cast<const SMDS_MeshFace *>( elem ));
|
||||||
@ -345,9 +345,9 @@ SMESH::point_array*
|
|||||||
|
|
||||||
list<const gp_XYZ *> xyzList;
|
list<const gp_XYZ *> xyzList;
|
||||||
set<const SMDS_MeshVolume*> vset;
|
set<const SMDS_MeshVolume*> vset;
|
||||||
for ( CORBA::ULong i = 0; i < theVolumesIDs.length(); i++)
|
for ( SMESH::smIdType i = 0; i < theVolumesIDs.length(); i++)
|
||||||
{
|
{
|
||||||
CORBA::Long index = theVolumesIDs[i];
|
SMESH::smIdType index = theVolumesIDs[i];
|
||||||
const SMDS_MeshElement * elem = aMesh->GetMeshDS()->FindElement(index);
|
const SMDS_MeshElement * elem = aMesh->GetMeshDS()->FindElement(index);
|
||||||
if ( elem && elem->GetType() == SMDSAbs_Volume && elem->NbNodes() == 8 )
|
if ( elem && elem->GetType() == SMDSAbs_Volume && elem->NbNodes() == 8 )
|
||||||
vset.insert( static_cast<const SMDS_MeshVolume *>( elem ));
|
vset.insert( static_cast<const SMDS_MeshVolume *>( elem ));
|
||||||
@ -389,7 +389,7 @@ CORBA::Boolean SMESH_Pattern_i::MakeMesh (SMESH::SMESH_Mesh_ptr theMesh,
|
|||||||
<< CreatePolygons << ", " << CreatePolyedrs << " )";
|
<< CreatePolygons << ", " << CreatePolyedrs << " )";
|
||||||
addErrorCode( "MakeMesh" );
|
addErrorCode( "MakeMesh" );
|
||||||
|
|
||||||
int nb = aMesh->NbNodes() + aMesh->NbEdges() + aMesh->NbFaces() + aMesh->NbVolumes();
|
smIdType nb = aMesh->NbNodes() + aMesh->NbEdges() + aMesh->NbFaces() + aMesh->NbVolumes();
|
||||||
|
|
||||||
bool res = myPattern.MakeMesh( aMesh, CreatePolygons, CreatePolyedrs );
|
bool res = myPattern.MakeMesh( aMesh, CreatePolygons, CreatePolyedrs );
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@ SMESH::smIdType SMESH_subMesh_i::GetNumberOfElements()
|
|||||||
|
|
||||||
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
|
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
|
||||||
|
|
||||||
int nbElems = 0;
|
SMESH::smIdType nbElems = 0;
|
||||||
|
|
||||||
TListOfSubMeshes smList;
|
TListOfSubMeshes smList;
|
||||||
if ( getSubMeshes( aSubMesh, smList ))
|
if ( getSubMeshes( aSubMesh, smList ))
|
||||||
@ -197,7 +197,7 @@ SMESH::smIdType SMESH_subMesh_i::GetNumberOfNodes(CORBA::Boolean all)
|
|||||||
}
|
}
|
||||||
if ( all ) // get nodes from aSubMesh and all child sub-meshes
|
if ( all ) // get nodes from aSubMesh and all child sub-meshes
|
||||||
{
|
{
|
||||||
int nbNodes = 0;
|
SMESH::smIdType nbNodes = 0;
|
||||||
SMESH_subMeshIteratorPtr smIt = aSubMesh->getDependsOnIterator( /*includeSelf=*/true );
|
SMESH_subMeshIteratorPtr smIt = aSubMesh->getDependsOnIterator( /*includeSelf=*/true );
|
||||||
while ( smIt->more() )
|
while ( smIt->more() )
|
||||||
{
|
{
|
||||||
@ -231,7 +231,7 @@ SMESH::smIdType_array* SMESH_subMesh_i::GetElementsId()
|
|||||||
|
|
||||||
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
|
::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
|
||||||
|
|
||||||
int nbElems = 0;
|
SMESH::smIdType nbElems = 0;
|
||||||
TListOfSubMeshes smList;
|
TListOfSubMeshes smList;
|
||||||
if ( getSubMeshes( aSubMesh, smList ))
|
if ( getSubMeshes( aSubMesh, smList ))
|
||||||
{
|
{
|
||||||
|
@ -365,7 +365,7 @@ bool StdMeshers_AutomaticLength::SetParametersByMesh(const SMESH_Mesh* theMesh
|
|||||||
SMESHDS_SubMesh * eSubMesh = aMeshDS->MeshElements( edge );
|
SMESHDS_SubMesh * eSubMesh = aMeshDS->MeshElements( edge );
|
||||||
if ( !eSubMesh )
|
if ( !eSubMesh )
|
||||||
return false;
|
return false;
|
||||||
int nbSeg = eSubMesh->NbElements();
|
smIdType nbSeg = eSubMesh->NbElements();
|
||||||
if ( nbSeg < 1 )
|
if ( nbSeg < 1 )
|
||||||
continue;
|
continue;
|
||||||
double segLen = L / nbSeg;
|
double segLen = L / nbSeg;
|
||||||
|
@ -124,7 +124,7 @@ public:
|
|||||||
bool Contain( const TopoDS_Vertex& vertex ) const;
|
bool Contain( const TopoDS_Vertex& vertex ) const;
|
||||||
void AppendSide( const _FaceSide& side );
|
void AppendSide( const _FaceSide& side );
|
||||||
void SetBottomSide( int i );
|
void SetBottomSide( int i );
|
||||||
int GetNbSegments(SMESH_ProxyMesh& mesh, const SMESHDS_SubMesh* smToCheckEdges=0) const;
|
smIdType GetNbSegments(SMESH_ProxyMesh& mesh, const SMESHDS_SubMesh* smToCheckEdges=0) const;
|
||||||
bool StoreNodes(SMESH_ProxyMesh& mesh, vector<const SMDS_MeshNode*>& myGrid,
|
bool StoreNodes(SMESH_ProxyMesh& mesh, vector<const SMDS_MeshNode*>& myGrid,
|
||||||
bool reverse, bool isProxy, const SMESHDS_SubMesh* smToCheckEdges=0 );
|
bool reverse, bool isProxy, const SMESHDS_SubMesh* smToCheckEdges=0 );
|
||||||
void SetID(EQuadSides id) { myID = id; }
|
void SetID(EQuadSides id) { myID = id; }
|
||||||
@ -2229,9 +2229,9 @@ void _FaceSide::SetBottomSide( int i )
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
|
||||||
int _FaceSide::GetNbSegments(SMESH_ProxyMesh& mesh, const SMESHDS_SubMesh* smToCheckEdges) const
|
smIdType _FaceSide::GetNbSegments(SMESH_ProxyMesh& mesh, const SMESHDS_SubMesh* smToCheckEdges) const
|
||||||
{
|
{
|
||||||
int nb = 0;
|
smIdType nb = 0;
|
||||||
if ( myChildren.empty() )
|
if ( myChildren.empty() )
|
||||||
{
|
{
|
||||||
nb = mesh.GetSubMesh(myEdge)->NbElements();
|
nb = mesh.GetSubMesh(myEdge)->NbElements();
|
||||||
|
@ -835,7 +835,7 @@ bool StdMeshers_FaceSide::GetEdgeNodes(size_t i,
|
|||||||
if ( mesh->HasModificationsToDiscard() ) // check nb of nodes on the EDGE sub-mesh
|
if ( mesh->HasModificationsToDiscard() ) // check nb of nodes on the EDGE sub-mesh
|
||||||
{
|
{
|
||||||
int iQuad = sm->NbElements() ? sm->GetElements()->next()->IsQuadratic() : 0;
|
int iQuad = sm->NbElements() ? sm->GetElements()->next()->IsQuadratic() : 0;
|
||||||
int nbExpect = sm->NbElements() - 1 + iQuad * sm->NbElements();
|
smIdType nbExpect = sm->NbElements() - 1 + iQuad * sm->NbElements();
|
||||||
if ( nbExpect != sm->NbNodes() ) // some nodes are moved from the EDGE by MergeNodes()
|
if ( nbExpect != sm->NbNodes() ) // some nodes are moved from the EDGE by MergeNodes()
|
||||||
{
|
{
|
||||||
// add nodes of all segments
|
// add nodes of all segments
|
||||||
|
@ -346,7 +346,7 @@ protected:
|
|||||||
std::vector<double> myEdgeLength;
|
std::vector<double> myEdgeLength;
|
||||||
std::vector<int> myIsUniform;
|
std::vector<int> myIsUniform;
|
||||||
double myLength;
|
double myLength;
|
||||||
int myNbPonits, myNbSegments;
|
smIdType myNbPonits, myNbSegments;
|
||||||
SMESH_ProxyMesh::Ptr myProxyMesh;
|
SMESH_ProxyMesh::Ptr myProxyMesh;
|
||||||
bool myMissingVertexNodes, myIgnoreMediumNodes;
|
bool myMissingVertexNodes, myIgnoreMediumNodes;
|
||||||
gp_Pnt2d myDefaultPnt2d;
|
gp_Pnt2d myDefaultPnt2d;
|
||||||
|
@ -349,7 +349,7 @@ namespace
|
|||||||
// Find all block sides starting from mesh faces sharing the corner node
|
// Find all block sides starting from mesh faces sharing the corner node
|
||||||
// --------------------------------------------------------------------
|
// --------------------------------------------------------------------
|
||||||
|
|
||||||
int nbFacesOnSides = 0;
|
smIdType nbFacesOnSides = 0;
|
||||||
TIDSortedElemSet cornerFaces; // corner faces of found _BlockSide's
|
TIDSortedElemSet cornerFaces; // corner faces of found _BlockSide's
|
||||||
list< const SMDS_MeshNode* > corners( 1, nCorner );
|
list< const SMDS_MeshNode* > corners( 1, nCorner );
|
||||||
list< const SMDS_MeshNode* >::iterator corner = corners.begin();
|
list< const SMDS_MeshNode* >::iterator corner = corners.begin();
|
||||||
|
@ -689,7 +689,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh,
|
|||||||
// check if the loaded grid corresponds to nb of quadrangles on the FACE
|
// check if the loaded grid corresponds to nb of quadrangles on the FACE
|
||||||
const SMESHDS_SubMesh* faceSubMesh =
|
const SMESHDS_SubMesh* faceSubMesh =
|
||||||
proxymesh ? proxymesh->GetSubMesh( F ) : meshDS->MeshElements( F );
|
proxymesh ? proxymesh->GetSubMesh( F ) : meshDS->MeshElements( F );
|
||||||
const int nbQuads = faceSubMesh->NbElements();
|
const smIdType nbQuads = faceSubMesh->NbElements();
|
||||||
const int nbHor = aCubeSide[i]._u2nodesMap.size() - 1;
|
const int nbHor = aCubeSide[i]._u2nodesMap.size() - 1;
|
||||||
const int nbVer = aCubeSide[i]._u2nodesMap.begin()->second.size() - 1;
|
const int nbVer = aCubeSide[i]._u2nodesMap.begin()->second.size() - 1;
|
||||||
ok = ( nbQuads == nbHor * nbVer );
|
ok = ( nbQuads == nbHor * nbVer );
|
||||||
@ -1064,7 +1064,7 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh,
|
|||||||
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
|
for(int i=SMDSEntity_Node; i<SMDSEntity_Last; i++) aResVec[i] = 0;
|
||||||
if(IsQuadratic) {
|
if(IsQuadratic) {
|
||||||
aResVec[SMDSEntity_Quad_Hexa] = nb2d_face0 * ( nb2d/nb1d );
|
aResVec[SMDSEntity_Quad_Hexa] = nb2d_face0 * ( nb2d/nb1d );
|
||||||
int nb1d_face0_int = ( nb2d_face0*4 - nb1d ) / 2;
|
smIdType nb1d_face0_int = ( nb2d_face0*4 - nb1d ) / 2;
|
||||||
aResVec[SMDSEntity_Node] = nb0d_face0 * ( 2*nb2d/nb1d - 1 ) - nb1d_face0_int * nb2d/nb1d;
|
aResVec[SMDSEntity_Node] = nb0d_face0 * ( 2*nb2d/nb1d - 1 ) - nb1d_face0_int * nb2d/nb1d;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -33,6 +33,8 @@
|
|||||||
#include "SMESH_Hypothesis.hxx"
|
#include "SMESH_Hypothesis.hxx"
|
||||||
#include "Utils_SALOME_Exception.hxx"
|
#include "Utils_SALOME_Exception.hxx"
|
||||||
|
|
||||||
|
#include <smIdType.hxx>
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -179,7 +181,7 @@ public:
|
|||||||
friend std::istream& operator >> (std::istream & load, StdMeshers_NumberOfSegments & hyp);
|
friend std::istream& operator >> (std::istream & load, StdMeshers_NumberOfSegments & hyp);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int _numberOfSegments; //!< an edge will be split on to this number of segments
|
smIdType _numberOfSegments; //!< an edge will be split on to this number of segments
|
||||||
DistrType _distrType; //!< the type of distribution of density function
|
DistrType _distrType; //!< the type of distribution of density function
|
||||||
double _scaleFactor; //!< the scale parameter for DT_Scale
|
double _scaleFactor; //!< the scale parameter for DT_Scale
|
||||||
std::vector<double> _table, _distr; //!< the table for DT_TabFunc, a sequence of pairs of numbers
|
std::vector<double> _table, _distr; //!< the table for DT_TabFunc, a sequence of pairs of numbers
|
||||||
|
@ -147,7 +147,8 @@ bool StdMeshers_Penta_3D::Compute(SMESH_Mesh& aMesh,
|
|||||||
void StdMeshers_Penta_3D::MakeNodes()
|
void StdMeshers_Penta_3D::MakeNodes()
|
||||||
{
|
{
|
||||||
const int aNbSIDs=9;
|
const int aNbSIDs=9;
|
||||||
int i, j, k, ij, iNbN, aNodeID, aSize, iErr;
|
int i, j, k, ij, aSize, iErr;
|
||||||
|
smIdType iNbN, aNodeID;
|
||||||
double aX, aY, aZ;
|
double aX, aY, aZ;
|
||||||
SMESH_Block::TShapeID aSID, aSIDs[aNbSIDs]={
|
SMESH_Block::TShapeID aSID, aSIDs[aNbSIDs]={
|
||||||
SMESH_Block::ID_V000, SMESH_Block::ID_V100,
|
SMESH_Block::ID_V000, SMESH_Block::ID_V100,
|
||||||
@ -655,7 +656,8 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
|
|||||||
}
|
}
|
||||||
//
|
//
|
||||||
// 2. Make pentahedrons
|
// 2. Make pentahedrons
|
||||||
int aID0, k , aJ[4];
|
smIdType aID0;
|
||||||
|
int k , aJ[4];
|
||||||
vector<const SMDS_MeshNode*> aN;
|
vector<const SMDS_MeshNode*> aN;
|
||||||
//
|
//
|
||||||
SMDS_ElemIteratorPtr itf, aItNodes;
|
SMDS_ElemIteratorPtr itf, aItNodes;
|
||||||
@ -766,7 +768,8 @@ void StdMeshers_Penta_3D::MakeVolumeMesh()
|
|||||||
//=======================================================================
|
//=======================================================================
|
||||||
void StdMeshers_Penta_3D::MakeMeshOnFxy1()
|
void StdMeshers_Penta_3D::MakeMeshOnFxy1()
|
||||||
{
|
{
|
||||||
int aID0, aJ, aLevel, ij, aNbNodes, k;
|
int aJ, aLevel, ij, k;
|
||||||
|
smIdType aID0, aNbNodes;
|
||||||
//
|
//
|
||||||
SMDS_NodeIteratorPtr itn;
|
SMDS_NodeIteratorPtr itn;
|
||||||
SMDS_ElemIteratorPtr itf, aItNodes;
|
SMDS_ElemIteratorPtr itf, aItNodes;
|
||||||
@ -1109,12 +1112,12 @@ void StdMeshers_Penta_3D::MakeBlock()
|
|||||||
int iNbF = aM.Extent();
|
int iNbF = aM.Extent();
|
||||||
if (iNbF == 6) {
|
if (iNbF == 6) {
|
||||||
//
|
//
|
||||||
int nb_f1 = pMesh->GetSubMeshContaining(aM(1))->GetSubMeshDS()->NbElements();
|
smIdType nb_f1 = pMesh->GetSubMeshContaining(aM(1))->GetSubMeshDS()->NbElements();
|
||||||
int nb_f2 = pMesh->GetSubMeshContaining(aM(2))->GetSubMeshDS()->NbElements();
|
smIdType nb_f2 = pMesh->GetSubMeshContaining(aM(2))->GetSubMeshDS()->NbElements();
|
||||||
int nb_f3 = pMesh->GetSubMeshContaining(aM(3))->GetSubMeshDS()->NbElements();
|
smIdType nb_f3 = pMesh->GetSubMeshContaining(aM(3))->GetSubMeshDS()->NbElements();
|
||||||
int nb_f4 = pMesh->GetSubMeshContaining(aM(4))->GetSubMeshDS()->NbElements();
|
smIdType nb_f4 = pMesh->GetSubMeshContaining(aM(4))->GetSubMeshDS()->NbElements();
|
||||||
int nb_f5 = pMesh->GetSubMeshContaining(aM(5))->GetSubMeshDS()->NbElements();
|
smIdType nb_f5 = pMesh->GetSubMeshContaining(aM(5))->GetSubMeshDS()->NbElements();
|
||||||
int nb_f6 = pMesh->GetSubMeshContaining(aM(6))->GetSubMeshDS()->NbElements();
|
smIdType nb_f6 = pMesh->GetSubMeshContaining(aM(6))->GetSubMeshDS()->NbElements();
|
||||||
//
|
//
|
||||||
int has_only_quad_f1 = 1;
|
int has_only_quad_f1 = 1;
|
||||||
int has_only_quad_f2 = 1;
|
int has_only_quad_f2 = 1;
|
||||||
@ -1153,18 +1156,18 @@ void StdMeshers_Penta_3D::MakeBlock()
|
|||||||
int iNbE = aE.Extent();
|
int iNbE = aE.Extent();
|
||||||
if (iNbE == 12) {
|
if (iNbE == 12) {
|
||||||
//
|
//
|
||||||
int nb_e01 = pMesh->GetSubMeshContaining(aE(1))->GetSubMeshDS()->NbElements();
|
smIdType nb_e01 = pMesh->GetSubMeshContaining(aE(1))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e02 = pMesh->GetSubMeshContaining(aE(2))->GetSubMeshDS()->NbElements();
|
smIdType nb_e02 = pMesh->GetSubMeshContaining(aE(2))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e03 = pMesh->GetSubMeshContaining(aE(3))->GetSubMeshDS()->NbElements();
|
smIdType nb_e03 = pMesh->GetSubMeshContaining(aE(3))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e04 = pMesh->GetSubMeshContaining(aE(4))->GetSubMeshDS()->NbElements();
|
smIdType nb_e04 = pMesh->GetSubMeshContaining(aE(4))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e05 = pMesh->GetSubMeshContaining(aE(5))->GetSubMeshDS()->NbElements();
|
smIdType nb_e05 = pMesh->GetSubMeshContaining(aE(5))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e06 = pMesh->GetSubMeshContaining(aE(6))->GetSubMeshDS()->NbElements();
|
smIdType nb_e06 = pMesh->GetSubMeshContaining(aE(6))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e07 = pMesh->GetSubMeshContaining(aE(7))->GetSubMeshDS()->NbElements();
|
smIdType nb_e07 = pMesh->GetSubMeshContaining(aE(7))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e08 = pMesh->GetSubMeshContaining(aE(8))->GetSubMeshDS()->NbElements();
|
smIdType nb_e08 = pMesh->GetSubMeshContaining(aE(8))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e09 = pMesh->GetSubMeshContaining(aE(9))->GetSubMeshDS()->NbElements();
|
smIdType nb_e09 = pMesh->GetSubMeshContaining(aE(9))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e10 = pMesh->GetSubMeshContaining(aE(10))->GetSubMeshDS()->NbElements();
|
smIdType nb_e10 = pMesh->GetSubMeshContaining(aE(10))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e11 = pMesh->GetSubMeshContaining(aE(11))->GetSubMeshDS()->NbElements();
|
smIdType nb_e11 = pMesh->GetSubMeshContaining(aE(11))->GetSubMeshDS()->NbElements();
|
||||||
int nb_e12 = pMesh->GetSubMeshContaining(aE(12))->GetSubMeshDS()->NbElements();
|
smIdType nb_e12 = pMesh->GetSubMeshContaining(aE(12))->GetSubMeshDS()->NbElements();
|
||||||
//
|
//
|
||||||
int nb_ok = 0 ;
|
int nb_ok = 0 ;
|
||||||
//
|
//
|
||||||
@ -1417,11 +1420,11 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
|
|||||||
if ( sm1->NbNodes() * smb->NbNodes() != smFace->NbNodes() ) {
|
if ( sm1->NbNodes() * smb->NbNodes() != smFace->NbNodes() ) {
|
||||||
// check quadratic case
|
// check quadratic case
|
||||||
if ( myCreateQuadratic ) {
|
if ( myCreateQuadratic ) {
|
||||||
int n1 = sm1->NbNodes()/2;
|
smIdType n1 = sm1->NbNodes()/2;
|
||||||
int n2 = smb->NbNodes()/2;
|
smIdType n2 = smb->NbNodes()/2;
|
||||||
int n3 = sm1->NbNodes() - n1;
|
smIdType n3 = sm1->NbNodes() - n1;
|
||||||
int n4 = smb->NbNodes() - n2;
|
smIdType n4 = smb->NbNodes() - n2;
|
||||||
int nf = sm1->NbNodes()*smb->NbNodes() - n3*n4;
|
smIdType nf = sm1->NbNodes()*smb->NbNodes() - n3*n4;
|
||||||
if( nf != smFace->NbNodes() ) {
|
if( nf != smFace->NbNodes() ) {
|
||||||
MESSAGE( "Wrong nb face nodes: " <<
|
MESSAGE( "Wrong nb face nodes: " <<
|
||||||
sm1->NbNodes()<<" "<<smb->NbNodes()<<" "<<smFace->NbNodes());
|
sm1->NbNodes()<<" "<<smb->NbNodes()<<" "<<smFace->NbNodes());
|
||||||
@ -1435,8 +1438,8 @@ bool StdMeshers_Penta_3D::LoadIJNodes(StdMeshers_IJNodeMap & theIJNodes,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// IJ size
|
// IJ size
|
||||||
int vsize = sm1->NbNodes() + 2;
|
smIdType vsize = sm1->NbNodes() + 2;
|
||||||
int hsize = smb->NbNodes() + 2;
|
smIdType hsize = smb->NbNodes() + 2;
|
||||||
if(myCreateQuadratic) {
|
if(myCreateQuadratic) {
|
||||||
vsize = vsize - sm1->NbNodes()/2 -1;
|
vsize = vsize - sm1->NbNodes()/2 -1;
|
||||||
hsize = hsize - smb->NbNodes()/2 -1;
|
hsize = hsize - smb->NbNodes()/2 -1;
|
||||||
|
@ -554,7 +554,7 @@ namespace
|
|||||||
{
|
{
|
||||||
SMESH_subMesh* faceSm = *smIt;
|
SMESH_subMesh* faceSm = *smIt;
|
||||||
SMESHDS_SubMesh* faceSmDS = faceSm->GetSubMeshDS();
|
SMESHDS_SubMesh* faceSmDS = faceSm->GetSubMeshDS();
|
||||||
int nbQuads = faceSmDS ? faceSmDS->NbElements() : 0;
|
smIdType nbQuads = faceSmDS ? faceSmDS->NbElements() : 0;
|
||||||
bool toRemove;
|
bool toRemove;
|
||||||
if ( nbQuads > 0 )
|
if ( nbQuads > 0 )
|
||||||
toRemove = helper->IsStructured( faceSm );
|
toRemove = helper->IsStructured( faceSm );
|
||||||
@ -1025,7 +1025,7 @@ bool StdMeshers_Prism_3D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape& theSh
|
|||||||
SMESH_subMesh* faceSM = theMesh.GetSubMesh( face );
|
SMESH_subMesh* faceSM = theMesh.GetSubMesh( face );
|
||||||
if ( !faceSM->IsEmpty() )
|
if ( !faceSM->IsEmpty() )
|
||||||
{
|
{
|
||||||
int nbFaces = faceSM->GetSubMeshDS()->NbElements();
|
smIdType nbFaces = faceSM->GetSubMeshDS()->NbElements();
|
||||||
if ( prevNbFaces < nbFaces )
|
if ( prevNbFaces < nbFaces )
|
||||||
{
|
{
|
||||||
if ( !meshedFaces.empty() ) meshedFaces.pop_back();
|
if ( !meshedFaces.empty() ) meshedFaces.pop_back();
|
||||||
@ -1749,7 +1749,7 @@ bool StdMeshers_Prism_3D::computeWalls(const Prism_3D::TPrismTopo& thePrism)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// assure that all the source (left) EDGEs are meshed
|
// assure that all the source (left) EDGEs are meshed
|
||||||
int nbSrcSegments = 0;
|
smIdType nbSrcSegments = 0;
|
||||||
for ( int i = 0; i < lftSide->NbEdges(); ++i )
|
for ( int i = 0; i < lftSide->NbEdges(); ++i )
|
||||||
{
|
{
|
||||||
if ( isArtificialQuad )
|
if ( isArtificialQuad )
|
||||||
|
@ -2873,7 +2873,7 @@ namespace StdMeshers_ProjectionUtils
|
|||||||
const SMDS_MeshNode *srcNode, *tgtNode;
|
const SMDS_MeshNode *srcNode, *tgtNode;
|
||||||
|
|
||||||
// un-mark internal src nodes in order iterate them using _delaunay
|
// un-mark internal src nodes in order iterate them using _delaunay
|
||||||
int nbSrcNodes = 0;
|
smIdType nbSrcNodes = 0;
|
||||||
SMDS_NodeIteratorPtr nIt = _srcSubMesh->GetSubMeshDS()->GetNodes();
|
SMDS_NodeIteratorPtr nIt = _srcSubMesh->GetSubMeshDS()->GetNodes();
|
||||||
if ( !nIt || !nIt->more() ) return true;
|
if ( !nIt || !nIt->more() ) return true;
|
||||||
if ( moveAll )
|
if ( moveAll )
|
||||||
|
@ -1203,7 +1203,7 @@ namespace {
|
|||||||
tgtNbEW.front() != 4 || srcNbEW.front() != 4 )
|
tgtNbEW.front() != 4 || srcNbEW.front() != 4 )
|
||||||
return; // not quads
|
return; // not quads
|
||||||
|
|
||||||
int srcNbSeg[4];
|
smIdType srcNbSeg[4];
|
||||||
list< TopoDS_Edge >::iterator edgeS = srcEdges.begin(), edgeT = tgtEdges.begin();
|
list< TopoDS_Edge >::iterator edgeS = srcEdges.begin(), edgeT = tgtEdges.begin();
|
||||||
for ( int i = 0; edgeS != srcEdges.end(); ++i, ++edgeS )
|
for ( int i = 0; edgeS != srcEdges.end(); ++i, ++edgeS )
|
||||||
if ( SMESHDS_SubMesh* sm = srcMesh->GetMeshDS()->MeshElements( *edgeS ))
|
if ( SMESHDS_SubMesh* sm = srcMesh->GetMeshDS()->MeshElements( *edgeS ))
|
||||||
@ -1444,7 +1444,7 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
|||||||
// compare nb nodes on srcEdge1 and srcEdge2
|
// compare nb nodes on srcEdge1 and srcEdge2
|
||||||
if ( srcEdge2 != srcEdges.end() )
|
if ( srcEdge2 != srcEdges.end() )
|
||||||
{
|
{
|
||||||
int nbN1 = 0, nbN2 = 0;
|
smIdType nbN1 = 0, nbN2 = 0;
|
||||||
if ( SMESHDS_SubMesh* sm = srcMesh->GetMeshDS()->MeshElements( srcEdge1 ))
|
if ( SMESHDS_SubMesh* sm = srcMesh->GetMeshDS()->MeshElements( srcEdge1 ))
|
||||||
nbN1 = sm->NbNodes();
|
nbN1 = sm->NbNodes();
|
||||||
if ( SMESHDS_SubMesh* sm = srcMesh->GetMeshDS()->MeshElements( *srcEdge2 ))
|
if ( SMESHDS_SubMesh* sm = srcMesh->GetMeshDS()->MeshElements( *srcEdge2 ))
|
||||||
@ -1666,9 +1666,9 @@ bool StdMeshers_Projection_2D::Compute(SMESH_Mesh& theMesh, const TopoDS_Shape&
|
|||||||
// Merge
|
// Merge
|
||||||
|
|
||||||
SMESH_MeshEditor editor( tgtMesh );
|
SMESH_MeshEditor editor( tgtMesh );
|
||||||
int nbFaceBeforeMerge = tgtSubMesh->GetSubMeshDS()->NbElements();
|
smIdType nbFaceBeforeMerge = tgtSubMesh->GetSubMeshDS()->NbElements();
|
||||||
editor.MergeNodes( groupsOfNodes );
|
editor.MergeNodes( groupsOfNodes );
|
||||||
int nbFaceAtferMerge = tgtSubMesh->GetSubMeshDS()->NbElements();
|
smIdType nbFaceAtferMerge = tgtSubMesh->GetSubMeshDS()->NbElements();
|
||||||
if ( nbFaceBeforeMerge != nbFaceAtferMerge && !helper.HasDegeneratedEdges() )
|
if ( nbFaceBeforeMerge != nbFaceAtferMerge && !helper.HasDegeneratedEdges() )
|
||||||
return error(COMPERR_BAD_INPUT_MESH, "Probably invalid node parameters on geom faces");
|
return error(COMPERR_BAD_INPUT_MESH, "Probably invalid node parameters on geom faces");
|
||||||
|
|
||||||
|
@ -1720,8 +1720,8 @@ namespace
|
|||||||
if ( isComputed[ edgeIDs1[i]] &&
|
if ( isComputed[ edgeIDs1[i]] &&
|
||||||
isComputed[ edgeIDs2[i]] )
|
isComputed[ edgeIDs2[i]] )
|
||||||
{
|
{
|
||||||
int nbNodes1 = meshDS->MeshElements(edgeIDs[ edgeIDs1[i]] )->NbNodes();
|
smIdType nbNodes1 = meshDS->MeshElements(edgeIDs[ edgeIDs1[i]] )->NbNodes();
|
||||||
int nbNodes2 = meshDS->MeshElements(edgeIDs[ edgeIDs2[i]] )->NbNodes();
|
smIdType nbNodes2 = meshDS->MeshElements(edgeIDs[ edgeIDs2[i]] )->NbNodes();
|
||||||
if ( nbNodes1 != nbNodes2 )
|
if ( nbNodes1 != nbNodes2 )
|
||||||
return false;
|
return false;
|
||||||
if (( int(i)-1 >= 0 ) &&
|
if (( int(i)-1 >= 0 ) &&
|
||||||
|
@ -770,7 +770,7 @@ bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
|
|||||||
}
|
}
|
||||||
if (computed) {
|
if (computed) {
|
||||||
SMESHDS_SubMesh* smds = sm->GetSubMeshDS();
|
SMESHDS_SubMesh* smds = sm->GetSubMeshDS();
|
||||||
int nb_segments = smds->NbElements();
|
smIdType nb_segments = smds->NbElements();
|
||||||
if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
|
if (nbseg - 1 <= nb_segments && nb_segments <= nbseg + 1) {
|
||||||
isFound = true;
|
isFound = true;
|
||||||
nbseg = nb_segments;
|
nbseg = nb_segments;
|
||||||
|
@ -10752,7 +10752,7 @@ namespace VISCOUS_3D
|
|||||||
{
|
{
|
||||||
points.reserve( _boundarySize );
|
points.reserve( _boundarySize );
|
||||||
size_t nb = _boundary.rbegin()->_nodes.size();
|
size_t nb = _boundary.rbegin()->_nodes.size();
|
||||||
int lastID = _boundary.rbegin()->Node( nb - 1 )->GetID();
|
smIdType lastID = _boundary.rbegin()->Node( nb - 1 )->GetID();
|
||||||
std::list< BndPart >::const_iterator part = _boundary.begin();
|
std::list< BndPart >::const_iterator part = _boundary.begin();
|
||||||
for ( ; part != _boundary.end(); ++part )
|
for ( ; part != _boundary.end(); ++part )
|
||||||
{
|
{
|
||||||
@ -12114,7 +12114,7 @@ void _Shrinker1D::AddEdge( const _LayerEdge* e,
|
|||||||
GeomAdaptor_Curve aCurve(C, f,l);
|
GeomAdaptor_Curve aCurve(C, f,l);
|
||||||
const double totLen = GCPnts_AbscissaPoint::Length(aCurve, f, l);
|
const double totLen = GCPnts_AbscissaPoint::Length(aCurve, f, l);
|
||||||
|
|
||||||
int nbExpectNodes = eSubMesh->NbNodes();
|
smIdType nbExpectNodes = eSubMesh->NbNodes();
|
||||||
_initU .reserve( nbExpectNodes );
|
_initU .reserve( nbExpectNodes );
|
||||||
_normPar.reserve( nbExpectNodes );
|
_normPar.reserve( nbExpectNodes );
|
||||||
_nodes .reserve( nbExpectNodes );
|
_nodes .reserve( nbExpectNodes );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user